Upstream Task API
Relay supports connecting to an upstream Task API, so that it can fetch supported tasks from that system and federate them downstream.
This is Relay’s default mode of operation, but it can be disabled.
Behaviour
Relay regularly polls all configured Task API queues in parallel, using the Task API’s nextjob
endpoint, and the configured Collection details.
By default, a Relay instance will try to poll for tasks in separate Availability and Distribution queues, every 5 seconds.
This polling behaviour can be configured.
When a task is received from the Task API queue, Relay creates a Task
record in its local datastore, as well as Subtask
s for each registered subnode.
The upstream task payload is then queued downstream for each subnode.
Once Relay has received results from all subnodes - or the Task expiry threshold has been reached - Relay will produce aggregated results to send back to the Upstream Task API at its results
endpoint.
Note that Relay only uses the endpoints described herein and does not provide other Link Connector features.
Relay only fetches supported Tasks, and returns only inline results payloads.
Task support
Relay supports Availability tasks and Distribution tasks (Generic Code and Demographics).
Relay will only poll queues for supported task types (as configured).
If Relay receives a task type it cannot handle from a queue it is polling, it will ignore that task.
See also
- Relay also supports the GA4GH Beacon API as a query source
- Explore deploying Relay