next up previous contents
Next: Installation and Configuration Up: Overview Previous: Building Blocks

The JChannel Protocol Stack

As discussed above, JavaGroups provides 3 channel implementations: an Ensemble-based channel, an iBus-based channel, and its own channel based on a Java protocol stack, called JChannel. JChannel is a protocol stack containing a number of protocol layers in a bidirectional list. All messages sent and received over the channel have to pass the protocol stack. Every layer may modify, reorder, pass or drop a message, or add a header to a message. A fragmentation layer might break up a message into several smaller messages, adding a header with an id to each fragment, and re-assemble the fragments on the receiving side.

The composition of the protocol stack, i.e. its layers, is determined by the creator of the channel: a property string defines the layers to be used (and the parameters for each layer). This string might be interpreted differently by each channel implementation; in JChannel it is used to create the stack, depending on the protocol names given in the property.

Knowledge about the protocol stack is not necessary when only using channels in an application. However, when an application wishes to ignore the default properties for a protocol stack, and configure their own stack, then knowledge about what the individual layers are supposed to do is needed. Although it is syntactically possible to stack any layer on top of each other (they all have the same interface), this wouldn't make sense semantically in most cases.

If a new protocol is to be created for JavaGroups using the JChannel protocol stack, or if an existing protocol is to be modified, then knowledge about its implementation is necessary. Implementing a simple protocol is not difficult, however, one has to know the environment in which the protocol will be embedded, e.g. what events it will receive, when it is supposed to be started/stopped etc. The implementation of the JChannel protocol stack is discussed in chapter 4.


next up previous contents
Next: Installation and Configuration Up: Overview Previous: Building Blocks

1999-12-13