Add some supporting stuff for future plum trees #33
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.
Currently, there is WGPS'
this.reconcilerMap
which maps intersections (based on the peers' aoi handles) to aReconciler
.isEager
could be squeezed in there, renaming the map tointersectionMap
or something, which hosts both theReconciler
andisEager
. Not sure what's cleaner: keeping them together under one Intersection, or have them separated because they don't actually share anything. Also in pre-willow earthstar it seems the live syncing was done after reconciliation. However, I think it needs to be done at the same time, for the case when an entry gets inserted during reconciliation.Down the road we also need an efficient way of finding intersections based on an entry's position for the requested eagerness.
For the plum tree manager I thought of the following architecture: a plum tree manager that the user adds WGPS to. WGPS dispatches 'intersection' events. For each intersection the manager either creates a new plum tree or gets a running one. This plum tree listens to the intersection.namespace's store for PayloadEvents, and forwards entries/changes eagerness with the API of this PR. So the WGPS doesn't need to know about
PlumtreeManager
and can run without one.Any oversights/things I should change? :-)