Changes between Version 51 and Version 52 of RemoteJobs


Ignore:
Timestamp:
Jan 20, 2017, 3:26:26 PM (8 years ago)
Author:
davea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • RemoteJobs

    v51 v52  
    1212
    1313At the bottom level, the interface consists of Web RPCs.
    14 BOINC provides client-side bindings in PHP and C++.
     14BOINC provides client-side bindings in PHP, C++, and Python.
    1515These bindings differ slightly; they expose different details of the Web RPCs.
    1616
    17 As jobs are completed, their output files are available to the submitting user via HTTP.
    18 When a batch is complete, a zipped archive of all its output files is available via HTTP.
    19 Details are [RemoteOutputFiles here].
     17Interfaces for [RemoteInputFiles staging input files]
     18and [RemoteOutputFiles fetching output files] are described separately.
     19
     20There are various options for managing input files.
     21If you use the [RemoteInputFiles#Job-basedfilemanagement Job-based file management],
     22which maintains batch/file associations,
     23the order of operations is:
     24
     25 * Create a batch (initially empty); returns the batch ID.
     26 * Stage input files, passing the batch ID
     27 * Submit jobs, passing the batch ID
     28
     29If you manage input files a different way,
     30then you create the batch and submit jobs in a single API call.
    2031
    2132== PHP interface ==
     
    3546 * '''app_name''': the name of the application for which jobs are being submitted
    3647 * '''batch_name''': a symbolic name for the batch.
    37     Need not be unique.
    38     If omitted, a name of the form "batch_unixtime" will be used.
     48   Need not be unique.
     49   If omitted, a name of the form "batch_unixtime" will be used.
    3950 * '''workunit_template_file''': an optional [JobTemplates input template file name].
    4051 * '''result_template_file''': an optional [JobTemplates output template file name].
     
    454465struct JOB_STATUS {
    455466    string job_name;
    456     string status;              // DONE, ERROR, or IN_PROGRESS
     467    string status;           // DONE, ERROR, or IN_PROGRESS
    457468};
    458469
     
    467478
    468479The file tools/submit_api.py contains a Python binding of some of above RPCs.
    469 For examples of its use, se tools/submit_api_test.py.
     480For examples of its use, see tools/submit_api_test.py.
    470481
    471482To build a description of a batch of jobs,
    472 use the BATCH_DESC, JOB_DESC, and FILE_DESC objects:
     483use the BATCH_DESC, JOB_DESC, and FILE_DESC classes:
    473484{{{
    474485def make_batch():
     
    487498    batch.app_name = "uppercase"
    488499    batch.batch_name = "blah"
     500    # or batch_id = n, if you previously created an empty batch.
    489501    batch.jobs = []
    490502
     
    498510You can then pass this to either estimate_batch() or submit_batch():
    499511{{{
     512    from submit_api import *
    500513    batch = make_batch()
    501514    r = estimate_batch(batch)
     
    533546}}}
    534547
    535 Other available functions include
    536 {{{
    537 abort_batch()
    538 abort_jobs()
    539 create_batch()
    540 query_batches()
    541 query_completed_job()
    542 query_job()
    543 get_output_file()
    544 retire_batch()
    545 }}}
     548Possible attributes of FILE_DESC:
     549 * mode
     550 * url
     551 * nbytes
     552 * md5
     553 * source
     554
     555Possible attributes of JOB_DESC:
     556 * rsc_fpops
     557 * command_line
     558 * wu_template
     559 * result_template
     560 * files (list of FILE_DESC)
     561
     562Possible attributes of BATCH_DESC:
     563 * project (URL of project)
     564 * authenticator (submitter's account key)
     565 * app_name
     566 * batch_id
     567 * batch_name
     568 * jobs (list of JOB_DESC)
     569
     570Available functions are listed below.
     571Each function takes a request object whose attributes include
     572at least project and authenticator.
     573
     574 abort_batch(req)::
     575    req attributes: batch_id
     576 abort_jobs(req)::
     577    req attributes: jobs (list of job names)
     578 create_batch(req)::
     579    req attributes: app_name, batch_name, expire_time
     580 estimate_batch(req)::
     581    req is a BATCH_DESC
     582 query_batche(req)::
     583    req attributes: batch_id, get_cpu_time
     584 query_batches(req)::
     585    req attributes_ get_cpu_time
     586 query_completed_job(req)::
     587    req attributes: job_name
     588 query_job(req)::
     589    req attributes: job_id
     590 get_output_file(req)::
     591    req attributes: instance_name, file_num
     592 get_output_files(req)::
     593    req attributes: batch_id
     594 retire_batch(req)::
     595    req attributes: batch_id
    546596
    547597== HTTP/XML interface ==
     
    563613applications and web site.
    564614
     615