Introducing Elixir: Self-healing applications at ZOMG scale by Andy Pike

Kevin O'Shaughnessy
2 min readJun 11, 2017

--

Andy Pike explains Supervision Trees in Elixir

Welcome to this review of the Developer Developer Developer 12 talk by Andy Pike.

Andy can be found on Twitter as @andypike

He’s done a short video Five Minutes with Elixir and if you just want a very quick introduction to it that’s the one to watch.

Andy’s slides are available as part of his own blog post.

Andy began with quick introduction to the Erlang, a language invented with very high performance in mind.

WhatsApp are using Erlang and has 2 million connections per server, 1.2 billion user and sends 42 billion messages per day

The stack looks like this:

Erlang or Elixir
Bytecode
BEAM VM
Operating System

The inventor loved BEAM VM but not Erlang so much so he created Elixir as a functional alternative

⦁ Functional
⦁ Ruby Inspired Syntax
⦁ Immutable
⦁ Concurrent
⦁ Fault Tolerant
⦁ Distributed

Elixir has a REPL called IEx. We can use it to learn the language basics. See Andy’s slides for the code listings.

OTP is a framework that comes with Elixir. It deals with processes.

Supervision Trees.
Elixir has a “Let it crash” philosophy (i.e. don’t do defensive coding) —The idea is to let the supervisors deal with it and restart the app is something goes wrong.

Elixir has the Phoenix Framework for web development
It is allegedly much faster than Express, Sinatra and other popular web frameworks.

To learn more about Phoenix see Chris McCord’s talk “Phoenix — A framework for the modern web

Bleacher Report migrated their aging monolith from Ruby on Rails to Elixir Pheonix and got so much extra efficiency they were able to go from 150 servers down to 5 (and they can claim can get down to 2). See Techworld for more.

There is much more to Elixir so there was no time to cover hex,
observer, mix, ETX or mnesia.

To learn more about Elixir see elixir-lang.org

Or read any of Andy’s recommended books:

Multi-core: even the Apple watch Series 2 has dual core now. Few programs make use of multi-core but Elixir helps you do that.

In conclusion, look at other languages beyond your usual one, as this can help us to become much better software engineers overall.

Here’s Ian Johnson’s Sketch Notes of the talk:

--

--

Kevin O'Shaughnessy

Sr. Full Stack Web Dev promoting better professional practices, tools, solutions & helping others.