Repository navigation
Description
Is your feature request related to a problem? Please describe.
proTES should respond to all TES requests in the most reasonable or helpful way in a spec-conformant way.
In the case of the POST /tasks endpoint, this basically means that the task should be forwarded to a suitable TES endpoint after passing through some middleware.
Describe the solution you'd like
An ID for the task should be generated and stored in the database, together with metadata. The task should then be placed on a message broker and its ID returned to the caller. Afterwards, the task should be asynchronously picked up by a worker, passing through middleware (only generically implemented here) and eventually relayed to a TES endpoint. The task's database entry should then be updated with the TES instance URL and the returned TES ID (i.e., there will be two TES IDs, proTES's internal one that was returned to the caller, as well as the one generated by the TES instance that actually carries out the computation). In lieu of a callback mechanism that would allow the compute TES to proactively update task state changes during processing, TES should then be continuously polled for status changes, which should be monitored by a task monitor daemon. The entire process is almost entirely identical to that for the POST /runs endpoint in WES-ELIXIR, implemented in files:
- https://github.com/elixir-europe/WES-ELIXIR/blob/dev/wes_elixir/ga4gh/wes/server.py
- https://github.com/elixir-europe/WES-ELIXIR/blob/dev/wes_elixir/ga4gh/wes/endpoints/run_workflow.py
- Several more files in the
WES-ELIXIRrepo can be used as guides for this, such as those required for the RabbitMQ broker, Celery workers and task monitor.
Describe alternatives you've considered
N/A
Additional context
Depends on issue #17 being resolved.
Activity