Alive Algorithm

This algorithm is used for efficient HELLO advertisements among nodes so that each node comes to know about the existence of every other node with minimum possible control overhead. The process is influenced by Chord distributed hash table.

Prerequisite
Each node maintains a table of the complete network, containing every node's identifier and other useful information such as the ip address, hard disk space etc.

Algorithm

 * 1) Each node computes the hashes of the identifiers of every node's identifier in the network (at the start as well as after each update).
 * 2) Hash values are arranged in ascending order and written down as a list.
 * 3) Each node sends the list (as a HELLO) to its succeeding node.
 * 4) On receiving the list (HELLO), a node replies with an ACK to the preceding node.

Failure Handling

 * 1) Node A is predecessor to B and B crashes.
 * 2) A sends list as HELLO to B.
 * 3) A starts timer.
 * 4) Since B is dead, ACK is not transmitted and A times out.
 * 5) A removes B from its list, and contacts B's successor C by sending the list to C.
 * 6) C replies with ACK.
 * 7) The list is propagated along the circle of nodes.