Simple Module Pastry

File: Overlay/Pastry/Pastry.ned

C++ definition: click here

The main module of the Pastry implementation

Author: Felix Palmen

Usage diagram:

The following diagram shows usage relationships between modules, networks and channels. Unresolved module (and channel) types are missing from the diagram. Click here to see the full picture.

Used in compound modules:

If a module type shows up more than once, that means it has been defined in more than one NED file.

PastryModules

Implementation of the Pastry KBR overlay as described in "Pastry: Scalable, Decentralized Object Location, and Routing for Large-Scale Peer-to-Peer Systems" by Antony Rowstron and Peter Druschel, published in Lecture Notes in Computer Science, volume 2218.

Parameters:

Name Type Description
keyLength numeric

length of Overlay Key

localPort numeric

UDP port for Pastry messages

debugOutput bool

enable debug output

hopCountMax numeric

maximum number of overlay hops

joinOnApplicationRequest bool

only join the overlay on application request

drawOverlayTopology bool

draw arrow to successor node?

routingType string

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

recNumRedundantNodes numeric

numRedundantNodes for recursive routing

collectPerHopDelay bool

delay statistics for single hops

lookupRedundantNodes numeric

number of next hops in each step

lookupParallelPaths numeric

number of parallel paths

lookupParallelRpcs numeric

number of nodes to ask in parallel

lookupSecure bool

true, if all nodes should be identified with a ping

lookupMerge bool

true, if parallel Rpc results should be merged

lookupStrictParallelRpcs bool

limited the number of concurrent rpcs to parameter parallelRpcs

lookupUseAllParallelResponses bool

merge all parallel responses from earlier steps

lookupNewRpcOnEveryTimeout bool

send a new RPC immediately after an RPC timeouts

lookupNewRpcOnEveryResponse bool

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

lookupFinishOnFirstUnchanged bool

finish lookup, if the last pending RPC returned without progress

lookupFailedNodeRpcs bool

communicate failed nodes

enableNewLeafs bool

enable Pastry API call newLeafs()

useCommonAPIforward bool

enable forwarding of routeMessages to app before routing them

routeMsgAcks bool

use RPCs for route messages

optimizeLookup bool

whether to search the closest node in findCloserNode() calls

optimisticForward bool

forward message immediately in recursive mode, otherwise ping first

avoidDuplicates bool

when node seems unreachable but msg already sent, do not retry

partialJoinPath bool

allow join even with missing state message along the routing path

bitsPerDigit numeric

bits per Pastry digit

numberOfLeaves numeric

number of entries in leaf set

numberOfNeighbors numeric

number of entries in neighborhoot set

joinTimeout numeric

seconds to wait for STATE message from closest node

readyWait numeric

seconds to wait for missing state messages in JOIN phase

secondStageWait numeric

how long to wait before starting second stage of init phase

repairTimeout numeric

how long to wait for repair messages

ringCheckInterval numeric

check direct neighbors on the ring every x seconds (0 to disable)

sendStateWaitAmount numeric

how long to wait when sending state tables delayed (should be very small)

pingTimeout numeric

how long to wait for PING reply

pingRetries numeric

how often to retry PING after timeout

useRegularNextHop bool
alwaysSendUpdate bool
coordBasedRouting bool

use coord-based routing

numCoordDigits numeric

numbner of digits used for coord-based routing

CBRstartAtDigit numeric

start at this digit using CBR

CBRstopAtDigit numeric

stop at this digit using CBR

useSecondStage bool

enable second stage of join as described in the original pastry paper

useDiscovery bool

join at nearest node, otherwise use bootstrapnode

sendStateAtLeafsetRepair bool

use state messages for leafset repair, otherwise use leafset messages

periodicMaintenance bool

enable periodic routing table maintenance

discoveryTimeoutAmount numeric

how long to wait for leafset pings in discovery stage

repairTaskTimeoutAmount numeric

interval for periodic routing table maintenance

overrideOldPastry bool

pastry configuration according to the original paper

overrideNewPastry bool

optimized pastry configuration

Gates:

Name Direction Description
from_udp [ ] input

gate from the UDP layer

to_udp [ ] output

gate to the UDP layer

from_app input

gate from the application

to_app output

gate to the application

direct_in input

gate for sendDirect

Source code:

simple Pastry

    parameters:
        keyLength: numeric,             // length of Overlay Key
        localPort: numeric,             // UDP port for Pastry messages
        debugOutput: bool,              // enable debug output
        hopCountMax: numeric,           // maximum number of overlay hops
        joinOnApplicationRequest: bool, // only join the overlay on application
                                        // request
        drawOverlayTopology: bool,      // draw arrow to successor node?
        routingType : string, // default routing mode (iterative, semi-recursive,...)
        recNumRedundantNodes : numeric, // numRedundantNodes for recursive routing
        collectPerHopDelay : bool,      // delay statistics for single hops
        lookupRedundantNodes : numeric, // number of next hops in each step
        lookupParallelPaths : numeric,  // number of parallel paths
        lookupParallelRpcs : numeric,   // number of nodes to ask in parallel
        lookupSecure : bool,            // true, if all nodes should be
                                        // identified with a ping
        lookupMerge : bool,             // true, if parallel Rpc results should
                                        // be merged
        lookupStrictParallelRpcs: bool, // limited the number of concurrent rpcs to parameter parallelRpcs
        lookupUseAllParallelResponses: bool, // merge all parallel responses from earlier steps
        lookupNewRpcOnEveryTimeout: bool, // send a new RPC immediately after an RPC timeouts
        lookupNewRpcOnEveryResponse: bool, // send a new RPC after every response, even if there was no progress
        lookupFinishOnFirstUnchanged: bool, // finish lookup, if the last pending RPC returned without progress                                        
        lookupFailedNodeRpcs : bool,    // communicate failed nodes
        enableNewLeafs : bool,          // enable Pastry API call newLeafs()
        useCommonAPIforward : bool,     // enable forwarding of routeMessages to
                                        // app before routing them
        routeMsgAcks : bool,           // use RPCs for route messages                                
        optimizeLookup : bool,          // whether to search the closest node
                                        // in findCloserNode() calls
        optimisticForward : bool,       // forward message immediately in
                                        // recursive mode, otherwise ping first
        avoidDuplicates : bool,         // when node seems unreachable but msg
                                        // already sent, do not retry
        partialJoinPath : bool,         // allow join even with missing state
                                        // message along the routing path
        bitsPerDigit: numeric,          // bits per Pastry digit
        numberOfLeaves: numeric,        // number of entries in leaf set
        numberOfNeighbors: numeric,     // number of entries in neighborhoot set
        joinTimeout: numeric,           // seconds to wait for STATE message
                                        // from closest node
        readyWait: numeric,             // seconds to wait for missing state
                                        // messages in JOIN phase
        secondStageWait: numeric,       // how long to wait before starting
                                        // second stage of init phase
        repairTimeout: numeric,         // how long to wait for repair messages
        ringCheckInterval: numeric,     // check direct neighbors on the ring
                                        // every x seconds (0 to disable)
        sendStateWaitAmount: numeric,   // how long to wait when sending state
                                        // tables delayed (should be very small)
        pingTimeout: numeric,           // how long to wait for PING reply
        pingRetries: numeric,           // how often to retry PING after
                                        // timeout
        useRegularNextHop: bool,
        alwaysSendUpdate: bool,
        coordBasedRouting: bool,        // use coord-based routing
        numCoordDigits: numeric,        // numbner of digits used for
                                        // coord-based routing
        CBRstartAtDigit: numeric,       // start at this digit using CBR 
        CBRstopAtDigit: numeric,        // stop at this digit using CBR

        useSecondStage: bool,           // enable second stage of join as described in the original pastry paper
        useDiscovery: bool,             // join at nearest node, otherwise use bootstrapnode
        sendStateAtLeafsetRepair: bool, // use state messages for leafset repair, otherwise use leafset messages
        periodicMaintenance: bool,      // enable periodic routing table maintenance
        discoveryTimeoutAmount: numeric,// how long to wait for leafset pings in discovery stage
        repairTaskTimeoutAmount: numeric,// interval for periodic routing table maintenance

        overrideOldPastry: bool,    // pastry configuration according to the original paper
        overrideNewPastry: bool;    // optimized pastry configuration

    gates:
        in: from_udp[];                 // gate from the UDP layer
        out: to_udp[];                  // gate to the UDP layer
        in: from_app;                   // gate from the application
        out: to_app;                    // gate to the application
        in: direct_in;                  // gate for sendDirect
endsimple