Blog posts

Where to put startup code in Elixir

Derek Kraan / 2019-12-06

Today I want to talk about a pattern that I hear about a lot. It begins with the question “where do I put this code that needs to run when I start up my Elixir application?” It turns out that we have a lot of options at our disposal. I want to enumerate the popular ones and discuss why you

Walkman - isolate your tests from the world

Derek Kraan / 2019-07-22

If you have seen Guardians of the Galaxy, you might remember the scenes where Chris Pratt has his Walkman on, shutting him off from the surrounding chaos. This is what Walkman does, for your test suite. A new testing library Elixir already has some good t

Introducing MerkleMap: improving Horde's performance

Derek Kraan / 2019-05-20

I’ve been to a couple of conferences already this year, including Lambda Days 2019, where I saw a whole bunch of good talks. Two talks in particular stick out in my mind: Diving into Merkle Trees, by Pedro Tavares, and

What's new in Horde v0.5.0

Derek Kraan / 2019-05-06

Horde 0.5.0 has just been released, and there are a bunch of changes, so let’s take a look at some of the highlights! If you are new to Horde, read Introducing Horde — a distributed Supervisor in Elixir

Why should every process be supervised?

Derek Kraan / 2019-04-01

If you’ve been around in the Elixir / Erlang community long enough, you’ll begin to hear the same wisdom being passed around time after time. Let it crash; don’t use GenServers to separate business logic; and the topic of this blog post: Every process should be supervised.

Implementing Connection Draining in Phoenix

Derek Kraan / 2019-01-24

This is a problem that many of us are familiar with. We would like to deploy our programs, and deploying a new version requires turning off the old version (unless you are using hot code swapping, but that’s another kettle of fish). So you send a SIGTERM to your server

Avoid these OTP Supervision performance pitfalls

Derek Kraan / 2019-01-17

As powerful as Elixir/Erlang’s OTP is, it’s also easy to nuke your performance by accidentally introducing a bottleneck into the system. Here are 2 ways you can turn a Supervisor into a bottleneck and how to fix them. Doing time consuming work in init/1

Horde: the road to v1.0

Derek Kraan / 2019-01-17

I have been working hard these last couple of weeks on Horde and DeltaCrdt. I already hinted at the changes that are coming on Twitter, but now

How DeltaCrdt can help you write distributed Elixir applications

Derek Kraan / 2019-01-17

Earlier this year I published my new library, Horde. Horde provides two things: a distributed supervisor, and a distributed registry, and you can read about it in the introductory blog post I wrote at the time

Elixir tip: :noreply is a killer feature

Derek Kraan / 2018-07-19

If you’ve ever looked at the GenServer documentation, you might have noticed something strange. At least, this looked very strange to me at first. Why, I wondered, would you ever want

Getting started with Horde's distributed Supervisor / Registry

Derek Kraan / 2018-06-28

Note: This guide has fallen out of date. There is an up to date version in the official documentation: https://hexdocs.pm/horde/getting_started.html Introduction If you’re new to Horde, you might want to start by

Introducing Horde -- a distributed Supervisor in Elixir

Derek Kraan / 2018-06-05

The last few weeks I’ve been toiling away at Horde. Horde is a distributed supervisor and a distributed registry, built using the magic of delta-CRDTs. Horde was inspired very heavily by Swarm