https://github.com/mikeleo03/raft-consensus-distributed-storage
Distributed Key-Value Store created with Consensus Protocol: Raft using RPC Communication
https://github.com/mikeleo03/raft-consensus-distributed-storage
distributed-systems grpc-client key-value-store python3 raft-consensus-algorithm react website
Last synced: 5 months ago
JSON representation
Distributed Key-Value Store created with Consensus Protocol: Raft using RPC Communication
- Host: GitHub
- URL: https://github.com/mikeleo03/raft-consensus-distributed-storage
- Owner: mikeleo03
- Created: 2024-06-13T10:51:33.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-13T11:01:26.000Z (over 1 year ago)
- Last Synced: 2025-03-16T22:37:49.132Z (9 months ago)
- Topics: distributed-systems, grpc-client, key-value-store, python3, raft-consensus-algorithm, react, website
- Language: Python
- Homepage:
- Size: 187 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
  
Table of Contents
# About The Project
This project is a distributed key-value in-memory storage system that offers several core functionalities and ensures consistency and availability within a cluster. The system is implemented using Python, Flask, NodeJS, and React. The system is based on the Raft consensus protocol, which is a consensus algorithm for managing a replicated log. It allows a collection of machines to work as a single coherent group that can survive the failures of some of its members.

# Features
## Core Services
| Service | Description | Command | Response |
| --- | --- | --- | --- |
| Ping | Check connection with the server | `ping` | `PONG` |
| Get | Retrieve value associated with a key | `get ` | `"value"` |
| Set | Set a value for a key | `set ` | `OK` |
| Strln | Retrieve length of value associated with a key | `strln ` | `` |
| Del | Delete entry associated with a key | `del ` | `"value"` |
| Append | Append a value to the existing value of a key | `append ` | `OK` |
| Request Log | Request log entries from node | `request_log` | `log_entries` |
## Distributed System Features
| Feature | Description |
| --- | --- |
| Membership Change | Mechanism to add and remove server nodes dynamically |
| Log Replication | Cluster action logging system to replicate logs across nodes for consistency |
| Heartbeat | Periodic messages to monitor node health and maintain connections |
| Leader Election | Mechanism for leader node failover to ensure high availability and fault tolerance |
# How To Use
1. Clone the repository
```bash
git clone https://github.com/Sister20/if3230-tubes-sistress.git
cd if3230-tubes-sistress
```
2. Start Server nodes
```bash
# Leader node
python3 server.py
# Follower node
python3 server.py
```
3. Start Client
```bash
python3 Client.py
```
4. Start Web Interface
```bash
cd web
npm install
npm run dev
```
5. Open `http://localhost:3000/` in your browser
# Contributors
| NIM | Name | Task |
| --- | --- | --- |
| 13521108 | Michael Leon Putra Widhi | KV Store App, gRPC Structure, Response, and Handler, Client, Web Client, Unit Test KV Store App, Transaction |
| 13521131 | Jeremya Dharmawan Raharjo | Leader Election, Web Client, Unit Test Voting |
| 13521132 | Dhanika Novlisariyanti | Replicate Log, Unit Test Replicate Log |
| 13521155 | Kandida Edgina Gunawan | Heartbeat, Unit Test Heartbeat |
| 13521172 | Nathan Tenka | Membership, Unit Test Membership |