It never fails (bsddb retirement in 2.3)

Nick Vargish nav at adams.patriot.net
Fri May 2 09:04:25 EDT 2003


The data file looks like this:

<database>some_database_name
  <system>database at hostname1
  <system>possiblydifferent at anotherhost
  <system>anotherone at yetanother
<database>anotehrdatabase
  <system>foo at barhost
  <system>blah at blahblahost

And so on, and so on. There might be blank lines in there, or lines
with comments. The programs that I'm rewriting are CGIs, so they are
transient with very short lifespans.

That's what makes a quick B-Tree/ISAM file lookup very appealing. I
don't have enough control over the systems running the CGIs to ensure
there's a long-running daemon available to answer requests. The data
file is quite large (750K in text), so I'd rather not load a pickled
hash table every time a CGI program starts up.

Some of the suggestions that have been made about optimizing the
solution are interesting, but not especially relevant to the problem
domain. I probably should have specified the problem more exactly, but
my main concern as voiced in the original post was compatibility
issues with the 2.3 as relates to the bsddb module.

I really do appreciate the suggestions, though!

Nick

-- 
#include<stdio.h> /* SigMask 0.3 (sig.c) 19990429 PUBLIC DOMAIN "Compile Me" */
int main(c,v)char *v;{return !c?putchar(*v-1)&&main(0,v+ /* Tweaks welcomed. */
1):main(0,"Ojdl!Wbshjti!=obwAqbusjpu/ofu?\v\1");}  /* build: cc -o sig sig.c */




More information about the Python-list mailing list