[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] MacPerl and [A]CGI startup time



At 13.25 1998.05.04, Gerald Young wrote:
>1) Are MacPerl packaged CGI Scripts CGI applications (limited to the
>single-threading of AppleScript) or in fact ACGI Scripts in the WebStar
>sense? I did not find clarification in the CGI package documentation
>included (whose examples and support files BTW are not self contained and
>really only show the crude path).
>
>With WebStar compliant web servers a single "CGI" application will be
>monopolizing the web server and block other requests from being served
>until the CGI script is completed.
>
>An ACGI (asynchronous CGI) will be served asynchronously with other
>requests until completed.
>
>Usual WebStar web server documentation strongly suggests using CGI when
>utilizing AppleScript, due to some problems with reentrancy there. This
>maybe does not affect AppleEvents, as used by the MacPerl CGI package.

A MacPerl CGI script can be used as an ACGI if the server can handle it.
Most servers require the script to be named ".acgi" for this to work.
Apple's PWS treats all CGI scripts as ACGIs, I believe.

Anyway, we on this list have come to believe (for the most part) that CGI
is better than ACGI for MacPerl, too, because MacPerl currently does not
handle concurrent executions, and in fact a CGI script can hang if it tries
to execute while MacPerl is busy.


>2) Is there anything which can be done to speed up the startup
>compilation of scripts used via the CGI package. On a (modest) Performa
>6300 any script using Net:: packages is compiling for several second,
>which, when combined with the above question CGI/ACGI effectively blocks
>the whole web server.

There is not a lot that can be done currently.  WebTen is a Mac OS web
server that comes with its own perl interpreter (basically, it emulates
Unix) that can solve many of these problems.  Basically, Mac OS is not the
best platform for serving CGIs, and MacPerl is (currently) not the best
platform for serving CGIs on Mac OS, simply for performance reasons; not
that MacPerl is not pretty speedy, but that it can only execute one thing
at a time, and because of compilation time required for each execution.

--
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
MacPerl: Power and Ease (ISBN 1881957322), http://www.ptf.com/macperl/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10  1FF77F13 8180B6B6'])



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch