[Prev][Next][Index][Thread]

Re: MCL and MacHTTP



>Terje Norderhaug wrote:
>One complication I have encountered is the time it takes if the LISP
>environment should be lauched for each CGI request (which might be
>reasonable setup if there are not too many requests and the resources are
>shared with others). On an overused Sparc server this has turned out to
>take seconds

The standard UNIX/CGI model does not yet apply to Mac CL-HTTP.  The Common
Gateway Interface specification describes a particular way that static http
servers can call external routines written in a variety of languages.  Thus
a precompiled C application can be "dynamically" extended in precompiled
increments.

Mac CL-HTTP is not a static application.  It does not need CGI to be
extended.  Lisp forms can be loaded into the Mac CL-HTTP application and
exported as URLs. Execution occurs within the thread of the application
without the CGI overhead.  Evaluating a lisp form does not need to spawn a
MCL application unless the author of the form insists.  Leaving a bunch of
precompiled files lying around waiting to be executed is not part of Mac
CL-HTTP's model usage.  Having forms loaded and ready is. CGI becomes
sufficient when a language other than MCL is used for scripting.  (CGI is
not truely necessary, since other protocols can be defined.)

In fact, there is no CGI implemented for Mac CL-HTTP as yet because
exporting Lisp forms has been good enough.  This needs to change in order
for Mac CL-HTTP to spread beyond Lisp programmers. Several people have made
contributes toward a CGI for Applescript, but nothing has assembled itself
yet.  A CGI interface for MacPerl could also expand Mac CL-HTTP's
popularity.

Once you start writing stream oriented Lisp URLs, you might start
considering CGI rather primitive.

- Rick