alvises
New Series: Build a Simple Persistent Key-Value Store in Elixir, using Logs
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
Most Liked
alvises
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.
3
Popular in Blog Posts
This is a very short article about using AWS Systems Manager Parameter Store to load secret configuration in a simple way.
New
New
How the Elixir community can survive — and thrive — in an age of LLMs.
New
I’m showing you how you can customise the phx.new generator to give you a new Phoenix project the way YOU want it. In this post I show yo...
New
New
Building on other people’s work I bashed things together and suddenly I can know when someone is speaking using Elixir and Membrane.
New
Hey there! This is the first article in what I hope will be a nice series about how I built (and am building) Lofi Limo. If you have any ...
New
Introduction and first content post in my new series about running Elixir Phoenix apps on Kubernetes are live! I’m describing an opiniona...
New
Dialyzer is a tool that you’ve probably heard about in the Elixir community. You may have even used it. However, adding Dialyzer to an ex...
New
This post is a guide on how Norba and I are building LiveMatch, a real-time app for soccer to follow multiple games in one place.
New
Other popular topics
Hi everyone!
I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New
Hi! May someone helps me, please!
I have two apps into an umbrella project: the first one is Database, which manages queries, and the se...
New
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1]
15:22:35.803 [error] gen_event {lager_file_backend...
New
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
You’re a programmer, so you don’t need spoon feeding with the conventional drivel about “this is an integer.” No. You need to know what’s...
New
As a follow up to my earlier question:
I have the code compiling and running but not getting a successful login from the rest server. ...
New
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
Is there a way to get the call stack or stack trace at any point in the code? Not from exceptions, but an expression that returns how the...
New







