Giter VIP home page Giter VIP logo

chorddht's Introduction

Summary

This is a distributed dictionary that can save Key-Value pairs in a network of nodes. The network implements a Chord-like logic using java RMI for RPC. Maven is used to build the fat JARs required in order to run the project. The project consists of 2 JARs that need to be built, the BootStrapNode JAR and the ChordNode JAR both of which can be built by changing the MainClass in pom.xml (line 24) to either ChordNodeImpl or BootStrapNodeImpl. At any given time a BootStrap node must be online with a known IP as all the Client nodes (ChordNodes) will need to contact the bootstrap node in order to join the network, the bootstrap node serves as a well known point of entry in the network and handles the initial join of every node.

Tools Required

Apache Maven

Java 8+ (Added java9 support)

Docker, if the deployment method is a docker swarm.

Instructions

  1. Change the pom.xlm MainClass (line 24) as mentioned in the summary.

  2. Build the maven project (or use the precompiled JARs) by running:

     mvn clean compile assembly:single
    

3a. To setup the BootStrap Node run rmiregistry command in the target/classes folder of the bootstrap built mvn project and then execute the bootstrap jar.

    rmiregistry &
    
    java -jar target/ChordDHT-1.0-SNAPSHOT-jar-with-dependencies.jar

3b. To setup the Client Node simply run (followed by example):

    java -jar target/ChordDHT-1.0-SNAPSHOT-jar-with-dependencies.jar [local IP] [BootStrap Node IP]
    
    java -jar target/ChordDHT-1.0-SNAPSHOT-jar-with-dependencies.jar localhost 147.27.70.106       

4 . If done correctly a log would have spawned in the logs directory with additional info.

5 . Use the CLI for more options.

For more information consult the available javadoc under the javadoc folder.

Experimental evaluation

A small presentation/report along with a spreadsheet of experiments can be found in the reports folder.

Sources

  1. Chord Paper: http://cs.brown.edu/courses/csci2950-g/papers/chord.pdf
  2. Open Chord site: http://open-chord.sourceforge.net/
  3. Java RMI documentation: http://docs.oracle.com/javase/7/docs/technotes/guides/rmi/
  4. Docker documentation: https://docs.docker.com/engine/installation/linux/ubuntu/#install-docker
  5. Maven documentation: http://maven.apache.org/guides/
  6. IntelliJ IDEA Website: https://www.jetbrains.com/idea/specials/idea/idea.html

chorddht's People

Contributors

gstamatakis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

uuuqx hexabot

chorddht's Issues

Question regarding to the Zone

Hi gstamatakis,

I walk through your code, it is very standard.

But I have a question in BootStrapNodeImpl.java:
Why the Chord ring is divided into m zones since the maxNodes is 2^m, and in your implement of isZoneFilled method, it only traverses m nodeIds, and look back to the call in addNodeToRing method, there are m zones going to be checked whether they are fully filled or not, as a result, only m^2 nodeIds have been traversed, you will miss so many nodes when m grows up.

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.