mirror of https://github.com/BOINC/boinc.git
70 lines
1.5 KiB
HTML
70 lines
1.5 KiB
HTML
<title>Data server protocol</title>
|
|
|
|
<h2>Data server protocol</h2>
|
|
|
|
A BOINC data server is an HTTP server such as Apache.
|
|
|
|
<h3>Download</h3>
|
|
<p>
|
|
File download is done by a standard GET request,
|
|
using a URL from the FILE_INFO element.
|
|
The file offset, if any, is given in the HTTP header.
|
|
<p>
|
|
TODO: is this right?
|
|
|
|
<h3>Upload</h3>
|
|
<p>
|
|
File upload is done using POST operations to a CGI program.
|
|
A security mechanism prevents unauthorized
|
|
upload of large amounts of data to the server.
|
|
Two RPC operations are used.
|
|
<p>
|
|
<b>1) Get file size</b>
|
|
<p>
|
|
The request message has the form:
|
|
<pre>
|
|
<file_size_req>filename</file_size_req>
|
|
</pre>
|
|
|
|
TODO: should have a separate <filename> tag
|
|
<p>
|
|
The reply message has the form:
|
|
<pre>
|
|
<status>0</status>
|
|
<nbytes>1234</nbytes>
|
|
</pre>
|
|
Where nbytes is 0 if the file doesn't exist.
|
|
There are no security mechanisms.
|
|
|
|
<p>
|
|
<b>2) Upload file</b>
|
|
<p>
|
|
Request message format:
|
|
<pre>
|
|
<file_info>
|
|
...
|
|
<xml_signature>
|
|
...
|
|
</xml_signature>
|
|
</file_info>
|
|
<nbytes>x</nbytes>
|
|
<offset>x</offset>
|
|
<data>
|
|
... (data)
|
|
</pre>
|
|
<p>
|
|
The <file_info> element is the exact text sent from the
|
|
scheduling server to the client.
|
|
It includes a signature based on the project's file upload
|
|
authentication key pair.
|
|
<nbytes> is the amount of data being uploaded.
|
|
<offset> is the offset within the file.
|
|
<p>
|
|
TODO: this should all be within a request tag
|
|
<p>
|
|
Reply message format:
|
|
<pre>
|
|
<status>x</status>
|
|
[ <error>bad file size</error> ]
|
|
</pre>
|
|
The status is zero if the operation succeeded. |