Coda File System

Re: libdb

From: Jan Harkes <jaharkes_at_cs.cmu.edu>
Date: Tue, 1 Apr 2003 13:57:54 -0500
On Tue, Apr 01, 2003 at 08:17:10PM +0900, Stephen J. Turnbull wrote:
> Er ... has libdb disappeared from the most recent Coda CVS?  I can't
> log in and ldd (this is a Debian Linux system) says libdb is not linked.

Well it became virtually impossible to maintain code based on libdb
1.85. Redhat 8.0 and Debian-unstable only provide a precompiled version
for backward compatibility reasons, but the development package and
headers seem to have disappeared. It's a pity, it was nice to have a
reliable and stable database for simple lookups. The current sleepycat
libdb is really overkill and I've noticed that many/most opensource
projects have started to implement their own 'simple' databases. Samba
has tdb, enlightenment uses edb to make up for the loss of libdb1.85.

I looked at various solutions, such as including db1.85 in the Coda
sources or using one of the other databases that is still being
developed. Neither solution seemed right, so I finally decided to dust
off some code that uses Dan BernStein's cdb as an on-disk format, but
adds write capability. The cdb format is pretty fast, the codepath that
reads the database is probably less than 500 lines which make it easy to
maintain. The files can be read and recreated with Dan Bernstein's
tools, which makes them somewhat more accessible (if only pdbtool would
pack readable data instead of binary blobs).

There are still some optimizations left that I can use in the server.
Right now the database is reopened for every lookup, which is unnecessary.
rwcdb already has checks whether the underlying database file was
updated and only reopens it when necessary.

Jan
Received on 2003-04-01 14:02:56