Skip to content

About

Concurrent, distributed in-memory key-value database built using Java 21 Virtual Threads, a custom TCP command protocol, and a modular architecture.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

Java Distributed Datastore

A lightweight, concurrent distributed key-value database built from scratch in Java 21. Designed with a modular architecture, custom TCP networking, and high-performance Java 21 Virtual Threads to handle concurrent client connections efficiently.


Architecture & Features

  • Storage Engine: An in-memory, thread-safe storage engine powered by Java's ConcurrentHashMap supporting core commands: SET, GET, and DEL.
  • Custom TCP Server: Listens on configurable ports and utilizes Java 21 Virtual Threads (Thread.ofVirtual()) to scale connection handling seamlessly.
  • Consensus Scaffolding: Modular directory layout prepared for distributed log replication and Raft consensus integration.

Project Structure

java-distributed-datastore/
│
├── src/main/java/com/distributed/
│   ├── Main.java                 # Entry point / Node bootstrapper
│   ├── storage/
│   │   └── StorageEngine.java    # In-memory thread-safe key-value store
│   ├── server/
│   │   └── NetworkServer.java    # TCP socket server using Virtual Threads
│   └── consensus/
│       ├── RaftNode.java         # Consensus state machine skeleton
│       └── RaftLog.java          # Replicated log structures
│
├── pom.xml                       # Project build configuration
└── .gitignore                    # Ignored build artifacts

About

Concurrent, distributed in-memory key-value database built using Java 21 Virtual Threads, a custom TCP command protocol, and a modular architecture.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages