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
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")
I did get TBNL working in OpenMCL with minimal hassle. There was a
small change to KMRCL, but otherwise fine.
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
> 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