Giter Club home page Giter Club logo

distributed-leaderelection's Introduction

Leader Election and BFS Tree

This repository contains the implementation of Peleg's leader election algorithm and the construction of a BFS tree with the elected leader node as the root.

Team members: Kamalesh Palanisamy(kxp210004), Vignesh Thirunavukkarasu(vxt200003)

Testing the code

  • Modify the launcher file with your net id first and copy this entire directory to the dc server.
  • If you are running it on the dc server directly from your linux machine, use the launcher-linux.sh file. Otherwise, use the launcher-macos.sh file if you are using macos. Please note that the launcher-linux.sh might fail since we did not have access to linux machines to test it.
  • Although the bin files are included, they might not work due to version conflicts and platform differences.
  • To compile it, please run javac -d ./bin @compilepaths.txt and then run ./launcher-mac.sh or ./launcher-linux.sh. This should have everything up and running.

If you want to test this on your local machine, please replce the DC in config with localhost so that you can simulate a distributed network over your local host.

Developer Guide

Before modifying the code, ensure that you have modified the netid in the launcher and cleaner scripts. Ensure that you specify the path to the project correctly as well. To run the code, follow the steps given below (Note that this guide is specifically for Macs):

  • Copy this repository from your local machine to any of the dc machines. This can be done using the following command:
scp -r /path/to/repository/in/local [email protected]:/home/find/path/to/your/netid/
  • Once done, login to the directory of any one of the dc machines and run the following command:
javac -d ./bin @compilepaths.txt
  • Finally, to start executing the code, run ./launcher-mac.sh from your terminal. To ensure that the socket connections are closed properly, run ./cleaner.sh after checking the output.

Please remember that you need to perform these steps each time you make changes to the code :/ .

distributed-leaderelection's People

Contributors

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