Coder Social home page Coder Social logo

kademlia's Introduction

kademlia

Assignment for the course on Distributed Systems 2 and Simulation and Performance Evaluation.

The goal of this assignment is to implement the Kademlia protocol in Python and simulate its behaviour to later conduct a performance evaluation analysis. In order to have a protocol to which compare Kademlia to, we also implement the Chord DHT.

For the course on Distributed Systems 2 we implemented the simulator for the Kademlia protocol and for the Chord protocol, along with some basic performance evaluation.

For the course on Simulation and Performance Evaluation we refactored the whole simulator in order to have more control and granularity on the creation of events for message handling. We also enhanced the Chord protocol in order to make it as robust as the Kademlia protocol in case of node failures by giving each node a set of K identities. Then, we introduced nodes joining and crashing during the simulation in order for Chord to be forced to implement periodic finger table updates to make the comparison between the protocols fair.

Installation

  • Clone this repository:
    git clone [email protected]:GiovanniZotta/kademlia.git
    
  • [Optional] Create a virtual environment:
    python3 -m venv path-to-venv
    source path-to-venv/bin/activate
    
  • Install the package in edit mode:
    pip install -e "kademlia[test]"
    
  • Check that all the tests are working:
    pytest
    
  • Try it out! To run a simulation for both DHTs you can use the following command:
    make plots NODES=100 TIME=1000 RATE=0.1
    
  • The plots will end up in res/plots. The Makefile offers various commands such as:
    make plots
    make plot_network
    make plot_arrival_rate
    

Plots

Our simulator offers the possibility to make a chart of the DHT from the perspective of a node.

Kademlia

Chord

kademlia's People

Contributors

giovannizotta avatar masinag avatar

Stargazers

samuele girardelli avatar  avatar Dawn avatar  avatar

Watchers

 avatar  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.