Giter Club home page Giter Club logo

cs553-distributingalgorithms's Introduction

CS553 Distributed Computing Project => Distributed Algorithms Simulation

This project is a simulation of various distributed computing algorithms implemented in Scala using the Akka framework. We use lightbend telemetry to monitor the performance of the simulation. The project includes the following features:

  • Automated simulation of distributed algorithms based on a simulation plan
  • Support for message-passing and shared memory algorithms
  • Integration with Lightbend Telemetry for monitoring the performance of the simulation
  • Visualization of the simulation results using Lightbend Telemetry on Prometheus and Grafana
  • Integration tests for the simulation
  • Unit tests for the shared memory algorithms

Simulation Architecture

Simulation Architecture

Prerequisites

Before you begin, ensure you have met the following requirements:

  • You have installed version 17 of Java, supported version of Scala, and sbt.

Setting Up and Running the Project

  1. Clone the repository to your local machine using git clone.
  2. Navigate to the project directory using cd <project-directory>.
  3. Create a lightbend.sbt file in the project root directory with your Lightbend Telemetry credentials. For more information on obtaining these credentials and setting up Lightbend Telemetry, refer to the official documentation.
  4. Run sbt in the command line to start the sbt shell.
  5. Inside the sbt shell, execute clean compile run <simplan.json> to clean the project, compile the source code, and run the project with the specified simulation plan.

Running Tests

This project includes both unit tests and integration tests. To run them, use the following command in the sbt shell:

sbt clean compile test

Testing Approach

Testing Architecture

Mutex Tests

Algorithms

Simulator (Main system actor controlling the simulation)

  • Reads simulation plan from a JSON file
  • Sends message to initialise the network for simulation
  • Waits for nodes to register themself, get ready for simulation
  • Changes node behaviour based on simulation plan
  • Sends message to start simulation
  • Waits for simulation to complete
  • Weight throwing for termination detection (Slight Variation)
  • Moves to next simulation plan

Message Passing based Algorithms

  • Ricart Agarwal
  • Ricart Agarwal Carvalho Extension
  • Raymonds Algorithm
    • Echo Algorithm for Spanning Tree Building
  • Agrawal El Abbadi
    • Strongly Accurate Failure Detector (Based on heartbeats)

Shared Memory (Converted to Message Passing) based Algorithms

  • Peterson's Algorithm (Two Process)
    • Uses a custom actor for maintianing shared memory (Petersons Shared Mem Actor)
  • Peterson's Algorithm (Tournament for N Processes)
    • Uses a custom actor for maintianing shared memory (Peterson Tournament Shared Mem Actor)
  • Bakery Algorithm
    • Uses a custom actor for maintianing shared memory (Bakery Shared Mem Actor)
  • Test and Set Lock Algorithm
    • Uses a custom actor for maintianing shared memory (Test and Set Shared Mem Actor)
  • Test and Test and Set Lock Algorithm
    • Uses a custom actor for maintianing shared memory (Test and Test and Set Shared Mem Actor)

Simulation Plan

Election

  • Chang Roberts
  • Franklin
  • Dolev Klawe Rodeh
  • Tree Election
  • Echo Election

Election Plan

Routing

  • Chandy-Misra Algorithm with Djikstra-Scholten Termination
  • Merlin-Segall Algorithm
  • Touegs Algorithm - Floyd Warshall Algorithm in Distributed Setting
  • Frederickson Algorithm

Routing Plans

Telemetry

The below image shows the telemetry data for the simulation run with the mutexsimplan.json simulation plan.

Mutex Telemetry

cs553-distributingalgorithms's People

Contributors

kaushal1011 avatar thecoderenroute avatar hjhirp avatar dhwanishingala avatar

Watchers

0x1D0CD00D avatar  avatar  avatar

Forkers

0x1docd00d

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.