DiamondLightSource / DiamondLightSource/blueapi

Message bus replacement service

Open
#1,326 7 comments 0 reactions 0 assignees View on GitHub
c: messaging c: rest api enhancement external
Dominant language
Python
Stars
13
Forks
13
Avg merge
2d 11h
Merged PRs (30d)
25

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.