The Kademlia protocol consists of four remote procedure calls
(RPCs): PING
, STORE
,
FIND_NODE
, and FIND_VALUE
.
PING
RPC probes a node to see if it is
online.
STORE
RPC instructs a node to store a [key,
value] pair for later retrieval.
FIND_NODE
RPC takes a 160-bit key as an
argument. The recipient of the FIND_NODE
RPC
returns an (IP address, UDP port, Node ID) tuple for each of
the k nodes closest to the target id.
FIND_VALUE
RPC behaves like
FIND_NODE
, returning the k nodes closest to the
target identifier with one exception – if the RPC recipient
has received a STORE
for the given key, it
returns the stored value.