-
Notifications
You must be signed in to change notification settings - Fork 65
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
Implement local disk storage #13
Comments
Something like this? https://gist.github.com/cddr/7eec70360439b4a83fa75ddb5cf94d08 There's definitely some subtleties to garbage collection I've missed but I'm not sure you'd want to do it in precisely the same way anyway. |
Wow, this is awesome! I am going to add a few comments to the code--I'm really excited for this :) The next step to look at will be adding this to |
Actually, I can't comment on the code, so I'll write my comments here: Does Besides thinking about ways to implement GC, I think that benchmarking is the next step, as that'll find any serialization edge cases and performance bottlenecks. Again, this is so cool! I can't wait to merge it! |
Actually I added the "on delete cascade" before I fully understood what was going on with ref-counting. For it to work the same as the ref counting, I think I'd need to add a trigger to maintain the Thanks for taking a look. |
The way I imagine implementing a tracing GC in the simplest case is this:
When the GC runs, it will start by deleting all the roots older than 1 hour (or whatever). Then, for the rest of the roots, it'll add them to the |
Another thing I'm wondering about is whether the backend should support any of the operations required by the outboard (e.g. named snapshots). On the one hand, it's nice not to have to do it but it seems like a recipe for confusion operationally. btw: the most recent commit adds a test like the one in redis_test so it seems to be working correctly. |
You know, I thought about whether the backend should support storing/naming roots, and at the time, I decided it wasn't necessary. The reason for this is that a named root simple needs to store the addr of the actual data, and the method for doing this could be nearly anything--from a simple Key/Value storage, to a key with a history of several roots. Ultimately, I thought of the backend protocol as being what's necessary for the data structure, and the naming/storage of the data structures is an application-level API concern. Put another way, I imagine there usually being an intermediate API between the HH tree and the application. |
We could build a fast local KV storage for the hitchhiker tree, so that it can run as an embedded persistent Datomic-like DB for local applications.
The text was updated successfully, but these errors were encountered: