PerlIS - Perl for ISAPI
About Perl for ISAPI.
ISAPI (Internet Server Application Programming Interface) is an API for writing extensions to web servers. It was originally developed by Process Software, and adopted by Microsoft as its standard server API. It complements or replaces the Common Gateway Interface (CGI), the standard interprocess protocol for writing extensions to web servers.
ISAPI's main advantage over CGI is that it uses dynamic-link library (DLL) function calls to communicate with extension components, rather than environment variables and standard I/O, as CGI does. There's a lot of overhead when starting new processes on Win32 platforms, and DLL calls eliminate the need for new processes, thus reducing the running time.
Although it was originally developed for Microsoft Internet Information Server, many Windows NT-hosted web servers now support ISAPI. See What HTTP servers support ActivePerl? for the names of a few. If your server isn't there, check its documentation.
Perl for ISAPI, is an ISAPI extension that runs Perl scripts on Win32 platforms.
Perl for ISAPI is mainly used for creating dynamic content on World Wide Web sites. Writing Perl scripts that run under PerlIS is not much different than writing scripts for the Common Gateway Interface (CGI).
Perl for ISAPI doesn't have much general purpose use. For general purpose programming, stick with the perl interpreter (perl.exe).
You may also see Perl for ISAPI referred to as PerlIS. PerlIS is the name of the Perl for ISAPI DLL.
Perl for ISAPI is distributed as a part of the ActivePerl distribution. You can optionally install it when installing ActivePerl.
The short answer is: it's faster. The long answer gets kind of technical, but it goes like this:
The main advantage of PerlIS over perl.exe is that PerlIS runs as a DLL in the web server's process space. Because Win32 platforms set up a protected memory space for each process that is started, there's a lot of overhead in starting a new process or program. Passing scripts to an interpreter, such as perl.exe, requires starting a new process for every script, which gets expensive in terms of system resources.
DLLs, on the other hand, don't need their own process space; they use the space of the process that calls them. They don't require nearly as much overhead to start, and once loaded they stay loaded until the calling process ends. PerlIS therefore runs Perl scripts with a quicker turn-around time than perl.exe.
Extra care should be taken when you write PerlIS applications. It is difficult to crash the web server using CGI, but because the PerlIS DLL runs in the process space of the server, your web server is more susceptible to crashes and hangs caused by programming errors.
The source for Perl for ISAPI is not distributed to the public.
This FAQ was originally assembled and maintained by Evangelo Prodromou. It has been revised and updated by Brian Jepson of O'Reilly & Associates, David Grove, David Dmytryshyn and David Sparks of ActiveState.
This FAQ is in the public domain. If you use it, however, please ensure that you give credit to the original authors.