4 ms·
I have built a distributed key-value store on top of Tokyo Tyrant (which is a network interface on top of Tokyo Cabinet). I have also tried to use memcachedb (t
by amix 18y ago
I have built a distributed key-value store on top of Tokyo Tyrant (which is a network interface on top of Tokyo Cabinet). I have also tried to use memcachedb (that's based on Berkley DB) and Tokyo Tyrant outperforms it - especially with large amounts of items. memcachedb has also problems with log (it grows furiously large and db checkpoints stalls the database for several seconds).
One can also script Tyrant via Lua (which is pretty amazing) and there's master-master replication. Here's how to implement incr via Lua: http://paste.pocoo.org/show/103848/ http://paste.pocoo.org/show/103848/ I have currently extended it with a fixed list and Mikio (the dev of Tokyo *) has implemented an inverted index for search.
Currently I have my key-value store in production (it has around 1 million key-values) and the performance is pretty good.
I will release it open-source, it's only Python now, but the code is around 200 lines + a consistent hash library implementation ( which I implemented in <50 lines of code http://amix.dk/blog/viewEntry/19367 http://amix.dk/blog/viewEntry/19367 ) so it should be possible to port it over.
- babo 18y agoIs there something like CAS of memcached? It's fine to live without locking but low-level atomic functionality is essential.