This document presents the initial design of the API for external computing services. It is not the API specification, which is the topic of MS 5.13 API Baseline Documentation due for release at the end of March 2011.
Overview:
A ScratchPad (at NHM) posts a job request to the Job Scheduler (at Oxford). Authentication is simple as there is essentially only one authentic user (the ScratchPad server at the NHM, or a few such servers if more than one.)
The Job Scheduler enters the job in its Job Table and retrieves data files based on information in the post. The job is sent to the appropriate service (at Oxford or elsewhere). On completion of the job the Job Scheduler updates the Job Table with a job completed status flag and an output url.
The ScratchPad server polls the Job Table until the completed status flag is returned and then fetches the output from the supplied url.
Implementation:
Ruby on Rails to be used, with MongoDB as the database. This choice of database is anticipated as allowing more flexibility for dealing with job parameters than a standard relational database.
ScratchPad to post data to the Job Scheduler, comprising of job type, user id and a URL for the data files. The system will then wget the files. Post to be on port 443 using certificate authentication.
Information to be stored in a "jobs" table using a "job" model. This will contain:
Rails job id
NHM supplied user id
Job type
Location of data file(s) (URL)
Job status (an integer, pending, sent, processing, finished, error etc.)
An array of any parameters required for the job.
Whilst the job is running the ScratchPad should poll a URL using their job ID which would find_by_id and return the info. by rendering JSON.
Submission to the remote service would presumably have to be by means of a Rake task run from cron, to process any pending jobs and attempt to submit them to the processing service.
An implication for the ScratchPad server(s) is that the ScratchPad code would require forms for job submission to be added, and certificates would be needed on the server(s) for authentication against one held at Oxford.
Details of the data processing service still undetermined but we hope that it will be able to post queries back (see the separate data_service_post controller above).
The above scenario was informed by discussion around the following drawing:
Comments
Completed
Authors: Neil Caithness, Milo Thurston
Revision: 1.0
This document presents the initial design of the API for external computing services. It is not the API specification, which is the topic of MS 5.13 API Baseline Documentation due for release at the end of March 2011.
Overview:
Implementation:
The above scenario was informed by discussion around the following drawing:
Revisions anticipated.
Comments welcome.
NC/MT