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

[MacPerl] acgi vs cgi (fwd)



According to Chris Nandor:
> 
> What is the difference between the two?  I don't do much
> web serving on my Mac.  And has anyone found
> incompatabilities with CGI.pm and MacPerl?

There isn't any difference.  The difference is internal to
the web server.  With the ACGI, the web server either forks
off another process or generates a new thread.  Once
started, the web server then goes back to checking the
incoming information.  With CGI, the web server starts up
the new process (via fork, spawn, thread, whatever) and
then it waits for a response from the subprocess before
proceeding further (ie:  returning to look at incoming
information).  Remember though - this is only on a Mac.
The IBM's and clones use MS-DOS which allows up to (if I
remember correctly) three batch processes to be running at
the same time.  So on an IBM/clone the servers don't wait
for a subprocess to finish whether it is ACGI or just CGI.
Under Unix, the web servers just start up one of the
subprocesses by off loading the request to one of the web
children (or whatever you want to call the multiple
processes which are started up when a web server first
comes up under Unix).  These web children, in turn, form
their own shell environment and execute the requested
program (or read in the request HTML web page) and then
send the information back to the main server (or they
simply establish a return pipe to the calling process) and
the information is sent back.

Basically, as above, ACGI is just Asyncronously executed
CGI (which we all know means to just start up a process and
then leave it running and implement some sort of a flag so
when the process finishes we can pick up the output).  It's
almost like starting up MS-Word and MS-Excel and doing
something with both of them and then copying the
information back and forth.  Except you don't have to carry
around as much overhead.  ;-)

I do not use CGI.pm (although I am looking into doing so),
so I can not comment on it.


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