Tokyo Cabinet and Python
Tokyo Cabinet is a library for key-value database management developed by Mikio Hirabayashi. It's used on a very big site mixi.jp (and others). Tokyo Cabinet is a simple and scalable way to store data. There are also few additions - Tokyo Tyrant which is a server for Cabinet databases, Tokyo Dystopia which is a library for fulltext searches for those databases. All libraries are written in C and released on LGPL license.
./configure --prefix=/usr make make install
import pytyrant t = pytyrant.PyTyrant.open('127.0.0.1', 1978) t['__test_key__'] = 'foo' t.concat('__test_key__', 'bar') print t['__test_key__'] del t['__test_key__'] for i in range(1, 100000): key = 'k%s' % i t[key] = str(i) print i print print 'read' for i in range(1, 100000): key = 'k%s' % i print t[key]
On Slideshare you can find nice slides: Building TweetReach with Sinatra, Tokyo Cabinet and Grackle: Austin on Rails, Pylons + Tokyo Cabinet, Introduction to Tokyo Products. Plurk used Tokyo Cabinet for its database LightCloud, which is a "better" memcache replacement.