[spambayes-dev] SpamBayes core_server.py and related bits merged to CVS HEAD

skip at pobox.com skip at pobox.com
Sun Jun 10 17:53:01 CEST 2007


I just merged the code for a new application, core_server.py, to the
SpamBayes CVS HEAD.  When I checked in the changes on HEAD I got a bunch of
messages like this:

    cvs diff: Tag 1.1 refers to a dead (removed) revision in file `core_server.py'.
    cvs diff: No comparison available.  Pass `-N' to `cvs diff'?

It looks like the checkin actually worked, but I've never seen that message
before.

This new application, scripts/core_server.py, is fundamentally the same as
the preexisting POP3 proxy, but uses a simple plugin scheme to support
different protocol adapters.  The only plugin written so far is spambayes/
XMLRPCPlugin.py, which, as you might guess, allows messages to be scored
using XML-RPC calls.  There are two methods, score and score_mime.  The
latter is pretty much what we are used to - essentially shoot an email (or
email-like) message over the pipe and get a score back.  The former method
(maybe it should be named score_form) accepts a dictionary representing a
form submission, a set of extra tokens generated by the client (such as was
the submission from an anonymous user?)  and a set of attachments.  The last
two args can be empty (though because of XML-RPC constraints they can't be
optional.)

The first application of this is likely to the the new Roundup-based Python
tracker.  I wrote a simple Roundup auditor for that purpose today.  I'll be
testing that over the next few days.  The second application will likely be
MoinMoin.  Marian Neagul is doing a Google Summer of Code project on page
classification which this might fit into nicely.  In theory, an web site can
use it though as long as it can speak XML-RPC.

BTW, before I merged I created a tag, BEFORE_CORESVR_MERGE.  I also created
an AFTER_CORESVR_MERGE tag after the big checkin.  Can people give the
existing applications a whirl to make sure I didn't break anything?

For Reimar and Marian (the MoinMoin gurus), I did a very little bit of
performance testing.  Roundtrip performance on my laptop (Mac PowerBook G4 -
800MHz) with both the server and client running on the same machine ranged
anywhere from 10-50 bytes/ms.  When I added a large payload (a MIME encoded
JPEG file of 9.5MB) performance in terms of bytes/ms shot way up, but as you
would imagine overall time did as well.  Here are some figures:

    attachment     time          bytes/ms
       size
    9587824        30.7 sec      312
     975978         3.7 sec      259
     114794         0.5 sec      252
      28675         0.2 sec      142

Thx,

Skip



More information about the spambayes-dev mailing list