notes to dht impl and related
[brdnet.git] / dht.pas
blob475e5a58a711406be7536869de121d5324a90901
1 unit DHT;
3 implementation of custom dht, based on pastry and kademlia.
4 keyspace is divided into buckets of limited capacity
5 node belongs to bucket, where at least 'depth' bits match 'prefix'
6 old>new,
7 new>dead
10 {used by: messages, fileshare}
12 INTERFACE
13 uses NetAddr;
14 type tPID=array [0..19] of byte;
15 var MyID:tPID;
16 procedure AddNode(const contact:tNetAddr);
17 procedure Get(const id:tPID; out result:array of tNetAddr);
19 IMPLEMENTATION
21 {communication:
22 ping-pong;
23 request for ... key
24 ...: node, file, profile, ?dir
25 profile: key, firends, dirs
26 nodes
27 values
30 END.