Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Demonstrate Bluesky in a single process #5

Open
danielballan opened this issue Nov 11, 2023 · 4 comments
Open

Demonstrate Bluesky in a single process #5

danielballan opened this issue Nov 11, 2023 · 4 comments

Comments

@danielballan
Copy link
Member

Show how to run Tiled and RunEngine in a single process.

@przluca
Copy link

przluca commented Nov 14, 2023

Hi, what do you mean by single process? Can you describe your intentions?

@danielballan
Copy link
Member Author

danielballan commented Nov 14, 2023

One of the design goals of Bluesky is to "scale down", to be easy to set up and run on a laptop without configuring a bunch of services.

For example, Bluesky can be used in IPython, with EPICS connections (via ophyd and pyepics), visualization (via interactive matplotlib figures in Qt windows), and data persistence (via writes to MongoDB via pymongo) happening in a single process.

Tiled/Databroker 2.0 introduces an HTTP server into this stack, which would typically be launched as a separate service, and would sit between Bluesky and MongoDB. For secure, production, scalable deployments, that process-separation is standard and encouraged. For experimentation or minimalist deployments, it is possible to run the Tiled server in-process. (The event loop of the server is run on a background thread, and HTTP messages are passed over the ASGI protocol via Python function calls rather than network send/recv calls.)

@untzag
Copy link
Member

untzag commented Nov 14, 2023

I'm more interested in documenting workflows including suitcase-csv and custom domain-specific serializers. Even if everything is in one process, applications like tiled still really want to run persistently. At the smallest scale, I want researchers to be able to run bluesky plans in scripts and monolithic graphical applications with ZERO persistent services.

@untzag
Copy link
Member

untzag commented Nov 14, 2023

I'm not a tiled user at this time, so I might just not understand what the advantages are at the smallest scale of instrumentation. Workflows are hodgepodge, and for better or worse people really love having a local "raw data" folder on their hard-drive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants