Snapple is a distributed in-memory fault-tolerant key-value store offering similar functionality as the Riak key value store.
Each entry in the key-value store is represented by a String
key and a CRDT
value. For more information about CRDTs, please check this video out.
Currently only two types of CRDTs are supported, OR-Sets and Version Vectors. Worth to note is that this project uses Marc Shapiro's optimized OR-sets implementation, allowing for better memory complexity.
Another way to learn about Snapple is to check out the slides for my Master's Thesis here.
Waffle is used for issue management.
The snapple-crdts
subproject contains implementations and test suites for the CRDTs supported.
Snapple relies on Finagle with Apache Thrift for IO communication, the snapple-finagle
subproject contains generated code, wrapper classes and serialization utilities with test suites.
The snapple-cluster
subproject is the actual key value store. It can be launched from sbt
. This project also come with some tests. The key value store also takes a list of replicas as main arguments. The hosts in the replicas are represented by an OR-Set CRDT, which can be modified with the key SNAPPLE_INTERNAL_REPLICA_CLIENTS
.
The snapple-client
subproject provides an API for external clients to communicate with the snapple instances. The user can provide a list of hosts, and if one host goes down, the client will automatically rotate to the next host.
The snapple-io-tests
subproject provides extensive IO tests for client-server communication and CRDT propagation between replicas. It also tests redundancy and adding / removing replicas.
The snapple-cli
provides a CLI tool to modify a snapple instance, usable to, for example, add or remove replicas manually. Provide the --help
flag to find out how to use it.
The snapple-benchmark
provides a CLI tool to benchmark a snapple's performance, requests can be sent both in parallel and sequentially. Provide the --help
flag to find out how to use it.