Michael's suggestion is a good one. I would add a few comments.
From: Michel Schinz <schinz@studi.epfl.ch>
Newsgroups: comp.lang.scheme.scsh
Date: 20 May 1996 16:29:01 +0200
As I said in my previous post, a solution is to use the SU httpd
server. It is a full http server written on top of scsh. This means
that you can easily load the code for the scripts in the server, and
then invoke it with a standard procedure call. If you do this, scsh is
only loaded once at the server startup, so the startup time is
completely eliminated for the scripts. Of course, you can only do that
if you can replace the http server you are using, and there are
drawbacks: For example, if your script dies abruptly (e.g. with a core
dump), the whole server dies, which is not the case with the CGI
interface;
Not necessarily. The httpd process can fork the handler. This just uses
Unix fork() to replicate the process, so there's no vm heap-load overhead.
also, the scripts and the server share a common "working
space" (same global variables, etc.).
Again, if you fork the handler, the handler can muck about as it pleases
without affecting the parent server process. Also, S48's package system
means you can separate the "working spaces" using software modules,
even though they will all run in the same address space.
-Olin
|