Hobbes is a scalable, fault-tolerant transactional record store written in Elixir.
Hobbes is designed to be:
- Scalable - Hobbes can shard data and scale horizontally across nodes.
- Fault-tolerant - Hobbes can replicate data across nodes and survive failures.
- Persistent - Hobbes writes data to persistent storage so that it can survive restarts and power failures.
- Transactional - Hobbes offers atomic transactions over its entire keyspace (even across arbitrary nodes).
- Consistent - Hobbes offers strict serializability for all transactions out of the box.
- Embedded - Hobbes can be embedded directly into an application as a library.
- Correct - Hobbes has a strong focus on correctness and has been aggressively tested in simulation from day one.
Hobbes provides what we refer to as an “unstructured record store” data model. Hobbes has a unified, ordered keyspace like a key/value store, but with strongly-typed keys and values. Hobbes deliberately stops short of providing schemas or migrations, though, with the goal of enabling a Hobbes cluster to function as a “multi-model database”: a database which contains other databases, each with their own data model.
Hobbes is, fundamentally, a tool designed to make building databases or other consistent distributed systems much easier. Here are some things you could build with Hobbes:
- A distributed filesystem, using Hobbes as a scalable, persistent metadata store to map filenames to blobs
- A distributed database, storing everything in Hobbes and taking advantage of transactions to keep your schemas, indexes, and user data in sync
- Anything else which needs to scalably store persistent data: job queues, event stores, process registries, and so on
Hobbes is not the kind of database that an application developer would use to build an app. Instead, Hobbes is a tool which you can use to build that kind of database. For this reason, you might think of Hobbes not just as a database but as a new OTP primitive: a building block like :ets or :global but far more powerful.
Much like Erlang exists to solve the hard problems of distributed computing, Hobbes exists to solve the hard problems of building consistent distributed systems. We want to solve them once, properly, so that we don’t have to solve them again and again.
Hobbes takes care of the hard parts of building a distributed database, like strong consistency, concurrency control, replication, sharding, atomic transactions, and consensus, so that you don’t have to.
Hobbes exists to make building scalable, consistent distributed systems easy.
(…for more, see the README)
Hobbes is my database project, which I have alluded to in many discussions on here. It’s not ready for public use yet, but it is very much ready for public discussion, which is why I am publishing it here. You can find the roadmap to alpha testing in the repo; once we move to alpha I’ll publish a Hex package and so on.
In addition to being a fairly sophisticated distributed database, Hobbes is also unique in that it is one of only a handful of distributed databases ever to be designed and built from day one using Deterministic Simulation Testing. In order to do this I had to write a simulation testing framework in Elixir, named Construct, which you can also find in the repo. I’m pretty sure this is the first time anyone has ever attempted simulation testing on the BEAM.
You can find the source code for Hobbes here:
Questions are welcome, especially technical ones!




















