Digests » 191

elixir

The Curious Case of BEAM CPU Usage

While benchmarking Go vs Elixir vs Node, we discovered that Elixir (running on the BEAM virtual machine) had much higher CPU usage than Go, and yet its responsiveness remained excellent. Some of our readers suggested that busy waiting may be responsible for this behavior.

Track-switching in a large Elixir web application

We used a feature toggle to gradually re-build parts of the business logic of our app.We were then able to switch to the new logic, and seamlessly roll back to the old logic in case of unforeseen problems. We had to come up with two interesting hacks to be able to test both code paths asynchronously.

The Beauty of Pattern Matching in Elixir

One of the reasons I fell in love with Elixir is pattern matching and how it can be extensively used all over the code.  In this video we see pattern matching with tuples, lists and maps, a bit of control flow and recursion.

Base64-encoded file uploads with Phoenix and Plug

Handling external files is one of the basic tasks for many web applications. Profile pictures, attachments, resources fetched from remote services, all are examples of the above.

A brief history of Erlang and Elixir

As a web developer, you run into issues you probably didn’t know had been resolved twenty years ago. Telecommunications and the web worked in different ways for years: until recently, the former was all about latency, concurrency, and long-running connections, while the latter, with HTTP, was just about “hits” on ephemeral connections. But the web evolved rapidly, and the things that were important in telecommunications became important for the web, too.