Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
DRAFT
Still sorting out the last details of keeping remote playback time in sync with local, and what to do when hitting the cache limit in various states
Time Estimate or Size
medium
long discussion below!
tl;dr is we can probably merge this feature with basic review, but this work might usefully branch into some deeper refactoring
Problem
Closes #423 advances #424
Solution
This is a working prototype or version of prefetching frames from networked/precomputed simulations. The primary idea here it to make explicit the difference between playback and streaming.
There are places now where the two are somewhat conflated, as in "pausing" means "pausing the stream of frames from the back end" and also means "stop advancing the rendered frame in the viewer"
isPaused
-> now:isStreaming
andisPlaybackPaused
I had a chat with @toloudis and looked at this todo in the
ISimulator
:I'd like to get some opinions and form a plan on touching up
ISimulator
and the websocket messaging protocol naming, in conjunction with the front end clarifying the naming of what is playback and what is streaming/communicating with the backend. This will be another step toward making live mode a reality, and building on the work @blairlyons and @ascibisz have been doing on the BioSimulators API.There was also discussion of whether the
SimulariumController
, which was originally intended to expose controls that the website might access, is doing to many things, and some new abstractions for managing streaming and loading of trajectories would be in order.I definitely don't want to charge into these APIs and start making a lot of changes, but looking at the todo above and chatting with @toloudis about it I do think its a good moment to step back and look at this! Maybe a good topic to touch on at PM meeting on 12/10 or go more in depth at dev meeting 12/17? Or bump to 2025.
Either way, this feature branch works, makes prefetching a thing, and can move forward independent of the discussion above, but it's all connected.
Steps to Verify: