[nzlug] Embedded DB engine for Perl

Michal Ludvig michal at logix.cz
Tue Oct 3 23:23:22 NZDT 2006


Hi all,

I'm writing a perl script that will run in many instances on the same
machine at once and these instances need share some simple key->value
data pairs.

I tried to store these data in a QDBM database but with that engine the
first script instance locks the DB file and no other process can open
it. Opening/closing before every read/write is a no go because it takes
too long. When the DB was open with no-lock option (I serialized access
to the file externally) it wasn't much better either because QDBM does
some caching and changes made by one process were not immediately
available in other ones.

Does anyone know of a simple DB engine that can be used as I described?
I don't need a full SQL - really storing one string and access it
reasonably fast with a key is all I want. If I don't find anything
usable I'll need to go with MySQL but that creates unneeded dependency
that I want to avoid.

FWIW The instances are created independently by 3rd process, not from
the same parent with fork() and are not threads of the same process.

Michal




More information about the NZLUG mailing list