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
- Host: GitHub
- URL: https://github.com/shresth72/distributed_systems_jepsen
- Owner: Shresth72
- Created: 2024-04-14T14:03:09.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-18T09:09:01.000Z (about 2 years ago)
- Last Synced: 2024-05-18T10:22:40.088Z (about 2 years ago)
- Topics: distributed-systems, nodes, payload-generation, rust, state-machine, stdio-stream, testing
- Language: Rust
- Homepage:
- Size: 6.16 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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.
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
```
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
```
- [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
Go follow him now, the best rust guy
- # John Gjenset - [Johnhoo](https://www.youtube.com/@jonhoo)