next up previous contents
Next: Building Blocks Up: Overview Previous: Overview   Contents

Channel

To join a group and send messages, a process has to create a channel and connect to it using the group name (all channels with the same name form a group). The channel is the handle to the group. While connected, a member may send and receive messages to/from all other group members. The client leaves a group by disconnecting from the channel. A channel can be reused: clients can connect to it again after having disconnected. However, a channel allows only 1 client to be connected at a time. If multiple groups are to be joined, multiple channels can be created and connected to. A client signals that it no longer wants to use a channel by closing it. After this operation, the channel cannot be used any longer.

Each channel has a unique address. Channels always know who the other members are in the same group: a list of member addresses can be retrieved from any channel. This list is called a view. A process can select an address from this list and send a unicast message to it (also to itself), or it may send a multicast message to all members of the current view. Whenever a process joins or leaves a group, or when a crashed process has been detected, a new view is sent to all remaining group members. When a member process is suspected of having crashed, a suspicion message is received by all non-faulty members. Thus, channels receive regular messages, view messages and suspicion messages. A client may choose to turn reception of views and suspicions on/off on a channel basis.

Channels are similar to BSD sockets: messages are stored in a channel until a client removes the next one (pull-principle). When no message is currently available, a client is blocked until the next available message has been received.

A channel can be implemented over a number of alternatives for group transport. Therefore, a channel is an abstract class, and concrete implementations are derived from it, e.g. a channel implementation using its own protocol stack, or others using existing group transports. Currently, JavaGroups offers 2 implementations of channels: JChannel, which is the default group transport and EnsChannel, which is based on Ensemble [CS 97], a reliable group communication toolkit written in ML. Applications only deal with the abstract channel class, and the actual implementation can be chosen at startup time1.1.

The properties for a channel are specified in a colon-delimited string format. When creating a channel (JChannel) a protocol stack will be created according to these properties. All messages will pass through this stack, ensuring the quality of service specified by the properties string for a given channel.

The Channel API and its related classes is described in 3.


next up previous contents
Next: Building Blocks Up: Overview Previous: Overview   Contents
Bela Ban 2002-11-16