Compound Module KademliaModules

Package: oversim.overlay.kademlia
File: src/overlay/kademlia/Kademlia.ned

Implementation of the Kademlia DHT overlay as described in "Kademlia: A peer-to-peer information system based on the XOR metric" by P. Maymounkov and D. Mazieres, published in "In Proceedings of IPTPS02"

Author: Sebastian Mies, Ingmar Baumgart, Bernhard Heep

Kademlia

Usage diagram:

The following diagram shows usage relationships between types. Unresolved types are missing from the diagram. Click here to see the full picture.

Inheritance diagram:

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram. Click here to see the full picture.

Gates:

Name Direction Size Description
udpIn input

gate from the UDP layer

udpOut output

gate to the UDP layer

appIn input

gate from the application

appOut output

gate to the application

Unassigned submodule parameters:

Name Type Default value Description
kademlia.rpcUdpTimeout double

default timeout value for direct RPCs

kademlia.rpcKeyTimeout double

default timeout value for routed RPCs

kademlia.rpcExponentialBackoff bool

if true, doubles the timeout for every retransmission

kademlia.localPort int

UDP port for Chord messages

kademlia.debugOutput bool

enable debug output

kademlia.keyLength int

overlay key length in bits

kademlia.nodeId string

optional nodeId as string in hexadecimal notation

kademlia.useCommonAPIforward bool

enable CommonAPI forward() calls

kademlia.drawOverlayTopology bool

draw arrow to successor node?

kademlia.hopCountMax int

maximum number of overlay hops

kademlia.recNumRedundantNodes int

numRedundantNodes for recursive routing

kademlia.joinOnApplicationRequest bool

only join the overlay on application request

kademlia.collectPerHopDelay bool

delay statistics for single hops

kademlia.routeMsgAcks bool

use RPCs for route messages

kademlia.lookupRedundantNodes int

number of next hops in each step

kademlia.lookupParallelPaths int

number of parallel paths

kademlia.lookupParallelRpcs int

number of nodes to ask in parallel

kademlia.lookupSecure bool

true, if all nodes should be identified with a ping

kademlia.lookupMerge bool

true, if parallel Rpc results should be merged

kademlia.lookupFailedNodeRpcs bool

communicate failed nodes

kademlia.lookupStrictParallelRpcs bool

limited the number of concurrent rpcs to parameter parallelRpcs

kademlia.lookupUseAllParallelResponses bool

merge all parallel responses from earlier steps

kademlia.lookupNewRpcOnEveryTimeout bool

send a new RPC immediately after an RPC timeouts

kademlia.lookupNewRpcOnEveryResponse bool

send a new RPC after every response, even if there was no progress

kademlia.lookupFinishOnFirstUnchanged bool

finish lookup, if the last pending RPC returned without progress

kademlia.lookupVisitOnlyOnce bool

if true, the same node is never asked twice during a single lookup

kademlia.routingType string

default routing mode (iterative, semi-recursive,...)

kademlia.rejoinOnFailure bool

rejoin after loosing connection to the overlay?

kademlia.recordRoute bool

record visited hops on route

kademlia.minSiblingTableRefreshInterval double

siblingTable refresh delay

kademlia.minBucketRefreshInterval double

bucket refresh delay

kademlia.maxStaleCount int

number of timeouts before node removal

kademlia.k int

number of paths (size of k-bucket)

kademlia.b int

network diameter O(log_{2^(b)})

kademlia.s int

number of siblings

kademlia.exhaustiveRefresh bool

if true, use exhaustive-iterative lookups to refresh buckets

kademlia.pingNewSiblings bool

ping new unknown siblings?

kademlia.activePing bool

remove the following before release:

kademlia.proximityRouting bool
kademlia.proximityNeighborSelection bool
kademlia.altRecMode bool

Source code:

//
// Implementation of the Kademlia DHT overlay as described in
// "Kademlia: A peer-to-peer information system based on the XOR metric"
// by P. Maymounkov and D. Mazieres, published in "In Proceedings of IPTPS02"
//
// @author Sebastian Mies, Ingmar Baumgart, Bernhard Heep
//
module KademliaModules like IOverlay
{
    gates:
        input udpIn;   // gate from the UDP layer
        output udpOut;    // gate to the UDP layer
        input appIn;   // gate from the application
        output appOut;    // gate to the application

    submodules:
        kademlia: Kademlia {
            parameters:
                @display("p=60,60;i=block/circle");

        }
    connections allowunconnected:
        udpIn --> kademlia.udpIn;
        udpOut <-- kademlia.udpOut;
        appIn --> kademlia.appIn;
        appOut <-- kademlia.appOut;
}