An open API service indexing awesome lists of open source software.

https://github.com/shresth72/distributed_systems_jepsen

Distributed System Testing based on Jepsen
https://github.com/shresth72/distributed_systems_jepsen

distributed-systems nodes payload-generation rust state-machine stdio-stream testing

Last synced: over 1 year ago
JSON representation

Distributed System Testing based on Jepsen

Awesome Lists containing this project

README

          

Jepsen Based Distributed Systems Implementation


This is a Node implementation for a Distributed System based on Jepsen, along with testing for each part.


### About

An implementation of challenges on the [fly.io](https://fly.io/dist-sys/1/), which is built on Jepsen. Nodes for Distributed Systems are built in Rust binaries, that accepts failures and verification requests from the Maelstrom tester.

### Prerequisites

Currently, the testing is entirely handeled by the Maelstrom platform written in Clojure, so install the prerequisites required for using it. (Working on building the testing platform for the same)

##### Install OpenJDK

#### Ubuntu: 20.04, 22.04

```bash
sudo apt-get install openjdk-17-jdk
```

#### Arch

```bash
sudo pacman -sS java | grep jre
```

---

##### Or Install with Brew along with Graphviz and Gnuplot

```bash
brew install openjdk graphviz gnuplot
```

##### Download and unpack the Maelstrom tarball file

```bash
wget https://github.com/jepsen-io/maelstrom/releases/download/v0.2.3/maelstrom.tar.bz2

tar -xvjf maelstrom.tar.bz2
```

## 🔧 Running the tests

There are 6 challenges that can be tested with the Maelstrom tester.

### Echo Test

```
~/maelstrom/maelstrom test -w echo --bin target/debug/echo --node-count 1 --time-limit 10
```

### Unique ID Generation Test

```
~/maelstrom/maelstrom test -w unique-ids --bin target/debug/unique-ids --time-limit 30 --rate 1000 --node-count 3 --availability total --nemesis partition
```

### Node Broadcast Test

Increase the node count for Multi Node Broadcast testing.

```
~/maelstrom/maelstrom test -w broadcast --bin target/debug/broadcast --node-count 1 --time-limit 20 --rate 10
```

### Grow Only Counter Test

The Grow Counter is available globally using either the Maelstrom Api or the Udp Server implemented in a binary file. Maelstrom Api one is available in Go, so use the implementation.

```
cargo run --bin gcounter_server

~/maelstrom/maelstrom test -w g-counter --bin target/debug/grow_counter --node-count 3 --rate 100 --time-limit 20 --nemesis partition
```

### Node Logs Test

The Logger is also available with the Maelstrom Api in Go. Increase the Node count for Multi Node Log Testing.

```
cargo run --bin log_server

~/maelstrom/maelstrom test -w kafka --bin target/debug/logs_global --node-count 1 --concurrency 2n --time-limit 20 --rate 1000
```

## ⛏️ Built Using

- [Rust](https://www.rust-lang.org/)
- [Tokio](https://tokio.rs/) for the UDP Key Value Store Server
- [Maelstrom](https://github.com/jepsen-io/maelstrom) for Testing

## Acknowledgements

Go follow him now, the best rust guy

- # John Gjenset - [Johnhoo](https://www.youtube.com/@jonhoo)