-
Notifications
You must be signed in to change notification settings - Fork 13
Message bus replacement service #1326
Copy link
Copy link
Open
Labels
c: messagingRelates to asynchronous messaging codeRelates to asynchronous messaging codec: rest apiREST API changesREST API changesenhancementNew feature or requestNew feature or requestexternalIntegrations with the outside worldIntegrations with the outside world
Milestone
Metadata
Metadata
Assignees
Labels
c: messagingRelates to asynchronous messaging codeRelates to asynchronous messaging codec: rest apiREST API changesREST API changesenhancementNew feature or requestNew feature or requestexternalIntegrations with the outside worldIntegrations with the outside world
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 removesubmit_task,delete_submitted_task,get_tasks,set_active_taskandget_task.This could also enable us to support aborting plans if the client exits (eg
Ctrl-Cfrom the terminal aborts the plan) or pausing and resuming a plan within the same process.