title: Chord protocol. Distribuited Hash Table (DHT). Peer to peer. (P2P)
body: <p>I'm trying to implement this protocol: <a href="http://en.wikipedia.org/wiki/Chord_(peer-to-peer" rel="nofollow">http://en.wikipedia.org/wiki/Chord_(peer-to-peer</a>)</p>
  
  <p>What i understood from it is that each node that joins the "circle" is placed in a random place inside the circle, depending on it's hashed IP+port value. But my question is ... how can i obtain an integer value (index) for each node? How to i assign the unique hash value of the ip+port to a unique index number...Some functions check to see if for example an id is inside an interval (e.g. id>n &amp; id&lt;=successor), so it seems i need a unique int for each node, i can't just use the hash value.
  Any suggestions?</p>