next up previous contents
Next: Building Blocks Up: JavaGroups User's Guide Previous: Contents

Overview

JavaGroups is toolkit for reliable group communication. Clients can join a group, send messages to all members or single members and receive messages from members in the group. The system keeps track of the members in every group, and notifies group members when a new member joins, or an existing member leaves or crashes. A group is identified by its name. Groups do not have to be created explicitly; when a process joins a non-existing group, it will be created automatically.

To join a group, a process has to create a channel and connect to it using the group name (all channels with the same name form a 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 what other members are in the same group: a list of channel 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 received, which is installed locally in the channel. 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 actively removes the next one. 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 3 implementations of channels: JChannel, which is the default group transport, EnsChannel, which is based on Ensemble [CS 97], a reliable group communication toolkit written in ML, and IbusChannel, which uses iBus [ibu98] as transport. Applications only deal with the abstract channel class, and the actual implementation can be chosen at startup time.



 
next up previous contents
Next: Building Blocks Up: JavaGroups User's Guide Previous: Contents

1999-12-13