-
Notifications
You must be signed in to change notification settings - Fork 395
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
Design a scalable approach to "viewer/blueprint commands" #8883
Comments
Any change we formulate as a change in blueprint will - if not handled in a special way - be an action that is on the undo stack in the viewer. Either we should come up with a mechanism that adds exceptions to that or treat some things to be outside of the blueprint. |
I believe it's important here to find a good way to logically decouple the concepts of:
Our current implementation of Blueprint lifecycle very much straddles the Data / Viewer divide in a way that makes this confusing to reason about. There are good motivations for how we got where we are, driven by the desire to declare the way the viewer should be configured from the same context where data is being produced. Strongly coupling that with the stream of data itself. In particular, this makes workflows like I suspect some part in the answer here makes sense when thinking about a single-producer multi-consumer setup.
My proposal is that the initial "viewer control" SDK should be decoupled from the recording stream and only apply to contexts where the SDK was used to spawn the viewer. A pattern like:
makes this somewhat explicit, and avoids situations where a viewer losers control of its interaction paradigm because it connected to an arbitrary stream just to see the data. |
I very sympathetic to the idea of "viewer control data" which is strictly client specific and believe we can go a step further and combine it with application settings. Application settings as a concept are fairly hidden right now and are the once piece that is already fully application specific. In a nutshell advantages of that would be:
Only drawback I can think of right now (there gotta be more) is the application settings screen becomes a partial view into this. But that's fine, it already is! E.g. zoom is persisted in the exact same way and doesn't show up there. Furthermore, I believe we can still have overlapping data in the blueprint. Time control settings could well reside in either. It does however open case-by-case questions of who overrides whom, might not always be clear (intuitively application settings/viewer control are the most highlevel though). |
We have a desire to trigger certain actions from our SDK that affects the viewer directly:
So far, only a few of these have been implemented, and in rather ad-hoc ways:
rerun/crates/store/re_protos/proto/rerun/v0/log_msg.proto
Lines 16 to 17 in 026d846
Where can we send these commands?
Blueprint changes
Some of these commands can be encoded as changes to the blueprint store.
This include setting the time state, once this is part of the blueprint.
Changes to blueprint can be implemented as any other store changes, i.e. by pushing a chunk (recordbatch).
Similarly, querying the blueprint state ("what is the time cursor at?") can be implemented as a data query.
Design
None yet, but it would be nice with something data driven, e.g. a protobuf definition of all commands as an
oneof
.Related issues
The text was updated successfully, but these errors were encountered: