-
Notifications
You must be signed in to change notification settings - Fork 24
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
HAMT diff #92
Comments
I want to share a use case for this feature: For Noosphere, we keep a simple changelog that expresses the delta changes to a HAMT in terms of add and remove operations, where add encompasses both insert and update. We use this to infer a sparse CAR that represents the blocks needed to recreate a change to the data at any given revision assuming you already have all the blocks for the previous revision. This allows us to send fairly compact bundles of blocks when sync'ing changes to our data structure. Short of CAR Mirror existing in a form we can use, we would need some way to do this same thing with WNFS in order for it to be a viable alternative to our current approach to storing content. The ability to diff two versions of the filesystem would probably satisfy this need for us. |
@cdata Thanks for the input! There's a slight difference between that version of diffing and the diffing on HAMTs we're building. |
That's exactly what we do today with the changelog, so this is the feature I'm looking for (I think). I vaguely assumed that CAR Mirror could spare us from this book keeping, but maybe it has other uses (or maybe my assumption was wrong). |
Which book keeping are you referring to? |
Per my original comment, this is what we do today:
In other words, we are using a changelog to track the delta e.g., which key/value pairs were added or removed from a HAMT between any two versions. Today this is essential to our synchronization strategy because we don't have a sophisticated solution to synchronize blocks (like CAR Mirror), and instead rely on these HAMT deltas to decide which bits of user content need to be transferred given a range of versions of our data structure. |
Allows us to see differences between two HAMT nodes.
This allows us to see what's changed between changes in the filesystem and enables checking writes.
The text was updated successfully, but these errors were encountered: