A session processing module for a server is adapted to communicate across
the Internet with a plurality of clients. The processing module runs
within a servlet and allocates a session identifier in response to a first
input stream of a session between a client and the server; negotiates
communication characteristics for the session; and instantiates, according
to the communication characteristics, routines for processing subsequent
session input streams containing request data and routines for generating
session output streams containing response data. A variable depth of
penetration to be applied to a dynamically specified quality of service
for a session is enabled. Thus, in one embodiment the module relays
encrypted request data for a session to a back-end server, and receives
from the back-end server encrypted response data for the session for the
client. Alternatively, the module itself decrypts input streams containing
request data and processes the data to generate output streams containing
encrypted response data for the client.