Subject: Re: Your favorite Lisp on Debian?
From: rpw3@rpw3.org (Rob Warnock)
Date: Sat, 20 Mar 2004 15:07:09 -0600
Newsgroups: comp.lang.lisp
Message-ID: <I_qdndkr04PgL8Hd3czS-g@speakeasy.net>
Edi Weitz  <edi@agharta.de> wrote:
+---------------
| Chris Hall <hall.cj@verizon.net> wrote:
| > mod_lisp on Apache?  Wouldn't that start a new Lisp for each request?
| 
| No. You start CMUCL once and on each request Apache spawns a tiny C
| process which talks to your single CMUCL image.
+---------------

Actually, it doesn't even "spawn a tiny C process"!! All it does is that
one of the already pre-spwaned Apache processes opens a socket connection[1]
to the already-running Lisp process and pushes a request down the socket,
and then the Lisp process pushes a response back down the socket which
the Apache process throws back over its shoulder to the user's browser.

Normally the Apache "MaxRequestsPerChild" setting is set to some fairly
high number (possibly "infinity"), so that the when the Apache process
is done with that "mod_lisp" request it *doesn't* die, but gets re-used
for later requests.  So all a "mod_lisp" request really costs is a single
socket open/close.[2]


-Rob

[1] Unless one is already open, see [2].

[2] And maybe not even thats! The socket might even stay open and be used
    for several more requests, depending on the way you've configured
    "mod_lisp" and your Lisp server, and the specific type of request
    it was (that is, whether the response included the HTTP/1.1 response
    header "Connection: Open"). See the "mod_lisp" distribution for details,
    and RFC 2616 "HTTP/1.1", section "8.1 Persistent Connections".

-----
Rob Warnock			<rpw3@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607