MemcacheDB. A server that speaks the memcache protocol but uses Berkeley DB for reliable persistent storage. Speedy: 20,000 writes/second and 60,000+ reads/second. Includes a full replication mechanism (with custom memcache protocol commands) based on Berkeley DB’s.
But what's the advantage over using BDB directly? Since Memcachedb is a persistence mechanism, not a caching mechanism, you wouldn't want to swap it in for your existing Memcached backend--so adapting BDB to the Memcached API seems a bit redundant.
Is it that the Memcached API has nicer/more familiar semantics? Or just that Memcached has wider client API support than BDB?
phl - 5th January 2009 13:33 - #
The principle advantage is that it gives you a network protocol with which to talk to BDB, along with a bunch of pre-written (and tested) client libraries in pretty much any language you can mention. I'd personally much rather use this than use complied Python bindings.
Ah, network access. That makes sense.
phl - 5th January 2009 14:43 - #
It's certainly a bit odd that someone would want to use BDB instead of RAM for a memcached backend, but if you look at this as simply a way to access BDB over the network, it makes sense. It seems like it should have been named more appropriately, though. I'd call it BDBd.
I agree that the name is a bit confusing as this is clearly not a (mem)cache.
The payoff for using memcached on the front end is the rock solid high concurrency supported by using libevent/epoll. That and the client libraries of course.
I think that's a very clever use of memcached -- lot's of value as a starting point for a data store.
The one caveat that I can see (and this is a due to Berkley DB) is that you have to specify a maximum record size, which can be a difficult thing to get right -- especially if you're serializing objects, etc.
scott - 6th January 2009 02:55 - #
And on the same topic, have you taken a look at Tokyo Cabinet and its sister project Tokyo Tyrant? Tokyo Tyrant works along the same lines as MemcacheDB, which Tokyo Cabinet acting as its backend database, and I have to say, Tokyo Cabinet is blazingly fast! And as a bonus, Tokyo Tyrant also support's memcached's protocol.