Giter Site home page Giter Site logo

chord-protocol's Introduction

Each node participating in the Chord lookup service is implemented as an Akka actor.

Chord.scala is the main program that starts the protocol.
Application.scala is the master actor that initializes all the Chord nodes(actors).
Node.scala implements the chord actors.



Functions of the protocol as described in the paper "Chord: A Scalable Peer-to-peer Lookup Protocol for Internet Applications" had to be modified in order to suit the actor model of programming but they are at par with the pseudocode given.
I used ask(?) feature of Akka messaging in order to query a node and get a reply back as a future.

Features: Key Lookup, New Node Join, Simultaneous requests at different nodes to calculate average no. of hops for lookup for a given network dimension(no. of Nodes).



To run the program:

cd to the directory from the terminal.

>cd CHORD-Protocol

>sbt

>run numNodes numRequests

numNodes can be: 100, 200 etc.

numRequests can be: 2, 3 etc.

Example: run 200 3

Enter the respective values when the terminal prompts:

Enter a key that you want to lookup from 0 to 65535: (Any key between 0 and 65535)

Enter ip address of the newly joining node: (ip address of the new node that's going to join the chord network: could be any string)

Do you want to see Chord in action? : yes 
(To see how Chord behaves when there are simultaneous requests at different nodes and to check the average
no. of hops it takes for the key lookup in a given network)

chord-protocol's People

Contributors

punam-mahato avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.