Search code examples
nosqlredisriaktokyo-tyrantleveldb

How does Leveldb compare with Redis or Riak or Tokyo Tyrant?


Leveldb seems to be a new interesting persistent key value store from Google. How does Leveldb differ from Redis or Riak or Tokyo Tyrant? In what specific use cases is one better than the other?


Solution

  • I find I disagree a bit with colum's criteria though the differences between leveldb and Redis he points out are spot on.

    Do you need concurrency? I'd go with Redis. I say this because Redis already has the code written to handle it. Any time I can use well-written Other People's Code to handle concurrency, so much the better. I don't simply mean multi-threaded apps, but include in this the notion of multiple processes - be they on the same system or not. Even then, not needing to write and debug locking in a multi-threaded app has a big advantage in my eyes.

    Do you want it completely self-contained within the app? Go with leveldb as it is a library. Do need or want more than just a k/v? Go with Redis.

    I'm only commenting on the leveldb or Redis aspect as I don't consider myself fluent enough yet in Riak or TT to comment on their better suits.

    In short if all you are looking for is persistent key-value store in a single-threaded app then leveldb is the option to choose among your list (another would be Tokyo cabinet or good ole BerkleyDB or even sqlite). But if you want more than that, choose one of the others.

    [edit: updated explanation wrt. concurrency]