Skip to content

Implement endpoint "POST /tasks" #19

Closed

Description

@uniqueg

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:

Describe alternatives you've considered
N/A

Additional context
Depends on issue #17 being resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions