Leanpub Header

Skip to main content

The Art of Erlang

Building Concurrent, Fault-Tolerant Systems with the Language of the Telecommunications Era

The Art of Erlang
This book is 100% completeLast updated on 2026-10-01

Erlang was created to build systems that never stop. From its origins in telecommunications to modern platforms like WhatsApp and RabbitMQ, its approach to concurrency and fault tolerance has shaped some of the world's most reliable software. This book teaches both the language and the principles behind building resilient, production-ready systems.

Minimum price

$19.00

$29.00

You pay

Author earns

$

Also available for 1 book credit with a Reader Membership

PDF
EPUB
WEB
APP
195
Pages
About

About

About the Book

Erlang was born in 1986 inside Ericsson to solve a problem that no other language could handle: building telephone switching systems that must run continuously for years, handle hundreds of thousands of concurrent conversations, and survive hardware failures without dropping a single call. Today, more than forty years later, the principles that made Erlang indispensable for telecommunications are the same principles that power WhatsApp's messaging infrastructure, RabbitMQ's message broker, and countless distributed systems around the world. This book takes you from the very foundations of the language through the full breadth of OTP (the Open Telecom Platform), covering every concept a serious practitioner needs: pattern matching, recursion, lightweight processes, message passing, GenServer and Supervisor behaviours, fault tolerance, distributed programming, ETS and Mnesia data stores, networking, performance optimization, and production deployment. Each chapter builds progressively from beginner to expert level, with extensive code examples, real-world case studies, and deep dives into the internal mechanisms that make Erlang unique. This is not a language reference; it is a practitioner's guide to building systems that run forever.

Author

About the Author

Steve Publications

Steve is a technology professional with over 20 years of experience in software development, server infrastructure, cybersecurity, vulnerability research and reverse engineering. He specializes in analyzing complex systems, identifying weaknesses and improving security.

Beyond his professional work, Steve collaborates with researchers and industry experts to create practical technical books covering software development, cybersecurity, cloud computing, DevOps, AI and enterprise technologies. His goal is to help IT professionals, students and enthusiasts develop practical skills through clear explanations, real-world examples and hands-on exercises.

At Steve Publications, we use AI to assist with translation, proofreading and editing but not to replace the research, technical expertise or hands-on experience behind our books. Some authors publish under pseudonyms for privacy or professional reasons.

Every book is written, reviewed and maintained by experienced professionals, supported by a private community of over 420 engineers and researchers. We prioritize technical accuracy, practical value and regularly updated content over mass-produced AI-generated text.

We welcome experienced professionals interested in writing or reviewing books, especially in specialized and emerging technology fields. If you'd like to contribute, contact us with your area of expertise.

We stand behind our work. If a book doesn't meet your expectations, Leanpub offers a 60-day money-back guarantee.

Contents

Table of Contents

Building Concurrent, Fault-Tolerant Systems with the Language of the Telecommunications Era

Introduction

  1. What Makes Erlang Different
  2. Who This Book Is For
  3. How to Read This Book
  4. A Note on Code Examples
  5. The Promise of This Book

Chapter 1: The Origins of Erlang

  1. The Telecom Crisis of the 1980s
  2. Joe Armstrong, Robert Virding and Mike Williams
  3. From a Research Project to Ericsson’s Secret Weapon
  4. The Design Philosophy: Let It Crash
  5. Open Source and the Birth of the Modern Ecosystem

Chapter 2: Philosophy and Architecture

  1. Immutability and Pure Functions
  2. The Actor Model and Message Passing
  3. The BEAM Virtual Machine
  4. Garbage Collection in a Concurrent World
  5. Comparing Erlang to Other Languages

Chapter 3: Getting Started with Erlang

  1. Installing Erlang/OTP
  2. The Erlang Shell (REPL)
  3. Your First Module
  4. Build Tools: Make, Rebar3 and Mix
  5. Editor Setup and IDEs

