Certainly! I'll reorganize and improve your README file to make it more structured and informative. Here's an enhanced version:
Remote Hash Map
A distributed node cluster management system using gRPC, implementing a replicated key-value store.
Table of Contents
- Features
- Architecture
- Getting Started
- Usage
- Docker Support
- Configuration
- Logging
- Troubleshooting
- Contributing
- License
Features
- Distributed key-value storage
- Node cluster management
- Health checking via regular pinging
- Data replication across nodes
- Configurable ping intervals
- Docker support for easy deployment
Architecture
The system consists of two main components:
- Node: Individual servers capable of storing key-value pairs and responding to ping requests.
- NodeGroup: A manager for the node cluster, handling node addition, retrieval, and health monitoring.
Getting Started
Prerequisites
- Rust (with Cargo package manager)
- protoc (Protocol Buffers compiler) for gRPC
- Docker (optional, for containerized deployment)
Installation
-
Clone the repository:
-
Build the project:
Usage
Running the Node Group
Start the NodeGroup service:
Running Individual Nodes
Run nodes and connect them to the NodeGroup:
Using the Client
-
Create a new project:
&& -
Add the following to
src/main.rs:use RHMClient; async -
Run the client:
Docker Support
Build and run using Docker:
Configuration
- Ping interval can be configured for the NodeGroup:
Logging
The project uses env_logger. Set the RUST_LOG environment variable for different log levels:
RUST_LOG=debug
Troubleshooting
- Ensure all dependencies are installed and properly configured.
- Verify that specified ports are not in use or blocked by firewalls.
- Check log output for errors or warnings.
Contributing
Contributions are welcome! Please submit a pull request or open an issue to discuss proposed changes or improvements.
License
This project is licensed under the MIT License. See the LICENSE file for details.