Abstract storage engine as an option #46
Open
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.
Hello,
Congrats on the great project! I am using it in something I am developing and thought I would contribute the changes upstream.
I wanted to abstract away the storage engine to be an option. I am using CubDB to build P2P sharable immutable trees: https://github.com/SoCal-Software-Labs/CrissCross
A simple example of how to build a merkle tree with CubDB with these changes:
https://gist.github.com/hansonkd/a0a974704a8483216dca2a1e79c00e62
I think this is really powerful because it allows you to abstract KV stores on top of whatever backend you want (you can add layers of caching or other middlewares too)
In addition the location type should be dependent on the store. That way a store can have whatever location object type it wants.