-1

I want to do a peer-to-peer network simulation using Kademlia protocol in PeerSim. There is a kademlia module for Peersim (in Java) which is good, but it skipped implementation of the STORE procedure. I think it's difficult to write a module for it from scratch. So it's better to add this feature to current module, but I don't know how to do it.

It will be great if someone show me the way to add STORE RPC to Kademlia.

This is the kademlia module for peersim.

Thanks in advance

Amir
  • 486
  • 3
  • 10
  • 17

1 Answers1

0

I recommend reading the kademlia paper first to understand the concepts.

I assume you already have an implementation of the FIND_NODE iterative lookup.

A FIND_VALUE lookup builds on FIND_NODE by returning stored data - if remote nodes have any - for a particular target key instead of/in addition to further nodes.

A STORE uses the closest-to-target-key set of nodes that responded during a FIND_VALUE lookup and sends data to the remote nodes that they keep in memory, associated with the key under which it has been stored. They will return that data during a FIND_VALUE query.

So most of what you need should already be there, you'll just have to add another subclass or whatever (haven't looked at the source).

the8472
  • 40,999
  • 5
  • 70
  • 122