[Spambayes] Client/server model

M.-A. Lemburg mal@lemburg.com
Thu Oct 17 21:02:12 2002


Guido van Rossum wrote:
> Neale's hammie client and server seem to me to be wasting some
> effort.  Currently, what happens, is:
> 
>   cli sends the entire message to svr
> 
>   svr parses and scores the message
>   svr inserts the X-Hammie-Disposition header in the message
>   svr sends the message, thus modified, back
> 
>   cli prints the returned, modified, message to stdout
> 
> What would make more sense from the POV of minimizing traffic and
> minimizing work done in the server:
> 
>   cli parses the message
>   cli sends the list of tokens to svr
> 
>   svr scores the list of tokens
>   svr returns the text to be inserted in the X-Hammie-Disposition header
> 
>   cli inserts the X-Hammie-Disposition in the message
>   cli prints the message to stdout
> 
> (I like to minimize traffic as well as the work done by the server;
> minimizing traffic is always a good idea, while minimizing server work
> means less load on a shared server -- if the clients run on separate
> machines, the combined CPU power of the clients is much more than that
> of the server.)

This may be true if you have clients on different CPUs but if
you are on the same machine (client talking to daemon), then
Neale's model is certainly the better one.

In fact, making the client as tiny as possible would save
more CPU time.

I'm thinking of the situation where you have a mail server
which uses procmail to do the filtering for many different
users having their account on that machine. Another scenario
would be to built the C client directly into the MTA being
used for the delivery.

The only situation where the fat client would be better is that
of distributed mail servers, but that seems like a rather uncommon
setup.

-- 
Marc-Andre Lemburg
CEO eGenix.com Software GmbH
_______________________________________________________________________
eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,...
Python Consulting:                               http://www.egenix.com/
Python Software:                    http://www.egenix.com/files/python/