Research Article

A Persistent Structured Hierarchical Overlay Network to Counter Intentional Churn Attack

Algorithm 2

Peer join operation in proposed architecture.
Join ,
// node wants to join the overlay network and knows a node that is currently a member of overlay network.
  () If is a super node(top layer node), then
  () If host tree is responsible for , then
  () Go to step ().
  () Else
  ()  = Find_Tree()
   // joining node perform a tree lookup, which is routed in the top level overlay to the super node responsible for the key.
  () .Join_Tree()
  () else // if n2 is not a super node
  () .Forward_Request(root) // node will forward the ’s join request to its root
  () if root node(host tree) is the super node responsible for the key, then
  () .Join_Tree()
  () else //if root node(host tree) is not responsible for the key
  () = Find_Tree()
  () .Join_Tree()
  () Return.
  
.Find_Tree
// node will find the super node responsible for node
  () = (, successor)
  () if
   // super node responsible for the key is found
  () return
  () else
   // forward the query to next node of the ring
  () .Find_Tree ()
.Forward_Request , Root
// Forward the join request from node to the root of the tree
  () If ( is not a root node), then
  () = parent()
  () .Forward_Request(, Root)
  () else
  () Root =
  () return