Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Web applications and threading

4 views
Skip to first unread message

steve....@gmail.com

unread,
Apr 16, 2005, 5:22:00 PM4/16/05
to
I'd like to write a web application based in Lisp. I'm planning on
using TBNL with either apache + mod_lisp or areineda. I am wondering
how important it is that my Lisp implmentation have threading? On my
Mac I can use OpenMCL for development, but I'd like to deploy the app
in FreeBSD or Linux, using SBCL or CMUCL.

Does anyone have experience working in a situation like this?

Would it be more worth while to develope the app using SBCL on my Mac
(no threads)?

Any other suggestions?

Thanks

Edi Weitz

unread,
Apr 17, 2005, 4:50:55 AM4/17/05
to

If you use TBNL you definitely need threads, so you won't be able to
develop using SBCL/Mac. (Unless during development you make sure to
use an Apache with only one thread. This /may/ work but I've never
tried that.) I don't have a Mac so I don't know if TBNL works with
OpenMCL - TBNL relies on KMRCL which supplies the plumbing for the
threads.

Cheers,
Edi.

--

Lisp is not dead, it just smells funny.

Real email: (replace (subseq "spam...@agharta.de" 5) "edi")

steve....@gmail.com

unread,
Apr 17, 2005, 11:09:17 AM4/17/05
to
Ok, thanks, that makes it clear.

I did get TBNL working in OpenMCL with minimal hassle. There was a
small change to KMRCL, but otherwise fine.

Rob Warnock

unread,
Apr 18, 2005, 4:12:43 AM4/18/05
to
<steve....@gmail.com> wrote:
+---------------

| I'd like to write a web application based in Lisp. I'm planning on
| using TBNL with either apache + mod_lisp or areineda. I am wondering
| how important it is that my Lisp implmentation have threading? On my
| Mac I can use OpenMCL for development, but I'd like to deploy the app
| in FreeBSD or Linux, using SBCL or CMUCL.
|
| Does anyone have experience working in a situation like this?
+---------------

I didn't use TBNL, but I did develop a small production application
using Apache + CMUCL + PostgreSQL, with a "mod_lisp"-like interface[1]
from Apache to CMUCL, HTOUT <http://www.cliki.net/htout> as the HTML
generation tool[2], and PG <http://www.cliki.net/Pg> to talk to PostgreSQL.

My app predated "cl-modlisp" <http://www.cliki.net/cl-modlisp>, so I
wrote my own application server front-end code, which fires up a new
CMUCL thread[3] for each Apache request, mainly to prevent a browser
that makes a large request via a really slow network cornection from
blocking later requests from browsers on much-faster lines.

All in all, I've been very happy with it!! [4]


-Rob

[1] It's a tiny C-based CGI program that opens a Unix-domain socket to
the CMUCL-based server. I carefully made the socket protocol be a
subset of the "mod_lisp" protocol, so I could change to using real
"mod_lisp" later if performance became as issue. [It hasn't yet.]

[2] CL-WHO <http://www.cliki.net/cl-who> would probably have worked
just as well. I just happened to start with HTOUT [which was
available earlier, IIRC].

[3] By "thread", here, I mean a within-a-single-Unix-process coroutine
or "green thread", as it's sometimes called -- what the documentation
of the CMUCL "MP:" package confusingly refers to a "process".

[4] Well, once I realized that you really, *REALLY* want to call
MP::STARTUP-IDLE-AND-TOP-LEVEL-LOOPS in the top-level REPL (but
*after* loading all the pieces of the app) so the whole world
doesn't stop just because you do a blocking read in the REPL... ;-}
[It's also speeds up the threads' context switching.]

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

Marco Baringer

unread,
Apr 18, 2005, 6:04:32 AM4/18/05
to
steve....@gmail.com writes:

> I'd like to write a web application based in Lisp. I'm planning on
> using TBNL with either apache + mod_lisp or areineda. I am wondering
> how important it is that my Lisp implmentation have threading? On my
> Mac I can use OpenMCL for development, but I'd like to deploy the app
> in FreeBSD or Linux, using SBCL or CMUCL.

not that i use tbnl, but i'm in a situation similar to yours. i
develop web apps on macos x using openmcl's multithreading and deploy
on cmucl and sbcl on linux. there's a _small_ amout of portability
work (most of which other people have already done) but other than
that i've never had any problems with this setup.

--
-Marco
Ring the bells that still can ring.
Forget the perfect offering.
There is a crack in everything.
That's how the light gets in.
-Leonard Cohen

0 new messages