next up previous contents
Next: Using TCP and TCPGOSSIP Up: TCP Previous: TCP   Contents

Using TCP and TCPPING

A protocol stack using TCP and TCPPING looks like this (other protocol omitted):

      "TCP(start_port=7800):" +
      "TCPPING(initial_hosts=HostA[7800],HostB[7800];port_range=5;timeout=3000;" +
               "num_initial_members=3;up_thread=true;down_thread=true):" +

The concept behind TCPPING is that no external daemon such as GossipServer is needed. Instead some selected group members assume the role of well-known hosts from which initial membership information can be retrieved. In the example HostA and HostB are designated members that will be used by TCPPING to lookup the initial membership. The property start_port in TCP means that each member should try to assign port 7800 for itself. If this is not possible it will try the next higher port (7801) and so on, until it finds an unused port.

TCPPING will try to contact both HostA and HostB, starting at port 7800 and ending at port 7800 + port_range, in the above example ports 7800 - 7804. Assuming that at least one of HostA or HostB is up, a response will be received. To be absolutely sure to receive a response all the hosts on which members of the group will be running can be added to the configuration string.


next up previous contents
Next: Using TCP and TCPGOSSIP Up: TCP Previous: TCP   Contents
Bela Ban 2002-11-16