This document provides an overview of the application, its features, and instructions for installation, configuration, and usage.
Nebula is a distributed in-memory key-value store that uses consistent hashing to distribute data across multiple stores, ensuring high availability and fault tolerance.
- Distributed architecture using consistent hashing.
- In-memory storage for fast data access.
- Support for GET, PUT, and DELETE operations.
DIM-KVS is built using the following technologies and libraries:
- Golang: The primary programming language.
- gRPC: Used for communication between components.
Follow these steps to get started with NEBULA (DKVS):
-
Download and install Golang from the official website.
-
Clone the repository to your local machine:
git clone https://github.com/priyansh32/nebula.git
-
Install the dependencies:
go mod download
-
Build the project components:
chmod +x ./build.sh ./build.sh
-
Run the coordinator:
./bin/coordinator <port> <replication-factor>
-
Run the store:
./bin/store <port>
you can run multiple stores by running the above command with different ports.
-
Run the CLI:
./bin/cli <coordinator-address>
the coordinator address is the address of the coordinator in the format
host:port
.
Application provides a CLI to interact with the coordinator. Below is a sample usage of CLI.
To interact with the coordinator programmatically, you need to use gRPC with protobuf specification the /internal/api/coordinator/coordinator.proto
NEBULA> ADDSTORE localhost:50012 alpha-store
Added store: alpha-store with status: OK
NEBULA> ADDSTORE localhost:50013 beta-store
Added store: beta-store with status: OK
NEBULA> PUT email [email protected]
Status: OK
NEBULA> PUT name priyanshpatidar
Status: OK
NEBULA> GET name
Value: priyanshpatidar
NEBULA> DELETE email
Status: OK
NEBULA> GET email
CACHE MISS
NEBULA> EXIT
- Author: Priyansh Patidar
- GitHub: @priyansh32
If you have questions or need assistance, feel free to reach out to the author:
- Email: [email protected]
- Twitter: @priyanshh32