next up previous
Next: Rationale on Dispatchers and Up: Making ANTS Suitable for Previous: Separation of ANTS run-time

Dispatch framework for incoming packets.

In ANTS 1.2, a channel was the entity responsible for both sending and receiving capsules. The Channel base class would implement encoding and decoding, and subclasses would provide send and receive methods specific to an underlying transport. A ChannelThread would loop receiving, decoding, and executing packets for a channel. In our opinion, this approach mixed three or four functions that we believe require separate attention. These functions are:

For this reason, we split the Channel class in two: The new Channel is only responsible for sending and encoding; a class called InChannel is responsible for executing packets. The InChannel class implements Runnable and has a similar function as ChannelThread. Packet dispatching is provided by the nodeos package and the ANTS run-time system combined, as described below. The following subsection explains our rationale for our dispatch model, and why we believe that it is more appropriate for ANTS; we do not claim that it is novel. Its main focus is on resource control.





Jay Lepreau
Tue Jun 2 05:48:49 MDT 1998