Changes between Version 7 and Version 8 of RemoteInputFiles
- Timestamp:
- Oct 18, 2016, 9:28:30 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
RemoteInputFiles
v7 v8 2 2 = Remote management of input files = 3 3 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. 4 Input files of BOINC jobs must be available on a public web server. 5 Usually this is the project's BOINC server. 8 6 9 7 For projects that use [RemoteJobs remote job submission], 10 job submitters don't have login access to the server,8 job submitters don't have login access to the BOINC server, 11 9 so they can't store files there directly. 12 10 Instead, BOINC provides two mechanisms that allow 13 job submittersto store and manage files on the BOINC server.11 them to store and manage files on the BOINC server. 14 12 15 Each of these mechanisms deals with several issues: 13 '''Job-based file management''': files are automatically transferred 14 as part of [RemoteJob remote job submission]. 15 It's intended to be integrated with such a system; 16 job submitters are not aware of it. 17 18 '''Per-user file sandbox''': job submitters explicitly maintain, 19 via a web interface, a set of files on the server. 20 21 Each mechanism deals with several issues: 16 22 17 23 * '''File immutability''': BOINC requires that a file … … 20 26 they must be able to submit one job with an input file of a given name, 21 27 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 25 30 should be able to move files to the server. 26 31 27 Note: both mechanisms upload files via PHP.32 '''Note''': both mechanisms upload files via a PHP script. 28 33 PHP's default max file upload size is 2MB. 29 34 To increase this, edit /etc/php.ini, and change, e.g. … … 33 38 }}} 34 39 35 == Content-based file management ==40 == Job-based file management == 36 41 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. 42 In this system, the BOINC name of a file (i.e. its name on the BOINC server) 43 includes its hash; thus file immutability is automatic. 40 44 41 45 File cleanup is based on file/batch associations. … … 48 52 the RPC handler is html/user/job_files.php. 49 53 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 56 The following C++ functions are provided (in lib/remote_submit.cpp). 57 They are to be called on the job submission host; 53 58 the files must exist on that host, 54 59 and their MD5s must have already been computed. … … 67 72 * '''project_url''': the project's master URL 68 73 * '''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. 70 76 * '''batch_id''': the ID of a batch whose jobs will reference the files 71 77 (these jobs need not exist yet). … … 110 116 This will delete files that are no longer associated with an active batch. 111 117 118 === Python interface === 119 120 The Python interface does both RPCs in one function: 121 {{{ 122 import submit_api 123 124 req = UPLOAD_FILES_REQ() 125 req.project = project_url 126 req.authenticator = get_auth() 127 req.batch_id = 271 128 req.local_names = ('updater.cpp', 'kill_wu.cpp') 129 req.boinc_names = ('xxx_updater.cpp', 'xxx_kill_wu.cpp') 130 r = upload_files(req) 131 if r[0].tag == 'error': 132 print 'error: ', r[0].find('error_msg').text 133 return 134 print 'success' 135 }}} 136 112 137 == Per-user file sandbox == 113 138