Research Article

A Persistent Structured Hierarchical Overlay Network to Counter Intentional Churn Attack

Algorithm 5

Key lookup operation in proposed architecture.
Key_Lookup
  // lookup algorithm for key issued by node
  () If is a super node of tree , then
  () If ( can answer query) then
// if issued query lies in local tree
  () Node = .Search_Tree()
  () Else // if cannot answer the query
  ()  = .Find_Tree()
  // query is routed in the top layer overlay to find the super node responsible for the key
  () Node = .Search_Tree()
  // find the node responsible for the storage of key in tree
  () Else
  // is not a super node
  () If ( can answer query) then
// if issued query lies in local sub tree range
  () 
  () Node = .Search_Tree()
  () Else // if query is not in local subtree
  () .Forward _Request(, root)
  // node will forward the key lookup request to its root
  () Go to step ().
  () 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 request from node to the root of the tree
  () If ( is not a root node), then
  ()  = parent()
  () .Forward_Request(, Root)
  () else
  () Root =
Return