-
-
Notifications
You must be signed in to change notification settings - Fork 55
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
WIP: Add support for Bitcask #138
base: v2
Are you sure you want to change the base?
Conversation
That's better. To test this branch (not yet fully working):
|
Ahh I think I've found my first problem. These lines Lines 92 to 95 in aa688ad
bitcask.ErrKeyNotFound error a a nil value. We don't assume values that are nil are "not found" Hmmm what to do... 🤔
|
Nice, that got things working a little better 🥳
|
Most tests pass now, except thi sone:
Which appears to be "handing" hmmm |
Hey, @prologic, first of all thank you for the PR and the interest in clover. |
Yes it does. |
Once I get this working, are we good to merge this without full transaction support? (which Bitcask has never had support for, until now, which is going to be possible since I'm nearing making a decision to swap out the internal trie implementation that's used) |
Any advantage is using |
Based on this comparison of nutsdb vs. others the main advantage of using Bitcask is its use of a trie:
Otherwise I'm not really that familiar with NutsDB myself, and it looks like it was developed around the same time I was developing Bitcask (although I no longer actively use Github to store/collaborate on my projects anymore :/) I've not done any other types of comparisons either and don't really want to get into "benchmark wars" 🤣 -- As an aside, I've used Bitcaks in many production projects, and it's used a few bit around the place if you look here |
I'm also thinking about and planning to extend Bitcask's functionality a bit to support flushing the keyspace out to disk and using something like SSTables in additional to the WAL+LSM and Radix tree already in use. My hope/goal is to be able to use Bitcask for much larger datasets, where currently the limiting factor is "the entire keyspace has to be held in memory". |
If I can ask, do you need to run |
I was intending to use it for a new production project (startup). yes. Why's that? 🤔 |
BTW, my main concern for |
Just interested in the usage :=) |
Hmm have a few more tests to figure out why they're failing... Example:
|
I will likely be adding this support, so we should be all good 👌 |
I basically don't want to reinvent my own "document storage" engine 🤣 You seem to have done s nice job of that already 🤣 -- I have this really long standing PR where it adds List, Hash and SortedSet data structure to Bitcask, but honestly no-one (myself included) have really ever bothered using this 😅 So it justs sits there. There is also bitraft which also uses Bitcask internally that once day I hope to spend a bit more time with 🤔 |
BTW, before starting clover project, I did an attempt to implement a bitcask based storage engine too: https://github.com/ostafen/eagle (it's mainly experimental). I also used your project as a reference. |
I would love that ! 😍 I've had many good contributors come and go over the years and many folks love my version of Bitcask 😅 (I do too!) -- It's not perfect, but it works quite well and I use it everywhere. I'd still love to keep improving it, optimizing it and making it one of the best pure-Go KV stores around (although Badger, BBolt and others are pretty good too, but pro/cons 🤷♂️) |
If you are interested maybe we can continue our discussion about this privately |
Sure thing! |
or perhaps you are also ok to continue to discuss that here publicly
let's learn about that too :sweet_smile:
…--
shane.xb.qian
|
@prologic: could you share some contact info? Email address? |
On my website and twtxt.net/~prologic 👌 |
Cool, sent you an email |
This PR adds (or tries to so far) support for Bitcask an embedded KV store that uses a WAL+LSM and is optimized for sequential writes, fast low latency reads and high throughput.
This is still a work-in-progress as I've had to make changes in Bitcask itself in the refactor_trie branch which adds support for an Iterator/Custor (and I may also add support for Transactions too!)
The tests are not yet passing, and I need some help with this actually as I may have gotten some of the implementation wrong 🤔