The following is an attempt to describe the Batch Processing Service at a level to inspire SuperTask working group discussions.     Many internal details of batch processing have been omitted from this document in order to focus on items relevant to the Supertask WG discussions.   Also we tried to minimize explicit assigning of statements with the exception of science pipelines must use a Butler repository.     After an initial walk through of this page in a WG meeting, it is expected that several pieces will need to be detailed further.


Things to keep in mind while reading

Batch Processing

  1. Operator configures campaign (one or more executions of pipelines)

    1. Sets values needed to determine calibration sets, input sets, etc

    2. Sets “sequence” of steps (TBD: determine pipeline language for operator)

  2. Operator submits campaign configuration (TBD: including the butler mapper policy in order to name output files (how flexible is butler file naming i.e., can new variables/data ids be added without code changes) and more)

  3. Campaign manager/Operator enqueues pipelines for execution

    (let’s examine a single pipeline)

  4. Save submission/framework config file(s) as provenance for pipeline (possibly just as data files)

  5. Converts generic/abstract pipeline description to expanded/specific pipeline description/graph that contains exact number of steps, dataset types, data ids and filenames

    1. If cannot determine inputs for a step until after a previous step has finished, this is a separate sub-graph of the pipeline that starts back over at step 5

  6. Using expanded pipeline graph, get input filenames and call DBB to pre-stage input files from tape to disk within Data Backbone.

  7. If need to convert DB data into files, do so now  (e.g., reference catalog)

    1. Note:   May be sqlite files to still allow DB-style operations

    2. These files should be tracked in DBB for provenance.

  8. If shared filesystem available at computing site, pre-stage input files to shared filesystem.

    1. Any file tracking system for the computing site cache needs to be updated

  9. Create workflow (needs input filenames and unique output filenames for each step)

  10. Allocate compute resources

  11. Within job on compute node

    1. Stage input data (file and metadata file) to compute node (could be to local disk)

      1. If shared filesystem available, create symlinks to files or copy files to local disk (which ever works better for the compute site)

      2. If no shared filesystem available, will need to retrieve from central Data Backbone

    2. Gather job provenance (information such as actual job environment that cannot be done outside of a job)

    3. Initialize job-specific input butler repo (for each input file, needs mapping of data id + dataset type to where currently located. In some cases also need “metadata” (TBD) to initialize the input butler)

    4. Runs task sending output data to output butler repo

    5. Put files in workflow friendly directory structure if workflow isn’t going to manage files directly in output butler repo

    6. Gather information about each output file (including log files):

      1. (should already know data id + dataset type)

      2. science metadata (based upon full dataset type (must uniquely determine what metadata values to gather – if dataset type is not enough to uniquely determine this, we need another “type” label))

      3. physical attributes (filesize, md5sum)

      4. provenance (minimum, was-generated-by which ties files to the step that generated them)

      5. (optional – operator setting) Create junk tarball of output files not known to be valid output file

    7. Gather runtime stats for each step (e.g., start/end times, memory usage, etc)

    8. Stage output data out from compute node

      1. If shared filesystem available, local copy operation

        1. If shared filesystem is tracked by data backbone, DBB’s file catalog needs to be updated (TBD – file catalog centralized (e.g., oracle DB), local to shared filesystem (e.g., sqlite3), or some combination of both.

      2. If no shared filesystem available, will need to push files to central Data Backbone.

  12. End-pipeline: Ingest object catalogs, logs, metadata, file provenance, etc into appropriate DB/services if not done from within job.

  13. Repeat from 5 if needed (for portions of pipeline that need cannot determine work until after previous steps complete)

  14. End-pipeline: Stage output files from shared filesystem back to central DBB.

  15. Clean up shared filesystem post-pipeline (intermediate files within pipeline)

  16. Clean up shared filesystem end campaign (files shared by pipelines)

Example Operations Needs  (Not complete list)

Notes: