-
Notifications
You must be signed in to change notification settings - Fork 52
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
Layouts for Bluesky data in Tiled #767
Comments
I should add that @dylanmcreynolds introduced the suggestion of adding "views" to tiled in a lengthy PR discussion with @padraic-shafer and me, in March. All of us were generally favorable on it. We set it aside to focus on delivering a |
This looks interesting! A few comments:
|
I just wrote up current thinking on that here. #778 |
In a follow-up conversations with @dylanmcreynolds and @padraic-shafer, an idea is taking shape that seems like a good starting point: CatalogAdapter is extended to accept some optional YAML config and constructs alternate view(s) of the content. The config would probably include literals, such as hard-coding a value for the key I think a good initial use case here is a view called |
This was worked out through a conversation with @whs92.
Current Status
Here is an example that works today. We start a tiled server with a database (SQLite or Postgres) and a writable directory. For simplicity, here we use a single-user server.
The experimental
TiledWriter
, created as part of the recently flyscanning effort, consumes Bluesky documents and makes API calls into Tiled. These calls can:The metadata and data can now be accessed via
curl
or via that Pythonclient
object.Design Goals
We want to represent metadata and data from Bluesky documents in Tiled structures (
container
,array
,table
) in a consistent, generic way for all Bluesky runs so that process is reversible. That is, we want to be able "replay" a semantically-equivalent document stream for the purposes of simulating what happened after the fact. This is useful for development and testing of streaming tools on old data.This requirement unavoidably leads to a nested and rather "busy" structure that has to hold data, timestamps, and configuration for all the streams in the BlueskyRun. We end up with URL paths like:
(Nexus has the same problem: this is an unavoidable consequence of collecting and organizing a lot of context.)
In some contexts, we need to present (a subset of) this information in a flatter form. When navigating the data in a UI, it should not take more than one or two clicks to get to the data of interest. Likewise, it should be possible to quickly get to the data in an interactive IPython or Jupyter session.
We also want to be able to present the metadata and data in layouts that adhere to defined standards, such as Nexus application definitions.
Possible Approaches
Client-side
We could arrange the data and metadata in Tiled "the Bluesky way" and use client code (in Python, React) etc. to fetch the data of interest and "rearrange" it into the desired layout. This has a couple downsides:
curl
cannot do this.Server-side
We could add to the Tiled server a concept of "views", where the metadata data are stored once but presented in a variety of layouts. It might look something like this:
The
TiledWriter
would create/{uuid}/streams/
, a consistent "ground truth" layout generated for all BlueskyRuns. Then, siblings like/{uuid}/simple/
and/{uuid}/NxXAS/
could be registered as "views". This could be done be a separate client or perhaps by extending/configuringTiledWriter
.I am wary of adding this concept to Tiled---something like a "view" or "alias" or "soft-link". It would have to be scoped very carefully, with implications for performance and access control taken into account from the start. But I am coming around to thinking that this is best way to address these use cases:
curl
my data as a Nexus fileThe text was updated successfully, but these errors were encountered: