> Okay, so you basically run two daemons -- mod_perl, and a separate
> multiplexing one -- to handle this?  Did you investigate what would be
> involved in changing apache to support multiplexing as an MPM?

Yes -- we did look at that. The problem is that the MPM model assumes
that the handler runs until it's finished and then dies -- i.e. in a
single context of execution. To support an event driven model you
would need to provide a way within the Apache API to allow the handler
to post new event requests and return from handling without destroying
the connection.

i.e. the current Apache MPM model is:

 1. Answer connection.
 2. Call handler.
 3. Handler runs.
 4. Handler returns.
 5. Disconnect.

The event driven model would need to look something like this:

 1. Answer connection.
 2. Call handler.
 3. Handler registers event callbacks on socket and returns.
 4. ... MPM potentially answers other connections.
   ... time passes ...
 5. Event occurs on socket.
 6. Handler callback called. Handler may register another callback...
  ... time passes
 7. Event occurs on socket.
 8. Handler callback called. Handler decides the connection is over,
    and so disconnects from socket.
 9. MPM goes on with life.

TTUL
Ken

-- 
MailChannels: Assured Messaging (TM) | http://mailchannels.com

--
Suite 203, 910 Richards St.
Vancouver, BC, V6B 3C1, Canada
Direct: +1-604-729-1741

Reply via email to