Skip to content

Commit

Permalink
readme, sys arch, test arch! 🎉 ✨ 🎨
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaushal1011 committed Apr 26, 2024
1 parent 7dea970 commit c6936cc
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 20 deletions.
37 changes: 17 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
# CS553 Distributed Computing Project => Distributed Algorithms Simulation

This project is a simulation of various distributed computing algorithms implemented in Scala using the Akka framework.
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




## Testing Architecture

![Simulation Architecture](docs/assets/553sysarch.png)

## Prerequisites

Before you begin, ensure you have met the following requirements:
- You have installed version 17 of [Java](https://www.oracle.com/java/technologies/javase-jdk17-downloads.html), [Scala](https://www.scala-lang.org/download/), and [sbt](https://www.scala-sbt.org/download.html).
- You have installed version 17 of [Java](https://www.oracle.com/java/technologies/javase-jdk17-downloads.html), supported version of [Scala](https://www.scala-lang.org/download/), and [sbt](https://www.scala-sbt.org/download.html).


## Setting Up and Running the Project
Expand All @@ -32,6 +34,10 @@ This project includes both unit tests and integration tests. To run them, use th
sbt clean compile test
```

### Testing Approach

![Testing Architecture](docs/assets/553testarch.png)

### Mutex Tests

- Test cases for all algorithms (Integration Testing Based on Log Analysis). Directory [`src/test/scala/com/distcomp/mutex`](src/test/scala/com/distcomp/mutex).
Expand Down Expand Up @@ -74,21 +80,12 @@ sbt clean compile test
- 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](./mutexsimplan.json)

1. Ricart Agarwal
2. Ricart Agarwal Carvalho Extension
3. Raymonds Algorithm
4. Agrawal El Abbadi
5. Peterson's Algorithm (Tournament for N Processes) 26 Processes
6. Peterson's Algorithm (Tournament for N Processes) 8 Processes
7. Peterson's Algorithm (Two Process)
8. Bakery Algorithm
9. Test and Set Lock Algorithm
10. Test and Test and Set Lock Algorithm
> [Simulation Plan](./mutexsimplan.json)

### Telemetry

![Mutex Telemetry](./assets/mutexsimplanrun.png)
The below image shows the telemetry data for the simulation run with the `mutexsimplan.json` simulation plan.

![Mutex Telemetry](docs/assets/mutexsimplanrun.png)

15 changes: 15 additions & 0 deletions docs/MutexAlgorithms.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ This document provides a detailed explanation of the mutex algorithms implemente
The mutex module in this project implements various mutual exclusion algorithms. These algorithms are used to prevent concurrent processes from accessing shared resources simultaneously, thus avoiding potential conflicts or inconsistencies.
All the algorithms implemented from the mutual exclusion chapter of the textbook ["Distributed Algorithms, Second Edition An Intuitive Approach, W Fokik"](https://mitpress.mit.edu/9780262037662/distributed-algorithms/) which provides an intuitive approach to learning them by summarising and elaborating on individual paper.



## Algorithms Implemented

The following algorithms are implemented in this project:
Expand All @@ -20,6 +22,19 @@ The following algorithms are implemented in this project:
8. Test and Set Lock Algorithm
9. Test and Test and Set Lock Algorithm

### [Simulation Plan](../mutexsimplan.json)

1. Ricart Agarwal
2. Ricart Agarwal Carvalho Extension
3. Raymonds Algorithm
4. Agrawal El Abbadi
5. Peterson's Algorithm (Tournament for N Processes) 26 Processes
6. Peterson's Algorithm (Tournament for N Processes) 8 Processes
7. Peterson's Algorithm (Two Process)
8. Bakery Algorithm
9. Test and Set Lock Algorithm
10. Test and Test and Set Lock Algorithm

## Algorithm Details

### [Ricart Agarwal](../src/main/scala/com/distcomp/mutex/RicartaAgarwal.scala)
Expand Down
Binary file added docs/assets/553sysarch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/553testarch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes

0 comments on commit c6936cc

Please sign in to comment.