Support getSync for rave-level followers, refactor connection flow#5
Open
germanoeich wants to merge 4 commits into
Open
Support getSync for rave-level followers, refactor connection flow#5germanoeich wants to merge 4 commits into
germanoeich wants to merge 4 commits into
Conversation
|
This is admittedly a bit tricky to make consistent, but would it be possible to add a test that ensure |
Author
|
@oneirocosm Its tricky, since this has a leader and follower model we could spawn two processes, bootstrap rave-level and a leader and run a background worker as follower, but inspecting the worker and the setup for this will be really clunky, I'd rather avoid it to be honest |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Refactors the connection flows.
Adds
getSync()support to rave-level on top of the new many-level opt-in hook.Changes:
getSyncin the rave-level guest optionsget-sync.jshelper for the blocking follower implementationgetSync()by doing the async socket read in a worker thread, while the caller blocks withAtomics.wait()getSyncgetSyncgetSyncNotes
This PR depends on the many-level PR that adds opt-in
getSyncsupport. Before merge, the many-level dependency hash should be updated to the merged many-level commit.Follower
getSync({ snapshot })is explicitly rejected withLEVEL_NOT_SUPPORTED. Supporting that correctly would require a broader distributed snapshot identity / lifetime model, which is intentionally out of scope here.Related PR: ForgeVTT/many-level#3