BerkeleyDB RPC support

Stephen L. Ulmer ulmer at ufl.edu
Mon Jan 6 13:49:22 EST 2003


Greetings,

I'm interested in using the built-in RPC support in BerkeleyDB 4.x to
network-abstract access to the mailboxes.db (and maybe other
BerkeleyDBs).

I did some experiments, and hacked-up the db3 back-end to do this (and
am actually using it right now :).  I believe that it'll be easy to
add a db3-rpc (analogous db3 and db3-nosync) back-end.

There is only one reason to change code outside the cyrusdb back-end:
the full path to the database is carried around as the way to get to
it.  It looks like lots of places just take the "config directory"
path and append the database name (e.g. mailboxes.db), usually from a
#define.

Up until now that made perfect sense -- every database type needed
only a filename to identify it.

If that (char *) were to be just the "name" of the database (i.e.,
"mailboxes"), then each back-end could do the appropriate thing (look
up other configuration directives to find the database: hostnames,
full path names, SQL database/table names; add the .db onto the end,
whatever).  Then every kind of DB that's been discussed here
(Berkeley, SQL, skiplist, flat, whatever) could be represented, and
adding other back-ends wouldn't require changes to other parts of the
code.

How do the maintainers feel about this?  I'm definitely willing to
write my own back-end. I think I can "fix" all of the other places in
the code that would require changes (it seems like a very small
change).  I just want to make changes that will be accepted and
mainstreamed...

I'm currently using cyrus-imapd 2.1.11.

Thanks,

-- 
Stephen L. Ulmer                              ulmer at nersp.nerdc.ufl.edu
Senior Systems Programmer                         http://www.ulmer.org/
Northeast Regional Data Center                      VOX: (352) 392-2061
University of Florida                               FAX: (352) 392-9440





More information about the Info-cyrus mailing list