Search code examples
gokademlia

Can two nodes exchange messages directly?


I'm doing some research on Kademlia based decentralized networks. After bootstrapping a new node, instead of broadcasting messages to the nearest nodes, can a message be sent to a specific node identified by its ID? (Even if that means to relay the message to multiple peers before reaching the destination).


Solution

  • Kademlia is an abstract routing algorithm combined with a set of operations required to build a distributed hash table. The concept of broadcasts does not exist in kademlia-as-algorithm.

    But concrete implementations can add features on top of this foundation. Since kademlia provides the iterative find_node procedure (there's no forwarding!) you can locate a node and then exchange any number and type of additional messages for which they have mutual support.