[Spambayes] SMTPProxy [Was Training]
Mark Hammond
mhammond at skippinet.com.au
Tue Feb 25 12:06:49 EST 2003
> [asyncore vs threads]
> > I'll have to leave this one to Richie... I wondered the same
> > thing, but he
> > assured me that there are valid reasons to use asyncore over
> > threads...
>
> smtpproxy is only using threads at the moment because it was
> a 30 second solution to using the same database without
> looking at the asyncore stuff, or modifying pop3proxy too
> much. I have no particular attachment to the threads :)
I do <wink>. They are *much* simpler than an asyncore model. A
"thread-per-connection" model scales incredibly poorly, while an asyncore
approach should be able to handle a huge number of connections. Thus, in
many situtations, the simplicity of threads is outweighed by the scalability
of an async model.
I guess it gets down to crystal ball gazing. If we see pop3proxy running
for many users, then threads are a poor choice. If it will always remain a
"personal" server running on the localhost, you may find threads work just
fine while leaving the code that bit more maintainable in the longer term.
Mark.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 2152 bytes
Desc: not available
Url : http://mail.python.org/pipermail/spambayes/attachments/20030225/6146ef4b/winmail.bin
More information about the Spambayes
mailing list