March 97 - High-Performance ACGIs in C
High-Performance ACGIs in C
Ken Urquhart
Asynchronous Common Gateway Interface (ACGI) programs allow
Macintosh HTTP servers to do external processing tasks ranging
from custom HTML forms processing to controlling hardware
devices. ACGIs are usually written in AppleScript (which limits
them to handling only one server request at a time).
High-performance ACGIs, ones that are capable of handling
multiple simultaneous requests, need to be written in a high-level
language like C. The resulting ACGI will work with any HTTP server
that supports the WebSTAR WWW Apple event suite.
Now that you've got your HTTP server up and running on your Macintosh, people are
flocking to your Web site by the thousands. The only problem is that you've written all
of your Asynchronous Common Gateway Interface programs (ACGIs) in AppleScript and
their performance is leaving much to be desired. You know you should be writing your
ACGIs in C for speed, but you think that will be a lot of work.
Well, have I got news for you! A full-blown, multithreaded, high-performance ACGI
program for use with Macintosh HTTP servers is easier to write than you think. If