Subject: Re: Thoughts on mod_lisp
From: rpw3@rpw3.org (Rob Warnock)
Date: Wed, 03 Nov 2004 03:55:16 -0600
Newsgroups: comp.lang.lisp
Message-ID: <ONidnZ8NrpqZNhXcRVn-pg@speakeasy.net>
[Sorry for the late response... --rpw3]

Marc Battyani <Marc.Battyani@fractalconcept.com> wrote:
+---------------
| "drewc" <drewc@rift.com> wrote
| > Remember that lisp is a compiled language as well, and in many cases is
| > on-par with C performance-wise. I suspect your desire to use apache here
| >   may be a case of premature optimization.
...
| I think you are completely missing the point.
| The major interest of mod_lisp is not technical it's a marketting/political
| one. (though mod_lisp is also pretty fast anyway)
| When you want to make web applications for clients, and get paid for that,
| the fact that there is a mod_lisp that runs with Apache is often the easiest
| way and sometimes the only way to be accepted in a corporate environment.
+---------------

I completely agree! And not just in "corporate" environments. Using
Lisp for a non-profit project was made *much* easier for me by the
ability to co-exist with the already-deployed Apache server at that site.

I actually went even further in the "leave Apache alone" direction[1],
namely, I didn't run real "mod_lisp" per se, but rather wrote a *tiny*
C program that runs as an ordinary CGI program under Apache but then
connects to the persistent Lisp server [CMUCL, in my case] via a Unix-
domain socket... and speaks "mod_lisp" protocol to it!  ;-}

Because I didn't even need to restart Apache to add my app, the sysadmins
of the existing web site had *no* problems with my using Lisp...

But if performance of the Lisp server ever becomes an issue[2], all I
have to do is remove my C program and drop in *real* "mod_lisp" and the
Lisp server won't even notice the change [except for performance].



-Rob

[1] Something that Marc has teased me about several times, actually!

[2] Yes, a CGI fork/exec per request is slow, but I get >75 req/sec
    through Apache + "cgi_sock" + CMUCL server. On the same system,
    I get ~145 req/sec for simple Perl-based CGI, and ~1300 req/sec
    for a small static page. FOR THE CURRENT LOAD, even 75 req/sec
    is overkill. But if that changes, I have "real" mod_lisp to use.

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