File Overlay/Koorde/Koorde.ned

Contains:

//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
//


import
    "../Chord/Chord";

simple Koorde
    parameters:
        debugOutput: bool, // enable debug output?
        stabilizeDelay: numeric, // number of seconds between two stabilize algo calls
        hopCountMax: numeric, // maximal number of hops
        keyLength: numeric, // overlay key length	
        joinOnApplicationRequest: bool, // only join the overlay on application request

        useCommonAPIforward: bool, // enable CommonAPI forward() calls
        collectPerHopDelay: bool, // delay statistics for single hops
        routeMsgAcks: bool, // use RPCs for route messages
        routingType: string, // default routing mode (iterative, semi-recursive,...)
        recNumRedundantNodes : numeric, // numRedundantNodes for recursive routing

        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

        stabilizeRetry: numeric, // retries before neighbor considered failed
        joinRetry: numeric, // number of join retries
        joinDelay: numeric, // time interval between two join tries
        successorListSize: numeric, // maximal number of nodes in successor list
        deBruijnListSize: numeric, // maximal number of nodes in de Bruijn list
        shiftingBits: numeric, // number of bits concurrently shifted
        deBruijnDelay: numeric, // number of seconds between two de Bruijn algo calls
        fixfingersDelay: numeric, // relic from Chord
        aggressiveJoinMode: bool, // use modified (faster) JOIN protocol
        extendedFingerTable: bool, // use the extended finger table?
        numFingerCandidates: numeric,
        proximityRouting: bool, // use proximity routing
        drawOverlayTopology: bool, // draw arrow to successor node?
        //deBruijnRetry : numeric,    // number of de Bruijn retries
        //resetDeBruijnNode: numeric,
        useOtherLookup: bool, // flag which is indicating that the optimization other lookup is enabled
        useSucList: bool, // flag which is indicating that the optimization using the successorlist is enabled
        localPort: numeric, // UDP port for Koorde messages
        mergeOptimizationL1: bool, // enable merge optimization OPL1
        mergeOptimizationL2: bool, // activate merge optimization OPL2
        mergeOptimizationL3: bool, // activate merge optimization OPL3
        mergeOptimizationL4: bool; // activate merge optimization OPL4
    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

//
// Implementation of the Koorde DHT overlay as described in
// "Koorde: A simple degree-optimal distributed hash table"
// by M. Frans Kaashoek and David R. Karger,. published in
// Proceedings of the 2nd International Workshop on
// Peer-to-Peer Systems (IPTPS '03).
//
module KoordeModules
    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

    submodules:
        koorde: Koorde;
            display: "p=60,60;i=block/circle";
        successorList: ChordSuccessorList;
            display: "p=136,60;i=block/table";
    connections nocheck:
        from_udp --> koorde.from_udp++;
        to_udp <-- koorde.to_udp++;
        from_app --> koorde.from_app;
        to_app <-- koorde.to_app;

endmodule