Skip to content
DanielWaterworth edited this page Dec 23, 2011 · 1 revision

How does it work?

There are three components to the system, a database for mutable data (Zookeeper), a database for immutable data (a collection of redis nodes) and a system to tie everything together.

Writes work by taking the current head reference, constructing a new immutable tree where its nodes are stored in the immutable database. Once the tree has been constructed, it's root becomes the new head reference. The head reference is stored in the mutable database.

Only one node is able to make changes at any time, this node is designated the master node and it is elected using Zookeeper. The other nodes that are not the master node are still able to perform reads queries.

Why Zookeeper? Doesn't that make the system really slow?

Zookeeper provides mutable storage in a fault tolerant way. Only the head reference is stored in Zookeeper, and it's only sampled periodically, not for every write, the only performance impact Zookeeper has on the system is how fast writes are committed, the total write throughput and the read figures are totally unaffected by the performance of Zookeeper.

Why Haskell?

As you may imagine writing is a DBMS is a complicated endeavour, I needed a language that would allow me to manage complexity really effectively, Haskell worked really well in this regard. Performance also has to be a priority.