Training:

OTP SUPERVISION TREES

17 Mar 2018
20:19 - 17:00
Ben Marx

Starting from first principles we will investigate how to design reliable OTP applications. We will cover links and monitors, and how and why they are used by OTP to handle process dependencies. Then we will cover Supervisors and go through the guarantees provided by each strategy. Finally we will put this together to build supervision trees that isolate errors and recover systems to a good state with minimal side effects. This session will involve adding fault tolerance to existing applications and implementing our own versions of a few OTP features, including writing a basic supervisor.

Students are expected to be familiar with the Elixir language and understand the basics of Tasks, Agents and GenServers. Some knowledge of Supervisors is welcome but not essential. A laptop with Elixir 1.6 (or newer) and Erlang/OTP 19 (or newer) is required.

BEAM AND ERLANG RUNTIME SYSTEM

17 Mar 2018
20:19 - 09:00
Erik Stenman

The tutorial will cover:

Processes

  • How it is represented in memory
  • The PCB
  • The Stack and the Heap and tagging
  • How message passing is implemented
  • Tools for inspecting processes

 

The compiler

  • Some options
  • How to inspect generated code
  • The BEAM instruction set and BEAM modules
  • The BEAM interpreter/VM
  • Native code through HiPE
  • Tools for tracing and profiling

 

The scheduler

  • The scheduler loop
  • The ready queue
  • Timing wheels
  • Ports
  • Flags for controlling the scheduler

 

Memory

  • How the GC works
  • How memory allocation works
  • Flags and tweaks for memory
  • Memory profiling tools

BUILDING DISTRIBUTED SYSTEMS WITH RIAK CORE

17 Mar 2018
20:19 - 18:00
Mariano Guerra

Riak core is the battle-hardened library that powers the popular open-source distributed key/value store Riak. Not many people are aware of how easily it can be used outside Riak to power your own horizontally scalable Erlang applications be they session storage, message routing or distributed computation.

This course explores the practical aspects of implementing such applications.

The course aims to achieve the following goals:

  • To introduce participants to riak_core and provide an overview of its general characteristics and architecture
  • To demonstrate the use of rebar3 in building modern riak_core based projects
  • To demonstrate implementation considerations
  • To enable you to determine if riak_core is right for your application
  • To demonstrate how webmachine can be used to integrate with riak_core
  • You will build and take away your own riak_core application by the end of the day