Question

I'm trying to implement this protocol: http://en.wikipedia.org/wiki/Chord_(peer-to-peer)

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 & id<=successor), so it seems i need a unique int for each node, i can't just use the hash value. Any suggestions?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top