New Series: Build a Simple Persistent Key-Value Store in Elixir, using Logs

blog-posts
databases
architecture
kv-store

#1

Just published the first part of series of articles aimed to explain the architecture behind a kv-store engine written in Elixir and implemented with logs. During the series I describe (and implement in Elixir just for the purpose of inspection) the concepts of logs and data immutability, sequential writes, index, segments, compaction, memtable, sstable etc…

In this first part:

  • What is a log?
  • Making a KV persistent using a log and an index. Using an example we will use along the series, crypto market prices and trades, we are going to see how to store the values in a log using using an index.
  • LogKV in Elixir. A initial super simple implementation in elixir of a Writer, an Index and a Reader.

Please let me know what you think, available here on the forum as @alvises or on Twitter as @alvisesus

https://www.poeticoding.com/build-a-simple-persistent-key-value-store-in-elixir-using-logs-part-1/


#2

Second part of the kv-store engine series. In this part I show how to do a step further, making both keys and values persistent. Taking inspiration from the Bitcask design, I describe how to enhance our implementation and to recover the Index in the case of a failure.

https://www.poeticoding.com/build-a-simple-persistent-key-value-store-in-elixir-using-logs-part-2/