Page 1 of 1

FastCGI for SBCL?

Posted: Sat Jun 28, 2008 8:52 am
by findinglisp
Does anybody know if there is a FastCGI library for SBCL? I looked on Cliki (http://www.cliki.net/FastCGI) and there appear to be two options, one for CLISP and one for CMUCL. I believe the CLISP option is pretty CLISP-specific. Given the socket differences between CMUCL and SBCL, I'm guessing that won't work right out of the box either. Has anybody used anything successfully with SBCL? If not, it seems like the best option would be to port Teemu Kalvas's CMUCL version to SBCL.

I'm sure that somebody will quickly point out that I don't need FastCGI because mod_lisp exists. Well, yes, but that's only an option if you're running Apache. For what it's worth, I think mod_lisp was a bad idea. It isn't really mod_lisp in the style of mod_perl or mod_python where you're actually running the language interpreter inside the Apache process. It's little more than yet-another-CGI-like interface, except it implements its own protocol and doesn't work with anything other than Apache. Or am I missing something?

-- Dave

Re: FastCGI for SBCL?

Posted: Sat Jun 28, 2008 9:02 am
by jmbr
There's http://tehran.lain.pl/stuff/fcgi-current.tar.bz2 (currently unreachable for me) which is described as "FastCGI app protocol implementation for Common Lisp. Works at about 75% of libfcgi's performance for native code compilers."

Hope this helps

Re: FastCGI for SBCL?

Posted: Sat Jun 28, 2008 9:11 am
by findinglisp
Perfect! That's just what I was looking for. I'll see if the site comes back shortly and try to nab it. Thanks much. :D

Re: FastCGI for SBCL?

Posted: Sat Jun 28, 2008 9:49 am
by nklein
I was looking for the same a few months back. That site's been down every time I have checked.

I started to roll my own, but got sidetracked by shinier problems.

Re: FastCGI for SBCL?

Posted: Sun Jun 29, 2008 8:49 am
by rsynnott
Another option would be to use Hunchentoot or something, and then have your frontend server proxy requests.

Re: FastCGI for SBCL?

Posted: Sun Jun 29, 2008 9:10 am
by Wodin

Re: FastCGI for SBCL?

Posted: Sun Jun 29, 2008 11:01 am
by findinglisp
Wodin wrote:I think you can use mod_lisp with lighttpd too.

See also:
http://objectmix.com/lisp/256388-mod_lisp-over-cgi.html
http://xach.livejournal.com/144475.html
Hmm... I might investigate whether mod_lisp works for lighttpd. It boggles my mind, however, that the rest of the world is moving to FastCGI for just about everything out-of-process on the web server and there doesn't exist a good FastCGI library.

Re: FastCGI for SBCL?

Posted: Mon Jun 30, 2008 7:07 am
by ryepup
We use apache and mod_proxy to send some requests to a running sbcl (running ucw listening on a 127.0.0.1 port), and use apache to serve other static content (images, css, js) and handle LDAP auth. We started out with mod_lisp, but found it gave little performance benefit over using mod_proxy, and introduced extra complexity, so we dumped it.

Xach has a post on his blog on this topic that has a lot of useful comments:
http://xach.livejournal.com/144475.html

Re: FastCGI for SBCL?

Posted: Mon Jul 28, 2008 3:10 pm
by xma
I am curious how you did that: I am struggling hard with lighttpd and mod_proxy. Currentyl it is just a no-go for me :( mod_lisp and apache2 are overkill for my needs.

Would you mind explaing how you did that ?