Training:

The BEAM VM Under The Hood

07 Apr 2020
09:00 - 18:00
Michał Ślaski

A guide for operations and development teams.

Everything you wanted to know about the BEAM but were afraid to ask. Through examples and hands on exercises, we will showcase how to manage the BEAM VM in operational environments, optimizing for memory utilisation and performance when using Erlang or Elixir.

 

OBJECTIVES

Understand how the BEAM works under the hood.

 

PREREQUISITES

Experience in developing and supporting languages running on the Beam, including Erlang and Elixir.

Fine-tune it and optimize its settings for throughput and memory use.

TARGET AUDIENCE

The course is aimed at experienced developers and devops engineers, helping them pre-empt and address behaviour which arise as the result of VM specific settings, be it disruption of soft real time properties as a result of garbage collection or bottlenecks in the scheduler.

 

COURSE OUTLINE

  • Intro to the BEAM - highlights of the BEAM Virtual Machine, the features which make it stand out in comparison to other VMs.
  • Processes under the hood - how memory is allocated, managed and garbage collected.
  • The Process Scheduler - how the schedulers works, how it scales on multi-core architectures and what its limitations are.
  • Memory Management - different memory types including system, atom, binary, code and ets tables.
  • Tweaking and fine-tuning - tweaks and possible fine-tuning of the VM, looking at some of the most obscure flags which can come in hand, allowing for specific optimisations on a VM level, be it to increase I/O or throughput in virtualised environments.

Thinking concurrently

07 Apr 2020
09:00 - 18: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.

 

OUTLINE

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.

 

AUDIENCE

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

 

PREREQUISITES

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