AnyDBM uses a DBM to implement persistent objects in C++.
It is developed primarily for Internet Server programming, including
persistent CGI and ECGI, but is sufficiently generalised to be
of possible use in other applications.
It is not "yet another DBM package", in the sense that Berkeley DB
followed GDBM followed NDBM followed DBM. Rather it is a high-level
templated front-end to all these DBM packages. It complements, but
does not substitute, any of these packages.
Why AnyDBM?
It's happened to me - many times. My program is based on, say,
Berkeley DB. I need to install it on a Client's machine. But Berkeley DB
isn't there, and refuses to build cleanly, while NDBM and GDBM sit there
smiling at me ...
... so I wrote a Unified Interface, and eliminated the headache!
AnyDBM is a completely unified interface to the various DBM packages.
The underlying implementor is merely a Template parameter. Programs
written with AnyDBM can change between the different DBMs without
touching the source code!
AnyDBM includes RDBM-lite, enabling any AnyDBM
program to work as a Network Client or as a direct DBM user, again
without changing the source code. Server implementations of RDBM
for each of the DBMs supported are included in the distribution.
AnyDBM is templatized to store user-defined objects
as opposed to just character strings (or "datum" or "DBT" types).
AnyDBM offers transparent Associative Array and Iterator notation.
Implementation
AnyDBM comprises the following:
Tie - A templatized Associative Array class that
stores user-defined objects using a user-selected DBM implementation.
BASE_DBM - Virtual Base class defining the Interface for all the
implementations, and a default DBM locking regime
Implementations: DB_HASH, DB_BTREE, DB_RECNO using Berkeley DB;
GDBM and NDBM
RDBM - A Network Client DBM implementation
RDBM_C - An RDBM interface for C programmers
DBServer - A template for generating Servers for RDBM
rdbm rpcgen code - the physical Client-Server interface for RDBM
DATUM - a class unifying the data structures required by the
different DBMs.
LOCKMGR - Classes implementing different locking regimes within
an RDBM Server
Example program, and a Server implementation (usable with any
of the underlying DBMs supported).