The second public beta of acgi dispatcher for Mac OS X has been released. acgi dispatcher enables you to use ACGI programs written in AppleScript or other AppleEvent aware languages to write CGI programs to be run with the Apache Web server that comes with Mac OS X.
Beta 2 drastically increases the speed the scripts run by offering the option to load them internally instead of running them as separate programs, according to the program’s author, James Sentman This almost eliminates the startup pause if the script isn’t running and dramatically reduces the latency associated with sending the event to a separate app. Non-script programs will still be sent the traditional event.
Plus, the program is now more forgiving to scripts that either don’t return any header information, or return headers with Mac line endings instead of the Unix ones that Apache expects. No changes to the scripts are necessary at all, Sentman said. Dispatcher will add or change anything necessary. If you received errors from Apache with the pervious version, try again and it will work. Finally beta 2 continues to flesh out the rest of the parameters in the event, adding the virtual host parameter, the user id parameter and the full request parameter.
“In Mac OS 9 and earlier, there was an apple event system to let you do this with the built in Web server, but Apache on Mac OS X does not support this,” Sentmen, said. “Apple does include a solution to this problem with their Mac OS X Server product, but people not wanting to make the extra investment were out of luck.”
acgi dispatcher runs as a background process on Mac OS X so it doesn’t clutter your screen with windows and dock icons unless you wish to see them, he added. It also has the capability to run and serve pages while your system is logged out. Installation is drag and drop. There’s no manual editing of Unix config files.
In addition to supporting the traditional acgi AppleScript system acgi dispatcher adds some new information to the parameters to simplify and speed up your scripts, Sentman said. Instead of only sending the raw encoded form data, acgi dispatcher will URL decode and spilt form data into AppleScript lists for you.
“This removes the necessity to use either very slow, pure AppleScript code, or OSAXs that may not be carbon compatible yet,” Sentman said.
When the beta period is complete, acgi dispatcher will be released as shareware. You can download the utility — which was made with REALbasic from Real Software — at the product Web site.