-
Notifications
You must be signed in to change notification settings - Fork 8
Description
The server and client currently communicate via both HTTP/rest and an external message bus. This adds a fair amount of complexity, especially around the submission of tasks where two requests are required separated by subscription to the message bus and the task worker has to keep track of multiple submitted but unstarted tasks.
A simpler approach could be to use a long lived HTTP connection that streams the events directly to the client. This could potentially be gRPC or websockets (or something else?).
We would then be left with a single run_plan(name, args) endpoint and could remove submit_task, delete_submitted_task, get_tasks, set_active_task and get_task.
This could also enable us to support aborting plans if the client exits (eg Ctrl-C from the terminal aborts the plan) or pausing and resuming a plan within the same process.