Just launched! Get 30% off Rails Revisited Have a Look

A Quick Look at OTP

Buy or Subscribe

You can access this course in just a minute, and support my efforts to rid the world of crappy online courses!

Buy Standalone  Subscribe

Building applications with Elixir is a huge subject. Learning the syntax rules and idioms is a solid first step, but soon enough you want to actually BUILD SOMETHING! I get it. Believe me. The CTO has been telling the board that I don't actually do anything - just write tutorials.

She doesn't like Elixir. I convinced the team to use it as I thought it was a natural fit, then our old CTO left and now we have Sara. She wants to use .NET and the only reason she hasn't flushed our project yet is because the CEO is a friend of mine and I promised her that you and I could deliver something in two week's time.

That delivery happens now. Let's do it.

Formalizing The Functional Patterns

Erlanger's have had 25+ years to figure out how to make their pattern-matchy, functional code fit into reusable patterns which they can then turn into robust applications. They've argued about it, written books, given talks and hugged each other with the thrill of community discovery. The result of all this: OTP. The Open Telecom Protocol.

Erlang was created by Joe Armstrong, Robert Virding and Mike Williams in 1986 for Ericsson (thus the name: Ericsson Language) and was released as open source in 1998. It is currently maintained by a division of Ericsson and is used to power over half of the telecoms around the world.

Erlang is all about fault-tolerance, distribution, and scaling. Put together correctly, you can build a fairly bullet-proof application. But how?

Thinking In Processes

When creating applications in Elixir, you create processes that interact with other processes. Some processes will be devoted to spawning child processes, others will be devoted to keeping certain processes alive.

It's like a giant bubble machine, with each bubble executing some logic. The machine is the Erlang VM, you're the bubble maker.

Let's blow some bubbles.