[plt-scheme] Faster CGI

From: Henk Boom (lunarc.lists at gmail.com)
Date: Tue Dec 23 22:32:08 EST 2008

2008/12/10 Eddie Sullivan <eddieSull at hotmail.com>:
> If anybody's interested, I've attached a simple wrapper for the FastCGI C
> library I hacked up when I was first learning Scheme.

Thanks for sharing this. =)

I tried doing something like this myself before you sent that e-mail;
I had just 3 of the fastcgi functions wrapped, enough that I could
output simple requests. It seems to work nicely and quickly.

I'm worried, though, that I'll have the same problem of many instances
running. I'd probably use mod_action in apache to run a common fastcgi
script to handle all .ss files, which would use one instance at low
load. Except, that is, when I'm serving multiple sites. As far as I
can tell there's no way to share a fastcgi instance across multiple
sites served through Apache. This makes me worry that fastcgi won't be
a viable solution for me. I'm still looking into it, though, so
hopefully I can make it work somehow.

Barring that, the only other solution I can think of is separately
running a 'handler' instance of mzscheme which takes requests and
serves responses (through, say, named pipes). Then native cgi
applications would handle communicating with that handler. I'm a
little worried about this approach, though, since it's getting pretty
complex, and it almost feels like implementing an entire new web
server.

Any ideas?

    Henk


Posted on the users mailing list.