-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
57 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,57 @@ | ||
# miniraft-cpp | ||
Based on your specific requirements and details, here's an updated version of the `README.md` for your project: | ||
|
||
--- | ||
|
||
# Project Title: MiniRaft-CPP | ||
|
||
## Overview | ||
MiniRaft-CPP is an implementation of the Raft consensus algorithm using C++20. This project aims to provide a clear and efficient representation of the Raft protocol, ensuring consistency and reliability in distributed systems. The implementation includes leader election, log replication, and safety mechanisms as per the Raft specification. | ||
|
||
## Key Features | ||
- **Leader Election**: Manages the election process for choosing a new leader in the cluster. | ||
- **Log Replication**: Consistently replicates logs across all nodes in the cluster. | ||
- **Safety**: Guarantees the integrity and durability of committed entries. | ||
|
||
## Components | ||
- `raft.h` / `raft.cpp`: Implementation of the core Raft algorithm. | ||
- `messages.h` / `messages.cpp`: Message definitions for node communication. | ||
- `timesource.h`: Time-related functionalities for Raft algorithm timings. | ||
- `server.h` / `server.cpp`: Server-side logic for handling client requests and node communication. | ||
- `client.cpp`: Client-side implementation for cluster interaction. | ||
|
||
## Getting Started | ||
|
||
### Prerequisites | ||
- C++20 compatible compiler | ||
- CMake for building the project | ||
- [Cmocka](https://cmocka.org/) for unit testing | ||
|
||
### Building the Project | ||
1. Clone the repository: | ||
``` | ||
git clone https://github.com/resetius/miniraft-cpp | ||
``` | ||
2. Initialize and update the submodule: | ||
``` | ||
git submodule init | ||
git submodule update | ||
``` | ||
3. Navigate to the project directory: | ||
``` | ||
cd miniraft-cpp | ||
``` | ||
4. Build the project using CMake: | ||
``` | ||
cmake . | ||
make | ||
``` | ||
|
||
### Running the Application | ||
- Start the server: | ||
``` | ||
./server [options] | ||
``` | ||
- Run the client: | ||
``` | ||
./client [options] | ||
``` |