Perl Extensions Introduction

Zeus Web Server (4.2 and later) includes an external runner with an embedded Perl interpreter and a set of support modules that allow you to run persistent Perl applications and scripts alongside the web server. These Perl applications can modify the behaviour of the web server in a wide range of ways, from implementing custom authentication schemes to changing the way that requests are logged.

The supporting Perl modules allow you to run a wide range of existing applications developed for Apache's mod_perl interface in the web server. This makes it possible to run a large number of existing applications on the Zeus Web Server without any modification.

Handlers

The Perl Extensions add a number of extra hooks to the Zeus Web Server's request processing. On each of these hooks it is possible to install a Perl handler. Handlers can collect information about the incoming request and manipulate the response either by generating it themselves or by issuing directives to the web server to adjust its behaviour.

Process model

The Perl interpreters responsible for executing handlers do not run in the web server itself, but in a pool of external processes. The web server communicates with these processes whenever it wants to run a handler. This model allows Perl handlers to do whatever they need to do, including blocking, without hampering the performance of the optimized web server core.

If dealing with a client connection involves executing several handlers, the same Perl runner will be used for all of them. This allows the semantics of Apache mod_perl to be preserved when passing information from one handler to another. When a handler completes, the Perl interpreter continues running, so state may be preserved for later requests; this may allow, for instance, the use of persistent database connections in order to avoid the overhead of setting them up every time.

Getting started

Please refer to our getting started guide. For extensive documentation on Apache mod_perl, much of which applies to the Zeus Perl Extensions, see the mod_perl web site.

Advantages

  • Allows extension modules to be written in a convenient scripting language.
  • A large number of modules and applications are freely available for Apache mod_perl, and many will run without alterations with Zeus Perl Extensions.
  • Powerful API, including rewriting, authentication, content generation, logging, and a number of other hooks, with a broad selection of support functions.
  • Built-in CGI acceleration layer.

Disadvantages

  • Somewhat slower than ISAPI and NSAPI due to the overhead of an embedded Perl interpreter and the current requirement for a multi-process rather than multi-threaded model.
  • Not all applications built on Apache mod_perl can be supported, due to some of them relying on the Apache web server itself.
  • By default, all Perl applications are loaded into the same pool of runner processes, so they all run in the same security domain.
Content Manager [Administrator] 16 December 2005  Permalink  
Download Free Trial

Recent Articles

Other Resources



www.zeus.com