HyperText Transport Protocol Daemon - Overview
WASD Hypertext Services - Technical Overview
[next] [previous][contents]
2 - HyperText Transport Protocol Daemon - Overview
The most fundamental component of the WASD VMS Hypertext Services
environment is the HTTPd, or HyperText Protocol Transport
Daemon, or HTTP server. It provides full multi-threaded support.
VMS ASTs (Asynchronous System Traps) are used to construct an I/O
event-driven server.
It provides a complete implementation of a basic HTTP/1.0 server,
including:
- concurrent, multi-threaded client support
- ``DELETE'', ``GET'', ``HEAD'', ``POST'' and
``PUT'' HTTP method support
- "If-Modified-Since:"/"304 Not Modified" functionality
(document is only sent if modified since time specified by client)
- HTTP/1.0 de-facto persistent connections ("Keep-Alive:)
(reducing the number of TCP/IP connects required)
- versatile directory listing (generic and VMS-style)
- CGI-compliant scripting
(with configurable, automatic, MIME content-type initiated
activation)
- CGIplus scripting
(offering reduced latency, increased throughput and reduced system
impact when scripting)
- Server-Side Includes (HTML pre-processing)
- clickable-image support (NCSA and CERN formats)
- ``Basic'' and ``Digest'' user authentication and
path/group-based authorization
- Web-standard, ``common''-format access log
(allowing processing by most log-analysis tools)
- host-level access control, on per-host or per-domain acceptance or
rejection
- configurable, automatic conversion of documents from VARIABLE to
STREAM-LF record format (much more efficient with this server)
- on-line server configuration, including reports on activities,
loaded configuration, mapping rules and authorization information
- persistant client state HTTP cookie aware
It executes permanently on the server host, listening for client
connection requests on TCP/IP port 80 (by default). It provides concurrent
services for a (technically) unlimitted number of clients (constrained only by
the server resources). When a client connects HTTPd performs the following
functions:
- creates a thread for this request
- reads and analyzes the HTTP request sent,
depending on the nature of the request ...
- initiates I/O-driven transfer of the requested file
- initiates I/O-driven interpretation of a menu file
- initiates I/O-driven processing of an SSI HTML file
- initiates I/O-driven processing of a clickable-image mapping file
- initiates I/O-driven directory listing
- initiates I/O-driven file/directory create/update
- initiates I/O-driven server administration
- initiates I/O-driven web file-system update
- spawns a subprocess to execute a CGI script (DCL procedure) with:
- SYS$COMMAND and SYS$OUTPUT
assigned to intermediate mailboxes (essentially pipes)
- SYS$INPUT logical name providing a
mailbox allowing the script to read the raw HTTP header and body
(if any)
- CGIPLUSIN logical name providing a
mailbox allowing a CGIplus script to read CGI variables
- CGI-compliant symbols representing the important CGI variables of the
request
- for the life of the subprocess HTTPd:
- controls the essential behaviour of the subprocess via its
SYS$COMMAND mailbox
- receives data written by the subprocess to its
SYS$OUTPUT via the associated mailbox, writing this to
the client
- closes the connection to the client and disposes of the thread data
structures
For I/O intensive activities like file transfer and directory listing, the
AST-driven code provides an efficient, multi-threaded environment for the
concurrent serving of multiple clients.
For scripts, the technique of using multi-threaded, concurrent, spawned
subprocesses, attached to standard input/output streams, provides a versatile,
extensible, powerful scripting environment. Any DCL procedure or image
executing within the subprocess can behave as an HTTP server. This capability
is employed to easily extend the basic services provided by the core daemon
code. An HTTP script/server for this environment does not need to concern
itself with network activities, it merely reads and writes from the standard
I/O streams.
[next] [previous][contents]