[Spambayes] proposed changes to hammie & co.

Jeremy Hylton jeremy@alum.mit.edu
Wed Nov 20 12:52:22 2002


>>>>> "TS" == Tim Stone <- Four Stones Expressions <tim@fourstonesExpressions.com>> writes:

  TS> Perhaps in the long run, ZODB is the final answer.  But pickles
  TS> in particular are so portable... dbm files are so
  TS> fast... different strokes for different folks, I guess.

ZODB uses pickles, so is about as portable.  Don't know how it's speed
compares to dbm files, but would expect it's roughly comparable.  What
are you concerns other than portability and as-fast-as-dbm-files?  The
advantage of ZODB is that it takes about two dozen lines of code to
make the classifier persistent.

One likely concern is that your users have to install ZODB or you
have to package it for them.

  >> I still don't understand why a DBDict needs load/store.  It'd be
  >> so much easier just have store() call self.db.sync() and make
  >> load() a noop.  Is there something out there which depends on the
  >> disk version being different from the memory version?

  TS> As nearly as I can tell, the dbm implementations vary on when
  TS> they write stuff to persistent storage.  Sync only offers the
  TS> guarantee that the memory and persistent versions match.  Richie
  TS> has presented the requirement that the dictionary be able to
  TS> forget what has happened...

Another advantage of ZODB is that it's transactional, which makes it
possible to forget what has happened.  It also makes it possible for
multiple processes to share the database in a sane way.

Jeremy




More information about the Spambayes mailing list