好みの設定(プレファレンス)の実装 |
|
<global_preferences>
<source_project>http://setiathome.berkeley.edu/</source_project>
<source_scheduler>http://setiboinc.ssl.berkeley.edu/sah_cgi/cgi</source_scheduler>
<mod_time>1140215730</mod_time>
<run_if_user_active/>
<idle_time_to_run>3</idle_time_to_run>
<cpu_scheduling_period_minutes>60</cpu_scheduling_period_minutes>
<hangup_if_dialed/>
<work_buf_min_days>0.1</work_buf_min_days>
<max_cpus>2</max_cpus>
<disk_interval>60</disk_interval>
<disk_max_used_gb>100</disk_max_used_gb>
<disk_max_used_pct>50</disk_max_used_pct>
<disk_min_free_gb>0.1</disk_min_free_gb>
<vm_max_used_pct>75</vm_max_used_pct>
<max_bytes_sec_down>0</max_bytes_sec_down>
<max_bytes_sec_up>0</max_bytes_sec_up>
<venue name="home">
<idle_time_to_run>3</idle_time_to_run>
<cpu_scheduling_period_minutes>60</cpu_scheduling_period_minutes>
<hangup_if_dialed/>
<work_buf_min_days>0.1</work_buf_min_days>
<max_cpus>2</max_cpus>
<disk_interval>60</disk_interval>
<disk_max_used_gb>100</disk_max_used_gb>
<disk_max_used_pct>50</disk_max_used_pct>
<disk_min_free_gb>0.001</disk_min_free_gb>
<vm_max_used_pct>75</vm_max_used_pct>
<max_bytes_sec_down>0</max_bytes_sec_down>
<max_bytes_sec_up>0</max_bytes_sec_up>
</venue>
</global_preferences>
クライアント側では、global プレファレンスの部分が ファイル global_prefs.xml に格納されます。 (サーバからこの内容を獲得できたときだけ存在します)。
global_prefs.xml ファイルがあるなら、スケジューラ RPC 要求 にはそれが含まれます。 スケジューラが スケジューラ RPC 要求を受信したとき、 その要求が global プレファレンス を含んでいたら、スケジューラは DB にある global プレファレンスを調べて、まだ存在しないか古いときには、受信した 値を DB に格納します。 DB に入っている内容のほうが新しいときには、応答にその新しいほうの global プレファレンスの内容を載せて返します。 要求に global プレファレンスが含まれず、スケジューラの DB に そのプレファレンスがあれば、 やはり、応答に DB 内のプレファレンスが載せられて返されます。
クライアントがスケジューラ RPC の応答を受信処理するとき、 global プレファレンスが応答に含まれていたなら、ファイル global_prefs.xml にその内容を書き出します。 ただし、その先頭に 当該プロジェクトの URL と スケジューラの URL を示す要素がなければ、 それらを前置します。
<project_preferences>
<resource_share>50</resource_share>
<project_specific>
<format_preset>Custom</format_preset>
<text_style>Pillars</text_style>
<graph_style>Rectangles</graph_style>
<max_fps>30</max_fps>
<max_cpu>50</max_cpu>
<grow_time>10</grow_time>
<hold_time>5</hold_time>
<graph_alpha>0.7</graph_alpha>
<roll_period>10</roll_period>
<roll_range>20</roll_range>
<pitch_period>30</pitch_period>
<pitch_range>30</pitch_range>
<starfield_size>2000</starfield_size>
<starfield_speed>40</starfield_speed>
<color_preset>Rainbow</color_preset>
<start_hue>0</start_hue>
<hue_change>1</hue_change>
<app_file>
<timestamp>1095011196</timestamp>
<open_name>background</open_name>
<url>http://setiweb.ssl.berkeley.edu/~davea/yosemite_08_04/800/P1010008.jpg</url>
</app_file>
</project_specific>
<venue name="school">
<resource_share>100</resource_share>
<project_specific>
<format_preset>SETI@home classic</format_preset>
<text_style>Pillars</text_style>
<graph_style>Rectangles</graph_style>
<max_fps>30</max_fps>
<max_cpu>50</max_cpu>
<grow_time>10</grow_time>
<hold_time>5</hold_time>
<graph_alpha>0.7</graph_alpha>
<roll_period>10</roll_period>
<roll_range>20</roll_range>
<pitch_period>30</pitch_period>
<pitch_range>30</pitch_range>
<starfield_size>2000</starfield_size>
<starfield_speed>40</starfield_speed>
<color_preset>Rainbow</color_preset>
<start_hue>0</start_hue>
<hue_change>1</hue_change>
</project_specific>
</venue>
</project_preferences>
スケジューラ RPC の応答にはいつでも project プレファレンスを含みます。
クライアントがスケジューラ RPC の応答を受信処理するとき、 ファイル account_X.xml に project プレファレンスの内容を書き出します。 ただし、その先頭に 当該プロジェクトの マスター URL と 認証子(authenticator)訳注1 を前置します。
最終更新時刻 00:50:02, 2006年08月12日(JST)
Copyright © 2009 University of California.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License,
Version 1.2 or any later version published by the Free Software Foundation.
Copyright © 2009 Komori Hitoshi(je2bwm at jarl.com).
Japanese translation from English web pages on BOINC.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License,
Version 1.2 or any later version published by the Free Software Foundation.