Deploying With Distillery and Docker

I use Distillery to generate Erlang releases for my Elixir applications. Through this post, I'll explain how I generate the releases that get shipped to production.

I use Docker to ensure that the final Erlang release is always the same across production instances. This approach also allows me to avoid generating the release on production, which means my production instances stay slimmer by not having Erlang, Elixir, and Node installed natively.

Binary Pattern Matching in Elixir

I've been working on a web client for my side project Grapevine, and part of that includes parsing a telnet stream. Before you ask, "A telnet stream!?", the web client connects to text-based games called MUDs that primarily used telnet as that's how they started in the late 1980s.

Telnet is mostly a TCP stream that contains only text that should be output to the screen. Hidden inside the otherwise plain TCP stream is a series of bytes called IAC (Interpret as Command). This is the byte 255 followed by at least one other byte that describes what the command is.