Next: Type-based Composition
Up: CANS Components
Previous: CANS Components
Drivers
Drivers serve as the basic building block for constructing
adaptation-capable, customized data paths. Drivers are standalone
mobile code modules that perform some operation on the data stream.
However, to permit their efficient composition and dynamic
low-overhead reconfiguration of data paths, drivers are required to
adhere to a restricted interface as shown in Figure 2.
Specifically,
Figure 2:
Driver functionality (a) and interface (b).
|
- Drivers consume and produce data using a standard data
port interface, called a DPort. DPorts are typed
(details below) and distinguished based on whether they are being
used for input or output.
- Drivers are passive, moving data from input ports to
output ports in a purely demand-driven fashion. Driver activity
is triggered only when one of its output ports is checked for
data, or one of its input ports receives data.
- Drivers consume and produce data at the granularity of an
integral number of application-specific units, called semantic
segments. These segments are naturally defined based on the
application, e.g., an HTML page or an MPEG frame.
Informally, this requirement ensures that the data in an input
semantic segment can only influence data in a fixed number of output
segments, permitting construction of data path reconfiguration and
error recovery strategies that rely upon retransmission at the
granularity of semantic segments (see
Section 4.2).
Note that this property only refers to the logical view of the
driver, and admits physical realizations that transmit data at
any convenient granularity as long as segment boundaries are somehow
demarcated (e.g., with marker messages).
- Drivers contain only soft state, which can be
reconstructed simply by restarting the driver. Stated differently,
given a semantically equivalent sequence of input segments, a
soft-state driver always produces a semantically equivalent sequence
of output segments. For example, a Zip driver that produces
compressed data will produce semantically equivalent output (i.e.,
uncompressed to the same string) if presented with the same input
strings.
Figure 3:
A simple example of type compatibility.
|
The first two properties enable dynamic composition and efficient
transfer of data segments between multiple drivers that are mapped to
the same physical host (e.g., via shared memory). Moreover, they
permit driver execution to be orchestrated for optimal performance.
For example, a single thread can be employed to execute, in turn,
multiple driver operations on a single data segment. This achieves
nearly the same efficiency, modulo indirect function call overheads,
as if driver operations were statically combined into a single
procedure call.
The semantic segments and soft-state properties enable low-overhead
dynamic adaptation, either within a single driver or across data path
segments while preserving application semantics. The driver interface
(see Figure 2) permits a driver to create and listen to
events, facilitating its participation in distributed adaptation
activities.
Subsections
Next: Type-based Composition
Up: CANS Components
Previous: CANS Components
Weisong Shi
2001-01-08