JustinDB
Distributed Key-Value Storage built on top of Scala/Akka
JustinDB KV is an eventually consistent key-value database that favours write availability. It’s a faithful implementation of Amazon’s Dynamo, with advanced features such as vector clocks for conflict resolution. JustinDB is also fault-tolerant. Servers can go up or down at any moment with no single point of failure.
➜ JustinDB git:(master) ✗ docker exec -it justindb /bin/bash
___ _ _ ______ ______
|_ | | | (_) | _ \| ___ \
| | _ _ ___ | |_ _ _ __ | | | || |_/ /
| || | | |/ __|| __|| || '_ \ | | | || ___ \
/\__/ /| |_| |\__ \| |_ | || | | || |/ / | |_/ /
\____/ \__,_||___/ \__||_||_| |_||___/ \____/
Cli:
cli help
More documentation available at:
https://github.com/speedcom/JustinDB
https://speedcom.github.io/
Summary of techniques
Problem | Technique | Advantage |
---|---|---|
Partitioning | Consistent Hashing | Incremental Scalability |
Membership and failure detection | Gossip-based membership protocol and failure detection | Preserves symmetry and avoids having a centralized registry for storing membership and node liveness information |
High Availability for writes | Vector clocks with reconciliation during reads | Version size is decoupled from update rites |
Recovering from permanent failures | Anti-entropy using Merkle trees | Synchronizes divergent replicas in the background |
Why akka
Its a toolkit and runtime for building highly concurrent applications which comes with ideas that have been around from some time - actor model. Besides that it has many welcome features around clustering:
- load balancing
- location transparency
- self maintenance
- fault tolerance
Authentication, authorization, validation
In case it's not obvious, Justin performs no authentication, authorization, or any validation of input data. Clients must implement those things themselves.
System Requirements
JustinDB works with Java 8 and newer.
Bunch of posts about JustinDB
- JustinDB - Modern REACTIVE NoSQL database
- JustinDB - Database Model
- JustinDB - Pluggable persistent and in-memory storage engines
- JustinDB - More than 700 commits!
- JustinDB - Serialization that greatly improves performance
- JustinDB - Replication and Partitioning
- JustinDB - Why Scala and Akka?
- JustinDB - Data versioning: Vector Clocks
- JustinDB - HTTP API
- JustinDB - The Ring
- JustinDB - Preference list
- JustinDB - Solving data entropy: Read Repair
- JustinDB - Solving data entropy: Active-Anti Entropy
- JustinDB - Executable JAR
- JustinDB - Multi-Datacenter Replication