Martin Gausby

Creator of Tortoise, Elixir lead at Erlang Solutions

Martin is a long time Elixir developer with a keen interest in implementing network protocols. For the last couple of years he has been working with Erlang and Elixir systems for a living, and during that time spent way too much time tinkering with his Emacs configuration. Besides that he has a horrible taste in music, enjoys coffee, mechanical keyboards, and is a friend of the podcast.

Past Activities

Martin Gausby
Code BEAM Lite Amsterdam
Training/ 25 Nov 2019
09.00 - 17.00

OTP Behaviours: Behind the scenes for Phoenix users

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)
Martin Gausby
Code BEAM STO 2019
Workshop/ 20 May 2019
09.00 - 17.00

SCALING ELIXIR AND PHOENIX: To millions before breakfast


  • How to organise, grow and maintain an application with multiple responsibilities
  • How to test and statically check an application to minimise integration issues
  • How to integrate resilience patterns to provide partial availability despite outages



Prior experience with Elixir and Phoenix (3 to 6 months), familiarity with building web services helpful (i.e. REST interfaces).



Software Developers and Engineers, with a focus on providing web-based services


Students will go through the analysis and refactor of an existing codebase to improve decoupling, isolation, testability and resilience.

The course will cover the following topics:

  • Approaching an existing codebase (code structure, OTP structure)
  • Basic resilience testing
  • Extracting commands for reusability
  • Type specifications and domain borders
  • Extraction to umbrella layout
  • Effective unit and integration testing
  • Client/Server patterns via adapter
  • OTP and circuit breakers to guarantee availability
Bruce Tate / Martin Gausby
Code Elixir LDN
Training/ 16 Jul 2019
09.00 - 17.00

Professional LiveView and OTP

This is a 2 day training course.

From the coming books Designing Systems with OTP and the second edition of Programming Phoenix, this course will walk you through the strategies you'll need to build web applications without JavaScript. You can focus on what's happening on the server, even as you build the most interactive of applications. We'll cover a strategy for rapidly building applications the Elixir way, including:


  • Designing Applications in Layers
  • The LiveView lifecycle
  • JavaScriptless validations with changesets
  • Integrating OTP
  • Working with channels and events
  • Programming simple animations

When you've completed this class, you'll have a deeper understanding of Elixir's OTP and Phoenix LiveView. You'll be able to think about program design, especially building your project in layers so that the LiveView code you create is easy to maintain, letting you deal with one piece of complexity at a time.

This is an intermediate level class scheduled to get you up and running quickly using LiveView. You should know Elixir, and it would help for you to know Phoenix as well.

We'll have plenty of time to work on labs along the way as you hone your skills. About half of the class is either lab work or coding side-by-side with your instructor.


The Loom, 14 Gower's Walk, Whitechapel, London E1 8PY.

Martin Gausby
Code BEAM STO 2019
16 May 2019
14.40 - 15.25

Tortoise evolved: the road to MQTT 5 support in the Tortoise MQTT client

MQTT is a light-weight PubSub protocol used for machine to machine communication. It is often used in IoT applications, so it fits well in many Nerves projects.

Tortoise is an MQTT client for Elixir. It started its life as an MQTT 3.1.1 client but is in the progress of getting an upgrade to the latest version of MQTT; version 5.

Martin will introduce MQTT; give an overview of the new features in MQTT 5; how Tortoise is designed to make MQTT easy to work within Elixir, and how MQTT 5 will influence that design.


  • Introduce MQTT
  • Show some use cases
  • Introduce the Elixir MQTT client called Tortoise
  • Talk about how the API of Tortoise came to be, and how changes in the MQTT specification will alter this design. This should be interesting for people implementing protocols and protocol clients in Elixir, as well as answer why Tortoise is the way it is to people who just want to use Tortoise.



  • People interested in Nerves
  • Users of the MQTT protocol, or people interested in using it
  • Users of Tortoise
  • People who implement protocol clients in Elixir


Articles: 2

Do you know the answer to this Elixir Challenge?

Article by Martin Gausby

Elixir has a concept of protocols which provide polymorphism on data types and structures. In our example we pipe the result of generating a MapSet into the to_list/1 function on the Enum module. Enum is a module containing functions that work on data types implementing the Enumerable protocol; examples of these are lists, maps, and ranges.


What are Elixir's trending themes for 2019? ElixirConf EU

Article by Martin Gausby

ElixirConf EU conference is the European hub for the Elixir community, their 27 talks and are carefully picked each year. As a result, the themes of the conference are a good guide in finding out what is trending in 2019. Our Elixir expert has considered all the talks that will take place between 8–9 April, and found 6 main themes this year.


Videos: 1