Changes between Version 7 and Version 8 of RemoteInputFiles


Ignore:
Timestamp:
Oct 18, 2016, 9:28:30 PM (8 years ago)
Author:
davea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • RemoteInputFiles

    v7 v8  
    22= Remote management of input files =
    33
    4 For a file to be used as an input file of a BOINC job,
    5 it must be available to BOINC clients via HTTP.
    6 The standard way to do this is put the file
    7 in the project's "download directory" on the project server.
     4Input files of BOINC jobs must be available on a public web server.
     5Usually this is the project's BOINC server.
    86
    97For projects that use [RemoteJobs remote job submission],
    10 job submitters don't have login access to the server,
     8job submitters don't have login access to the BOINC server,
    119so they can't store files there directly.
    1210Instead, BOINC provides two mechanisms that allow
    13 job submitters to store and manage files on the BOINC server.
     11them to store and manage files on the BOINC server.
    1412
    15 Each of these mechanisms deals with several issues:
     13'''Job-based file management''': files are automatically transferred
     14as part of [RemoteJob remote job submission].
     15It's intended to be integrated with such a system;
     16job submitters are not aware of it.
     17
     18'''Per-user file sandbox''': job submitters explicitly maintain,
     19via a web interface, a set of files on the server.
     20
     21Each mechanism deals with several issues:
    1622
    1723 * '''File immutability''': BOINC requires that a file
     
    2026  they must be able to submit one job with an input file of a given name,
    2127  and a second job with an input file of the same name but different contents.
    22  * File cleanup: There must be some way to clean up
    23   files on the server when they are no longer needed.
    24  * Authorization: only users authorized to submit jobs
     28 * '''File cleanup''': files on the server must be deleted when they are no longer needed.
     29 * '''Authorization''': only users authorized to submit jobs
    2530  should be able to move files to the server.
    2631
    27 Note: both mechanisms upload files via PHP.
     32'''Note''': both mechanisms upload files via a PHP script.
    2833PHP's default max file upload size is 2MB.
    2934To increase this, edit /etc/php.ini, and change, e.g.
     
    3338}}}
    3439
    35 == Content-based file management ==
     40== Job-based file management ==
    3641
    37 In this system, the BOINC name of a file
    38 (i.e. its name on the BOINC server)
    39 is based on its hash; thus file immutability is automatic.
     42In this system, the BOINC name of a file (i.e. its name on the BOINC server)
     43includes its hash; thus file immutability is automatic.
    4044
    4145File cleanup is based on file/batch associations.
     
    4852the RPC handler is html/user/job_files.php.
    4953
    50 The following C++ interfaces are provided
    51 (in lib/remote_submit.cpp).
    52 This is to be called on the job submission host;
     54=== C++ interface ===
     55
     56The following C++ functions are provided (in lib/remote_submit.cpp).
     57They are to be called on the job submission host;
    5358the files must exist on that host,
    5459and their MD5s must have already been computed.
     
    6772 * '''project_url''': the project's master URL
    6873 * '''authenticator''': the job submitter's authenticator.
    69  * '''boinc_names''': a list of the "BOINC names" of the files.  Must include a hash; can include a suffix if needed.
     74 * '''boinc_names''': a list of the "BOINC names" of the files.
     75    Must include the MD5 hash; can have a prefix or suffix if needed.
    7076 * '''batch_id''': the ID of a batch whose jobs will reference the files
    7177  (these jobs need not exist yet).
     
    110116This will delete files that are no longer associated with an active batch.
    111117
     118=== Python interface ===
     119
     120The Python interface does both RPCs in one function:
     121{{{
     122import submit_api
     123
     124req = UPLOAD_FILES_REQ()
     125req.project = project_url
     126req.authenticator = get_auth()
     127req.batch_id = 271
     128req.local_names = ('updater.cpp', 'kill_wu.cpp')
     129req.boinc_names = ('xxx_updater.cpp', 'xxx_kill_wu.cpp')
     130r = upload_files(req)
     131if r[0].tag == 'error':
     132        print 'error: ', r[0].find('error_msg').text
     133        return
     134print 'success'
     135}}}
     136
    112137== Per-user file sandbox ==
    113138