On Mon, 13 Dec 2004 17:36:20 +0000
Matt Sergeant <[EMAIL PROTECTED]> wrote:

> > What is the status of SelectServer?
> 
> It's pretty much in limbo right now. The problem is that the design of 
> qpsmtpd is kind of fundamentally designed around reading from STDIN and 
> writing to STDOUT, or at least designed around doing blocking reads. As 
> such the selectserver was always a bit of a hack.

It looks like I'll be hacking on selectserver enough to test it's memory
characteristics compared to forkserver.  Hopefully it'll prove worthwhile
to pursue further.


> I've been working on a potential compatibility layer, but certain 
> plugins would need completely re-written to take advantage of it (dnsbl 
> and early_talker are the ones I'm certain would need re-writing, there 
> may be others).
> 
> Mostly it's a very big and long job that too few people have the 
> knowledge to work on. I'd love to get some help, but I don't really 
> have time to bring someone up to speed on writing non-blocking servers.

Meanwhile, are you approaching this by overriding the log() and respond()
methods, or something more ambitious?

I've used fork or thread for most of the servers I've written, so I don't
count myself as an expert here.

A quick look through plugins/ raises these bells for me:
        dnsbl -- $ENV
        rhsbl -- $ENV
        check_earlytalker -- select on STDIN
        check_relay -- $ENV
        require_resolvable_fromhost -- blocking DNS
        spamassassin -- high latency call to external server
        milter -- high latency call to external server
        virus/ -- high latency call to external server
        http_config -- (potentially) high latency call to external server

Dnsbl/rhsbl and check_relay could be fixed by dropping qmail ENV support.
Require_resolvable_fromhost, check_earlytalker and spamassassin etc would
probably have to be handled by an event mechanism.  The timer event for
check_earlytalker would also be good for detecting stalled connections,
much as $SIG{ALRM} is used in tcpserver.

Then there's scaling to multiple CPUs.  I suppose, start by relying on
linuxvirtualserver then move to a configurable number of worker threads.
Is perl's ithreads up for this?

Brian

Reply via email to