Module Types
Almost all functionality in Challenger exists in different
modules. Each module has a distinct task. Several modules can
cooperate in the creation of a page that will be sent to the user.
What task a module has is determined by its type. More complex
modules can be of several types and thus perform more than one task.
Authentication
An Authentication module handles authentication of, and
information about, users. The most common type of Authentication
modules are modules that import the user database from the operating
system Challenger is running on. The information provided by an
Authentication module is often used by other modules, such as the
User Filesystem module. It is only possible to have
one Authentication module per virtual server.
Directory
A Directory module deals with directory listings and index
files. If the requested resource is a directory, a directory module
either tries to find a suitable index file or to create a page with a
directory listing. It is necessary to have a Directory module in
order to get index files, such as index.html, to work. It
is only possible to have one Directory module per virtual server.
Extension
Extension modules handle virtual files, with a certain
extension. Each time a request is made to a URL ending with that
extension, the extension module will be called. There are no Extension
modules in the Challenger distribution.
File Extension
File extension modules deal with files with a particular
extension, such as .html or .gif. The file in
question must first have been delivered by a Location module. The
ISMAP image-maps module is a File extension module.
Filter
Filter modules filter data that is just about ready to be
sent to the browser. This can be used, as the name suggests, to filter
out parts of the data that should not be sent.
First try
First try modules are called before all other module types,
except for Authentication modules. This is used to catch certain types
of requests, for instance, to block access to your server from certain IP
adresses or to send a warning message to the administrator if the server
is accessed outside working hours.
Last try
Last try modules are called when all other modules have failed
to produce anything at all from the request. A Last try module could
give an elaborate error message.
Location
Location modules deal with file systems, fetching files
and directories. A Location module could work with a real file system
or a purely virtual one. For example, it could fetch files from a
database instead of a file system.
Most web applications are also implemented as Location
modules. Pike and CGI scripts work much like a Location
module.
Each Location module is mounted somewhere on Challenger's virtual
filesystem. Several Location modules may be mounted on overlapping
mount points, in which case, the priority of the modules determines
which module gets to try to handle a request first.
Logging
Logging modules perform some logging of information about
the requests. This could be done by writing log files or in some other
way. The Logging module decides whether the request has been logged
properly or whether the request should also be logged by the built-in
log system.
Main Parser
The Main parser module handles all RXML parsing. The module
handles the interface to Parser modules. A Main parser must be
installed for any RXML parsing to take place.
The Main parser must somehow get pages to parse. This is usually
done by making the module a File extension module as well. Thus all
files with a certain extension will be parsed.
There can only be one Main parser module in each virtual
server. The Main RXML parser module is the only Main
parser module included in the Challenger distribution.
Parser
Parser modules define one or more RXML tag. This is one of
the most common user created modules. Making new tags available is an
excellent way of making functionality available to the users of the
server.
The Parser modules are called upon by a Main parser module. If no
Main parser module is installed in the virtual server, no RXML parsing
will take place.
Protocol
Protocol modules set the protocols the virtual servers can
use. It handles a network connection to a port and then sends the
request on to Challenger. HTTP, HTTPS and FTP are examples of protocol
modules included in the Challenger distribution.
Provider
Provider modules provides other modules with different
services and extra functionality. They do not in themselves have
anything to do with the normal request handling.
Types
The Types module sets the content type of a file, if it hasn't
already been done by the preceding modules. This is usually done by
looking up the Mime type for a certain file extension in a
database. There can only be one Types module in each virtual
server. The Content Types is the only Types module in
the Challenger distribution.
URL
URL modules receives one URL and returns another. In other
words, the URL modules transform requests into other requests. This is
useful when a web page is published under several names, or when a web
page has moved.
|