Chapter 4: Language Fundamentals – Syntax and Data Types

  1. Variables, Atoms and the Assignment Model
  2. Numbers: Integers, Floats and Bignums
  3. Tuples, Lists and Maps
  4. Binaries and Bit Syntax
  5. Operators and Expressions

Chapter 5: Pattern Matching and Control Flow

  1. The Power of Pattern Matching
  2. Function Clauses and Clause Selection
  3. Case Expressions and Multi-Clause Functions
  4. Guard Expressions
  5. If Expressions and the Receive Construct

Chapter 6: Functions, Modules and Recursion

  1. Named Functions and Module Organization
  2. Anonymous Functions and Closures
  3. Higher-Order Functions and the Lists Module
  4. Recursion Patterns: Tail Recursion and Accumulators
  5. Recursive Data Processing

Chapter 7: Concurrency – Lightweight Processes and Message Passing

  1. What Is an Erlang Process?
  2. Spawning and Communicating with Processes
  3. The Mailbox and Receive Semantics
  4. Linking and Trapping Exits
  5. Monitoring and the Monitored Process Registry

Chapter 8: The Open Telecom Platform (OTP) – Overview

  1. What Is OTP and Why Does It Exist?
  2. OTP Application Structure
  3. The Behaviour Pattern
  4. OTP Design Principles
  5. Building Your First OTP Application

Chapter 9: GenServer – The Workhorse of OTP

  1. What Is a GenServer?
  2. Implementing a GenServer
  3. Handling Calls, Casts and Info Messages
  4. State Management and the Code Change Callback
  5. Real-World GenServer Patterns

Chapter 10: Supervisors and Fault Tolerance

  1. The Supervision Tree
  2. Supervisor Strategies
  3. Building Robust Supervision Trees
  4. Dynamic Child Processes
  5. Fault Tolerance in Production

Chapter 11: Applications, Releases and Deployment

  1. The Application Behaviour
  2. Application Resource Files
  3. Release Management with Rebar3
  4. Deployment Strategies
  5. Monitoring and Observability

Chapter 12: Data Storage – ETS, DETS and Mnesia

  1. ETS – In-Memory Tables
  2. DETS – Disk-Based Storage
  3. Mnesia – Distributed Database
  4. Choosing the Right Storage Mechanism
  5. Performance and Scalability Considerations

Chapter 13: Distributed Programming

  1. Erlang Nodes and the Distributed Runtime
  2. Remote Procedure Calls and Node Communication
  3. Distributed Processes and Global Names
  4. Building Distributed Systems
  5. Network Partitions and Split-Brain

Chapter 14: Networking and Interoperability

  1. TCP and UDP Sockets
  2. Building Network Servers
  3. HTTP and Web Frameworks
  4. NIFs – Native Implemented Functions
  5. Ports and External Program Communication

Chapter 15: Error Handling, Testing and Debugging

  1. The Error Handling Philosophy
  2. Try-Catch and Exception Types
  3. Testing with Common Test and EUnit
  4. Property-Based Testing with PropEr
  5. Debugging, Tracing and Profiling

Chapter 16: Performance Optimization and Advanced Patterns

  1. Understanding Erlang Performance Characteristics
  2. Memory Management and Garbage Collection Tuning
  3. Compiler Flags and Code Optimization
  4. Design Patterns in OTP Applications
  5. The Modern Erlang Ecosystem

Chapter 17: Real-World Applications and Case Studies

  1. WhatsApp and the Scale of Erlang
  2. Riak and Distributed Databases
  3. RabbitMQ and Message Brokers
  4. Heroku’s Platform Architecture
  5. Lessons from Production Deployments

Conclusion: The Future of Erlang

  1. Where Erlang Stands Today
  2. Elixir and the BEAM Family
  3. The Continuing Relevance of OTP
  4. Your Path Forward

References

Get the free sample chapters

Click the buttons to get the free sample in PDF or EPUB, or read the sample online here

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub