OTP Behaviours: Behind the scenes for Phoenix users

25-27 Nov 2019
09:00 - 17:00
Martin Gausby

So you've built and deployed a Phoenix application backed by Ecto and Postgres, and come to the conclusion that you love it. If you are looking at progressing to the next level, this hands on training will help you get to the next level. In it, we will focus on building applications using OTP behaviours and architecture guidelines. Learn about the battle-tested abstractions needed to build back-end, fault tolerant systems that will run for years and scale to billions of users.



People who have built a Phoenix Application and would like to know the underlying OTP behaviours.



This is an intermediate level class scheduled to get you up and running with OTP. You should have basic knowledge of Elixir, and whilst not necessary, it would be useful if you have developed a Phoenix application.



When you've completed this class, you'll have a deeper understanding of how to architect back-end systems and micro-services that you can access and use from Phoenix. Learn why we need behaviours such as Generic Servers, Generic Finite State Machines and others, when to use them, and how to integrate them into supervision trees.



We'll have plenty of time to work on labs along the way as you hone your skills and put the theory into practice.

About half of the class is either lab work or coding side-by-side with your instructor.

Topics include:

  • Life before OTP
  • OTP architecture
  • Behaviours
  • Supervision
  • GenServer
  • GenStateMachine
  • Other behaviours (GenStage, GenFlow, Event Handlers, etc)
  • Optimizing for performance
  • ETS (a Redis in your beam)
  • Load regulation and back-pressure (fuse, safety valve)

Thinking concurrently

29 Nov 2019
09:00 - 17:00
Francesco Cesarini

How do systems built in Erlang, Elixir or any other BEAM Language differ from other systems?

To start with:

  • They are designed from the bottom up to run 'forever.’
  • They are designed from the bottom up to expect, and recover from errors.
  • They are expected to evolve.
  • They scale seamlessly.

How is all of this achieved? - the answer is simple - by making systems from sets of isolated communication processes, and by treating errors and code as first class objects that can be sent in messages over a network.



In this tutorial, we'll introduce what is called the "Erlang way of thinking."

We'll cover:

Basic data types and sequential programming

Introduce the foundations and talk about Modules, Functions and Pattern Matching. Once you've understood the basic pattern matching mechanism the rest is easy.

Concurrent programming

We'll look at sending and receiving messages, selective reception, and passing data in the messages.

We'll conclude this section by introducing the simple but powerful error handling mechanisms in processes which help detect and isolate failure.

Time permitting, we will conclude with distribution, showing you how by doing it right from the start or with very few changes, you can write a program intended to run on a single VM and distribute it in a cluster.


Developers and architects who are interested in the principles which make Erlang, Elixir or other BEAM-based languages unique.



To learn the Erlang way of thinking when architecting and developing systems.


Building resilient distributed systems with Elixir

29 Nov 2019
09:00 - 17:00
Chris Keathley

One of the most exciting features of Elixir is its ability to connect multiple nodes together. Because distribution is built directly into the language’s runtime, those of us in the Elixir world have access to a number of powerful abstractions for building distributed systems.

However, distributed Erlang comes with several caveats and warnings. We will demystify some of the warnings while reiterating others.

In this tutorial, participants will get hands on experience with distributed Erlang through building real solutions to real world problems.

You will learn how to harden their solutions against network and hardware failures using a test harness designed to inject failures into clusters. Whilst the goal is to provide an understanding of the primitives available in Erlang and Elixir for building distributed systems, we’ll also discuss some of the popular libraries available in the BEAM ecosystem.



  • Provide insights into the tools available for building distributed systems
  • Learn patterns for building consistent and eventually consistent systems
  • Experience the different types of faults that you’ll see in the real world


Intermediate Erlang or Elixir developers who want to take advantage of the clustering abilities in OTP.


The tutorial is broken into 4 distinct pieces of work. Each section builds on the previous and endeavours to provide real-world scenarios.

  • Connecting nodes, sending messages, and handling faults
  • Building low latency APIs with replication
  • Scaling replication with eventual consistency
  • Taking advantage of your computer by distributing work across the cluster