Skip to content

Releases: ahmad-masud/dkvs

v1.1.0 — Stable Release

Choose a tag to compare

@ahmad-masud ahmad-masud released this 03 Nov 18:20

dkvs v1.1.0 — Stable Release

This version finalizes the core architecture and delivers a more robust, reliable distributed key-value store built on gRPC and HashiCorp Raft. Performance, stability, and cluster coordination have all been significantly improved, and the system now supports smooth recovery, consistent snapshots, and graceful shutdowns under load.

With this release, dkvs is considered production-ready for small-scale deployments and an excellent reference for anyone studying or building distributed systems in Go.

Highlights:

  • Raft-based leader election and log replication are now fully stable
  • Improved persistence and snapshot handling
  • Simplified configuration and cluster management
  • Enhanced test coverage and Windows compatibility
  • Comprehensive documentation and examples

Thank you to everyone who tested and contributed during the alpha phase.

v1.0.0

Choose a tag to compare

@ahmad-masud ahmad-masud released this 02 Nov 22:55

DKVS (Distributed Key-Value Store)

DKVS is a lightweight distributed key-value store written in Go, designed to provide reliable and efficient key-value operations (Set and Get) over gRPC. It is modular, extensible, and serves as a foundation for implementing distributed consensus mechanisms such as Raft in the future.


🧩 Overview

DKVS offers a minimal distributed architecture to demonstrate the core components of distributed systems:

  • A gRPC service for efficient and language-neutral communication

  • In-memory key-value data persistence

  • Modular packages for extensibility

  • Simple CLI-based client interactions

The project is ideal for educational purposes, experimentation, or as a base for more advanced distributed systems (e.g., implementing replication, consensus, fault tolerance).


⚙️ Architecture

The system is built with a modular structure:

cmd/          # Main entry point to start the server
kv/           # Core key-value logic and in-memory store
proto/        # Protocol Buffers definitions for gRPC

Key Components

Component Description
Server Hosts the gRPC server, listens for client requests
Store Provides in-memory key-value operations (Set, Get)
Proto Contains the .proto files defining gRPC interfaces
Raft (future) Placeholder for distributed consensus implementation

📘 Appendix: Example .proto Snippet

syntax = "proto3";

package proto;

service KVStore {
rpc Set (SetRequest) returns (SetResponse);
rpc Get (GetRequest) returns (GetResponse);
}

message SetRequest {
string key = 1;
string value = 2;
}

message SetResponse {
bool success = 1;
}

message GetRequest {
string key = 1;
}

message GetResponse {
string value = 1;
}


DKVS v1.0.0 — Minimal, modular, and ready for distributed systems research or expansion.

# DKVS (Distributed Key-Value Store)

DKVS is a lightweight distributed key-value store written in Go, designed to provide reliable and efficient key-value operations (Set and Get) over gRPC. It is modular, extensible, and serves as a foundation for implementing distributed consensus mechanisms such as Raft in the future.


🧩 Overview

DKVS offers a minimal distributed architecture to demonstrate the core components of distributed systems:

  • A gRPC service for efficient and language-neutral communication
  • In-memory key-value data persistence
  • Modular packages for extensibility
  • Simple CLI-based client interactions

The project is ideal for educational purposes, experimentation, or as a base for more advanced distributed systems (e.g., implementing replication, consensus, fault tolerance).


⚙️ Architecture

The system is built with a modular structure:

cmd/          # Main entry point to start the server
kv/           # Core key-value logic and in-memory store
proto/        # Protocol Buffers definitions for gRPC

Key Components

Component Description
Server Hosts the gRPC server, listens for client requests
Store Provides in-memory key-value operations (Set, Get)
Proto Contains the .proto files defining gRPC interfaces
Raft (future) Placeholder for distributed consensus implementation

🚀 Getting Started

Prerequisites

  • Go 1.23+

  • Protocol Buffers Compiler (protoc)

  • Go gRPC and protobuf plugins:

    go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
    go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
    export PATH="$PATH:$(go env GOPATH)/bin"

Generate Proto Files

Run the following to generate Go bindings from .proto definitions:

protoc --go_out=paths=source_relative:proto \
       --go-grpc_out=paths=source_relative:proto \
       --proto_path=proto proto/kv.proto
protoc --go_out=paths=source_relative:proto \
       --go-grpc_out=paths=source_relative:proto \
       --proto_path=proto proto/raft.proto

Build and Run

You can build manually or using make:

go mod tidy
go build -o dkvs ./cmd
./dkvs

or

make build
make run

Example Usage (with grpcurl)

Perform basic operations via grpcurl:

grpcurl -plaintext -d '{"key":"name","value":"ahmad"}' localhost:8000 proto.KVStore/Set
grpcurl -plaintext -d '{"key":"name"}' localhost:8000 proto.KVStore/Get

🧪 Testing

Run unit tests for all modules:

go test ./...

or

make test

📦 Release Details

Version

v1.0.0 — Initial release

Included Features

  • gRPC server with basic Set and Get
  • In-memory key-value storage
  • Protobuf-generated service definitions
  • Makefile for build, run, and test automation

Planned Enhancements

  • Distributed consensus using Raft
  • Persistent storage layer
  • Node discovery and cluster membership
  • Health checks and replication

💡 Design Decisions

  • gRPC over HTTP/1.1: Enables efficient communication and language interoperability.
  • In-memory store: Fast prototyping; persistence will be added later.
  • Modular structure: Facilitates future extensions without modifying core logic.
  • Proto-first approach: Simplifies API evolution and versioning.

🧰 Development Notes

  • Each server instance runs on its own port for horizontal scaling.
  • To simulate distributed behavior, multiple servers can be started with different configs.
  • Proto definitions use service-based RPC style for clarity and reusability.

🧑‍💻 Contributing

Contributions are welcome!
To contribute:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/awesome-feature)
  3. Commit changes (git commit -m 'Add awesome feature')
  4. Push to branch (git push origin feature/awesome-feature)
  5. Open a pull request

🪪 License

This project is licensed under the MIT License.
See the [LICENSE](./LICENSE) file for details.


🧭 Maintainers

Name Role Contact
Ahmad Masud Lead Developer [GitHub Profile](https://github.com/)

📘 Appendix: Example .proto Snippet

syntax = "proto3";

package proto;

service KVStore {
  rpc Set (SetRequest) returns (SetResponse);
  rpc Get (GetRequest) returns (GetResponse);
}

message SetRequest {
  string key = 1;
  string value = 2;
}

message SetResponse {
  bool success = 1;
}

message GetRequest {
  string key = 1;
}

message GetResponse {
  string value = 1;
}

DKVS v1.0.0 — Minimal, modular, and ready for distributed systems research or expansion.