mirror of https://github.com/BOINC/boinc.git
50 lines
1.5 KiB
PHP
50 lines
1.5 KiB
PHP
<?
|
|
require_once("docutil.php");
|
|
page_head("Trickle messages");
|
|
echo "
|
|
<h2>Trickle messages</h2>
|
|
<p>
|
|
<b>Trickle messages</b>
|
|
let applications communicate with the server
|
|
during the execution of a workunit.
|
|
That are intended for applications that have
|
|
long work units (multiple days).
|
|
Typical uses of this mechanism:
|
|
<ul>
|
|
<li> The application reports its current CPU usage,
|
|
so that users can be granted incremental credit
|
|
(rather than waiting until the end of the work unit).
|
|
<li> The application reports a summary of the computational state,
|
|
so that server logic can decide if the computation should be aborted.
|
|
</ul>
|
|
|
|
<p>
|
|
Trickle messages are asynchronous and unreliable.
|
|
A trickle message may not be delivered immediately
|
|
after it is generated by the application.
|
|
If additional trickle messages are generated during the interval,
|
|
only the last one will be sent.
|
|
Thus, the content of trickle messages should be cumulative
|
|
rather than incremental.
|
|
|
|
<h3>Implementation</h3>
|
|
<p>
|
|
<code>boinc_trickle()</code>
|
|
creates a file 'trickle' in the slot directory
|
|
(overwriting any existing file of that name)
|
|
and signals the core client via shared memory.
|
|
When the core client gets this signal,
|
|
or when the application exits,
|
|
it moves the file from 'slot/trickle'
|
|
to 'project/trickle_resultid_time'.
|
|
<p>
|
|
When the core client sends an RPC to a server,
|
|
it scans the project director for trickle files
|
|
and includes them in the request.
|
|
On successful RPC completion it deletes the trickle files.
|
|
|
|
";
|
|
|
|
page_tail();
|
|
?>
|