scsh-users
[Top] [All Lists]

Re: usefulness of scsh for web CGIs

To: scsh@martigny.ai.mit.edu
Subject: Re: usefulness of scsh for web CGIs
From: Michel Schinz <schinz@studi.epfl.ch>
Date: 20 May 1996 16:29:01 +0200
Organization: Ecole Polytechnique Federale de Lausanne
cbitmead@versant.versant.com.au writes:

> I don't know much about cgi programing. Do you have to run a separate
> script for every access?

If you are using the CGI interface, yes. A new process is launched by
the server on each access to the URL.

> Until the scheme48 implementation is improved, 1.4 Meg has to be
> loaded on every invocation. If this is buffered in memory due to
> frequent access, then maybe it's not too bad, but I suspect it's going
> to be a bit too slow for you.

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; also, the scripts and the server share a common "working
space" (same global variables, etc.). But if you can live with that,
it might be a nice solution.

> Is there anybody working on fixing this broken part of the scheme48
> implementation? It makes scsh somewhat unbearable for general shell
> scripting work.

As I said, this should be corrected in a later version of scsh (the
next one?). If I remember well, Brian Carlstrom is working on that.

Michel.

<Prev in Thread] Current Thread [Next in Thread>