On Wednesday 17 May 2006 7:48 am, Jamey Cribbs wrote:

> I've been doing some thinking about Logan's idea of offering a choice of
> multiple backends.  That sounds intriguing.  I could see that idea,
> coupled with something like qdbm, to provide different options for the
> user.

I wrote something a while back that might be helpful (or not).  I wanted a 
lightweight mechanism to persist data to disk via a hashlike interface.  I 
didn't want to use pstore because one pays a pretty high cost for each 
transaction once the data store gets any significant amount of data in it, 
and one has to go through extra effort to make pstore multiprocess safe.  I 
also wanted it to have flat RAM usage, regardless of the number of items in 
the data store.

What I ended up with is something that can be used as an LRU cache or simply a 
hash.  It is completely disk based and is multithread/multiprocess safe.  It 
still needs some love, but it works.

It's slower than pstore (when starting a transaction, performaing an action, 
closing a transaction) for small numbers of items in the data store, and much 
faster than pstore once the data store has a few thousand items.

I'm planning on packaging it up as a seperate micropackage in the IOWA area on 
Rubyforge.  It's probably no faster than Kirbybase is now, but if it might be 
useful in some capacity, I'll bump that up on my priority list.


Thanks

Kirk Haines