next up previous contents
Next: Disabling IP multicast Up: Using JavaGroups Previous: Using multiple channels

Disabling IP multicast

The UDP layer of the JChannel protocol stack by default uses IP multicast to broadcast messages to all group members. However, in some environments, using IP multicast may not be possible:

In these cases, instead of sending an IP multicast message to n group members, n unicast messages can be sent. Although not as efficient (and using more bandwidth), it is sometimes the only possibility to reach group members.

IP multicasting is used in 2 situations:

1.
To discover the initial membership of a group (when a channel is created). This is done in the PING layer.

2.
To broadcast messages to all group members. This is done in the UDP layer.

To disable the use of IP multicast, UDP has to be instructed to use unicast instead of multicast messages to send messages to the group (see 3.7.1) and a gossip daemon (see 3.7.2) has to be used to find the initial membership of a group. Note that it is possible to mix unicast and multicast: to use the gossip daemon to find the initial members, but then to use regular IP multicast to send messages, or to use IP multicast to find initial members and then use unicast messages to send messages to all members. However, in most cases, either IP multicast or unicast will be used for both types of communication.

To find out whether IP multicasting is enabled at all, the demo program JavaGroups/tests/Mcast.java can be used: it has to be started on each host, and messages sent by one Mcast process should be received by all others.



 
next up previous contents
Next: Disabling IP multicast Up: Using JavaGroups Previous: Using multiple channels

1999-08-19