Botellier

Botellier is a distributed key-value, in-memory data store written completely in Kotlin. It aims to imitate the Redis API and work as a drop-in replacement for simple cases. This project started out as a learning-only project for practicing distributed systems. I decided to design Botellier after Redis due to its simple and predictable API.

Botellier covers most simple commands that Redis does, and provides a persistent data solution based on segments. The following demo shows some simple usage:

Difficulties

Working with distributed systems is always hard. So instead of implementing my own consensus algorithm from scratch, I decided to use ZooKeeper for my leader election process; in which a leader is selected, along with a synchronized replica and follower replicas.