Coder Social home page Coder Social logo

chaitanya-basava / chandy_and_lamport_snapshot_protocol Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 262 KB

This repo contains the implementation of the chandy and lamport's snapshot protocol

Java 97.55% Shell 2.45%
chandy--lamport-snapshot-algorithm distributed-operating-systems snapshot-algorithm socket-programming termination-detection-algorithm vector-clock fidge-mattern-vector-clock map-protocol

chandy_and_lamport_snapshot_protocol's Introduction

Chandy and Lamport's Snapshot Protocol

This is the implementation of the chandy and lamport's snapshot protocol for Advanced OS course (CS 6378). It makes use of Fidge/Mattern’s vector clock protocol for timestamping the application messages.

More micro details about the implementation can be found in the project description here.

Requirements

  1. [email protected]_341
  2. [email protected]

Steps to compile and run the project

This code works by generating an executable jar file of the project and then uploading it into the dcXX machines (utd servers). It is used for invoking the application on the respective machines (passed via config file) and execute the MAP protocol node on each of them.

It uses maven for managing the build and packages and hence is a requirement for compiling and running the application smoothly.

  1. cd into the project's root directory
  2. Execute the launcher.sh script as following to generate the jar and start the MAP protocol
bash launcher.sh <project_path> <path to config file on local> <project directory on dc machine> <netid> <rsa file path>

Example:

bash launcher.sh "/Users/chaitanyabasava/Documents/chandy_and_lamport_snapshot_protocol/" "/Users/chaitanyabasava/Documents/chandy_and_lamport_snapshot_protocol/src/main/resources/config.txt" "/home/012/s/sx/sxb220302/adv_os_proj_1" sxb220302 "~/.ssh/id_rsa_dc"

we can also pass the jar file path as <project_path> in case the jar has already been built.

Example:

bash launcher.sh "/Users/chaitanyabasava/Documents/chandy_and_lamport_snapshot_protocol/target/chandy_and_lamport_snapshot_protocol-1.0-SNAPSHOT-jar-with-dependencies.jar" "/Users/chaitanyabasava/Documents/chandy_and_lamport_snapshot_protocol/src/main/resources/config2.txt" "/home/012/s/sx/sxb220302/adv_os_proj_1" sxb220302 "~/.ssh/id_rsa_dc"

NOTE: This assumes you have done the steps to enable passwordless login to dcXX machine on your local machine and have the corresponding rsa pem file.

Steps to clean up

You can use the cleanup script to clean up all the dangling processes (if any).

bash cleanup.sh <netid> <rsa file path>

Example:

bash cleanup.sh sxb220302 "~/.ssh/id_rsa_dc"

NOTE: The termination detection of the protocol should take care of this step though.

executable jar file

The latest version of the built jar file has been uploaded to google drive (link).

chandy_and_lamport_snapshot_protocol's People

Contributors

chaitanya-basava 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.