About This Title

Pages: 305
Published: May 2025
ISBN: 9798307689769
In Print

Elixir Patterns

The essential BEAM handbook for the busy developer

by Alexander Koutmos

Elixir Patterns aims to surface the powerful and unique characteristics of the Erlang virtual machine and show you how to solve everyday problems in a simple yet scalable way. Not only will you master the tools at your disposal courtesy of Erlang and the BEAM, you will also learn how to better utilize functional programming in order to achieve your goals in a clear and concise way. The idea of having a “go-to” toolbox of patterns you can leverage is an enticing one - that is what design patterns are all about! This book forgoes the abstract and instead provides concrete examples to help you better leverage the unique properties of Elixir, Erlang and BEAM.


This work was written and produced entirely by the author. We are proud to be distributing it.

(Not currently available for purchase)


The Erlang programming language was first released in 1986 and to this day continues to have a tremendous impact on the field of computer programming. This impact is apparent when you look at how many other programming languages have actor model frameworks that mirror the semantics of Erlang and how many recent programming languages have emerged that make use of functional programming concepts. In addition, while many other programming languages and their runtimes require external tools in order to deal with application crashes, users of the Erlang virtual machine (or BEAM as it is colloquially called) enjoy fault-tolerant constructs that are built right into the runtime.

While the Erlang syntax may not be for everyone, we can still leverage the benefits of Erlang and the BEAM through the Elixir programming language. Elixir provides us an alternative programming language that can target the same runtime as Erlang while also leaning on the Erlang standard library. You essentially get all of the benefits of Erlang and the BEAM along with all of the tools available to you through the Elixir standard library.

This book guides you through the Erlang standard library and how you can leverage it from Elixir as well as how you can structure applications in order to make the most out of the unique runtime that is the BEAM. By the end of this book you will be comfortable constructing your own supervision trees, using processes, leaning on ETS and persistent term for when performance is a primary concern, and how you can use both the mutable and immutable data structures that are available in the Erlang standard library. In addition, you’ll learn how you can package these language and runtime primitives into reusable patterns in order to solve common problems that you may encounter in your day to day applications.

What You Need

Elixir Patterns only requires that you have a computer that can run Erlang/Elixir and that both are of a recent version. Anything newer than Elixir v1.14.0 and Erlang/OTP 25 will be able to execute all of the code discussed in the book. An internet connection is also required so that you can occasionally download packages from Hex.

Resources

Releases:

  • P1.0 2025/05/16

Contents & Extracts

  • Introduction
    • What You Will Learn
    • Who is This Book for
  • Part 1
    • 1. Erlang Standard Library Part 1
    • 2. Erlang Standard Library Part 2 excerpt
    • 3. The Elixir Standard Library
  • Part 2
    • 4. Agents, Tasks and GenServers
    • 5. Orchestrating Supervisors and GenServers
    • 6. Supervisor Initialization Patterns excerpt
    • 7. Advanced GenServer Recipes
    • 8. Scalable Actor Model and the Adapter Pattern
  • Thank you!
  • Index

Author

Alexander Koutmos has been professionally writing software for over a decade and has been primarily working with Elixir since 2015. He currently maintains a number of Elixir libraries on Hex, is a host on the BEAM Radio podcast, and wrote a book about Building a Weather Station with Nerves and Elixir.

(Not currently available for purchase)

Related Titles:

About This Title

Pages: 305
Published: May 2025
ISBN: 9798307689769
Edition: 1
In Print