Check out the new USENIX Web site. next up previous
Next: TCP/IP Integration Up: AFPA Previous: Overview

State Machine

Using a state machine interface, it is possible to implement a variety of protocols in the AFPA framework. Protocol specific code for a given application such as Web serving is encapsulated in an AFPA module.

Each AFPA module is partitioned into three components: state, program actions, and control elements. AFPA manages three types of internal state data for each module instance: global data, connection data, and request data. Global data is data independent of each connection and request. Connection data is information that changes on a per connection basis. Request data is information that changes per request within the same connection. State functions are either written by the module developer, exist in another AFPA module's library of state functions, or are intrinsic to AFPA as a general service. State functions indirectly manage state transitions through a separately managed table. The layer of indirection permits state functions to be reusable and reconfigurable.

Figure 1: AFPA HTTP State Machine
\begin{figure}\begin{center}
\begin{tabular}{l}
\vspace{-0.2cm}\\
\psfig{figure=state.eps,width=8cm,angle=0}\end{tabular}\end{center}\end{figure}

A simplified version of the state machine used by the AFPA HTTP module is shown in Figure 1. The state machine illustrates how the HTTP module can be used as a standalone Web cache, work in conjunction with a user-mode Web server, or act as a front end Web cache for one or more back end Web servers. The module implements a function corresponding to each of the following client connection states:


next up previous
Next: TCP/IP Integration Up: AFPA Previous: Overview
Philippe Joubert 2001-05-01