[DGD] DGD and *dbm

bart at wotf.org bart at wotf.org
Mon Jul 21 13:38:32 CEST 2008


Hey,

I am playing with an idea and I was wondering if anyone else looked into this
before..

The idea I'm playing with is to add support for one of the *dbm packages (bdb,
gdbm, tdbm etc). This would serve a number of purposes, including storage of
huge amounts of (potentially large) key:value pairs, and possibly, use it to
share data with external applications.

The questions I have:
Because any such dbm might take a fair amount of time to return some results,
I'm considering a callback mechanism to return results. This breaks
continuity, ie, you have to request data, and then wait for the callback
instead of being able to do something like var = dbm_get(key). I'm not sure if
this is really needed when requesting a single key:value pair tho. Any
experience with this?

Since there can be more key:value pairs in such a dbm then fit in an array or
mapping, it won't be possible to get a list of all keys or values directly, I
am considering returning a range (of max max_array elements), based on
start/end arguments (ie, arr = dbm_keys(x,y); ). Any thoughts on this?

Right now, I am considering a setup where there exist special 'dbm' objects,
similar to user objects. An object is bound to a single database.

Last but not least (I know.. license question.. should check with a lawyer),
from my understanding, bdb and gdbm contain license restrictions which would
allow me to do this for my own mud, but not distribute the results. tdbm seems
to not have this problem. Anyone looked at this before?

Note, this is just a bit of an experiment for now, no guarantees that I'll
actually get to implement it, for now I'm just looking at what it takes.

Bart.

--
Created with Open WebMail at http://www.bartsplace.net/
Read my weblog at http://soapbox.bartsplace.net/




More information about the DGD mailing list