DiamondLightSource / DiamondLightSource/blueapi
Support websocket connection in scripting interface
- Dominant language
- Python
- Stars
- 13
- Forks
- 13
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 25
Description
The `BlueapiClient` support for running plans via websockets is limited to the new `run_blocking` method. The scripting interface (eg `bc.plans.count(...)`) still uses the existing stomp connection.
While the websocket connection is still experimental, there should be some way of opting in to use it for the scripting as well. Potentially an option on the client? on the plan cache?
```python
# option on the client
bc.use_websockets = True
# option on the plan cache
bc.plans._websockets = True
```
Is there a simpler/more convenient approach?
Contributor guide
Research direction
Start with the BlueapiClient scripting interface, including bc.plans and the existing run_blocking websocket path, and compare it with the current STOMP-based behavior. Review the open pull request #1646 before proposing an opt-in design. Done means scripting calls such as bc.plans.count(...) can use websockets through a clear client or plan-cache option.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100