I know there is a previous question about this somewhere on SO, but I cannot find it again. The relationship between NodeId and InfoHash. Is the following diagram roughly correct?
Background (no need to read)
I'm trying to implement my own DHT/bittorrent application in Java. I know that there are already some excellent implementations that I will never better. But this is purely a hedonistic pursuit. What was it Kennedy said? "we choose to do this not because it is easy.."
I have conquered the easy part, which is to write the low level socket handling and Remote Procedure Call syntax etc. Now I am on to the hard part, I must behave responsibly and service incoming requests on the DHT. (maintain KBuckets etc.)
Yes that diagram is correct. Here some python code that implements
FIND_VALUE
algorithm you describe:This is extract from qadom project peer.py.