SlideShare a Scribd company logo
Let it Crash! 
The Erlang Approach 
to Building Reliable 
Services
Hi, folks.
This talk is not about convincing 
Facebook to pay you 19$ billion.
This is a talk about doing good, 
careful work…
…on systems that might kill 
people or ruin companies, 
which is totally rad.
many 
processors
in a network
inside an even 
bigger network
and none of it’s 
reliable
and also it’s 
spread across 
the globe
Sometimes we don’t care 
to make the illusion of 
whole-system reliability.
Sometimes we do.
In this talk, we do.
Erlang
A handful simple pieces.
An old-fashioned, explicit 
functional language.
All data is immutable, 
without exception.
Processes are the smallest 
unit of control flow.
Processes are sequential 
internally.
Processes are concurrent 
to one another.
Processes can 
communicate only 
through message 
passing.
Messages are copied 
between processes.
Processes can “link” and 
receive messages about 
linked pair deaths.
This is called 
“trapping exits”.
OR
Processes can “link” and 
die when linked pairs die.
This is the 
default 
behaviour.
That’s basically it.
The implications are 
really fun.
Supervision
Well known process traps exits, 
restart other processes that fail.
The failed process is restarted 
from a static specification.
The failed process state 
is not preserved.
The failed process state 
is not preserved. 
(intentionally)
Registered 
Names
These are decoupled 
from the underlying 
process.
You can change processes 
without consumers getting 
wise to it.
Protocols
You can’t manipulate another 
process’ state.
You have to convince 
it to change itself.
Network 
Transparency
Network 
Transparency 
(kinda)
Messages may be addressed 
to explicit pid, process name. 
Node may be specified, too.
Erlang hides the network 
details, leaving just the 
abstraction.
Hot Code 
Reloading
Code updates can be 
inserted at runtime.
New functions and new 
processes get inserted 
under old names.
Tricky without VM support.
This is all driving to one end:
Fault 
Tolerance
Everything in Erlang (and 
everything not) is in the 
service of building fault-tolerant 
systems.
The short-hand for this is:
Let it crash!
Faulty subsystems are 
difficult to correct.
Don’t bother. 
Just restart.
What’s unique 
to Erlang?
VM support for 
swapping function 
implementations.
Cheap processes.
Cheap processes. 
(309 words of memory)
Strict process isolation.
It’s all small 
stuff really.
What can you 
do now?
Short of using Erlang, that is…
Immutable 
Data
This means 
embracing 
copying.
Rub some 
Queue on it.
Queue 
+ Async Execution 
= Erlang Process
Structure your 
system as 
loosely coupled 
sub-systems.
Sub-systems communicate 
through a well-known 
protocol.
They may be co-resident 
in memory or across 
machine boundaries.
Decoupling brings 
many secondary 
advantages.
Isolate.
Don’t manipulate 
memory that 
isn’t yours.
Critical components get 
their own machines.
Plan for 
failure.
If sub-system A depends 
on B and B fails, what 
does A need to do?
“Hey, who knew 
that system C 
relied on B too?”
Supervise.
Negotiate the restarts 
of failed sub-systems 
into well-known states.
Erlang implements all of 
this for you, but there’s 
nothing special about it.
Anything else?
Understand the 
Network.
0. The network is reliable. 
1. Latency is zero. 
2. Bandwidth is infinite. 
3. The network is secure. 
4. Topology doesn’t change. 
5. There is one administrator. 
6. Transport cost is zero. 
7. The network is homogenous.
P.S.
This is how the 
Internet works.
This is how hard 
real-time systems 
work.
This is how 
multi-processors 
work.
There’s decades 
of material to 
learn from.
Thanks! 
<3 
@bltroutwine

More Related Content

PPT
Erlang OTP
DOC
School management System
PPTX
Information architecture for websites and intranets
PPT
Ooad Overview
PDF
Agreement Protocols, distributed File Systems, Distributed Shared Memory
PDF
Problem solving
PPTX
Library Management System Waterfall Model
PPTX
Distributed Shared Memory
Erlang OTP
School management System
Information architecture for websites and intranets
Ooad Overview
Agreement Protocols, distributed File Systems, Distributed Shared Memory
Problem solving
Library Management System Waterfall Model
Distributed Shared Memory

What's hot (20)

PPTX
AI: Planning and AI
PPT
McCall's Quality Factors
PPTX
SDLC
PPTX
Software testing and types.pptx
PPTX
SYSTEM DEVELOPMENT LIFE CYCLE
PPTX
PPTX
Operating system Dead lock
DOCX
VIRTUALIZATION STRUCTURES TOOLS.docx
PPTX
Lec 7 query processing
PDF
Artificial Intelligence A Modern Approach
PPTX
Super market billing system report in python
PDF
2- THE CHANGING NATURE OF SOFTWARE.pdf
PPTX
Coupling , Cohesion and there Types
PPTX
Waterfall Model PPT in Software Engineering
PPT
Agile software development
PPTX
Fake news detection
PPT
Chapter.3
PPTX
Critical section problem in operating system.
PPTX
Software Engineering - Spiral Model
PDF
Performance Considerations in Logical Data Warehouse
AI: Planning and AI
McCall's Quality Factors
SDLC
Software testing and types.pptx
SYSTEM DEVELOPMENT LIFE CYCLE
Operating system Dead lock
VIRTUALIZATION STRUCTURES TOOLS.docx
Lec 7 query processing
Artificial Intelligence A Modern Approach
Super market billing system report in python
2- THE CHANGING NATURE OF SOFTWARE.pdf
Coupling , Cohesion and there Types
Waterfall Model PPT in Software Engineering
Agile software development
Fake news detection
Chapter.3
Critical section problem in operating system.
Software Engineering - Spiral Model
Performance Considerations in Logical Data Warehouse
Ad

Viewers also liked (20)

PDF
Erlang - Concurrent Language for Concurrent World
PDF
1 hour dive into Erlang/OTP
KEY
Erlang vs. Java
PDF
Concurrency in Elixir with OTP
PPT
Let It Crash (@pavlobaron)
PDF
Elixir Elevated: The Ups and Downs of OTP at ElixirConf2014
PDF
Elixir and OTP
PDF
What can be done with Java, but should better be done with Erlang (@pavlobaron)
KEY
Winning the Erlang Edit•Build•Test Cycle
PPTX
Erlang - Because s**t Happens by Mahesh Paolini-Subramanya
PDF
Clojure class
PDF
Elixir talk
PDF
High Performance Erlang
PDF
Messaging With Erlang And Jabber
PDF
20 reasons why we don't need architects (@pavlobaron)
PDF
Clojure values
PDF
Clojure made-simple - John Stevenson
PDF
VoltDB and Erlang - Tech planet 2012
ZIP
Clojure: Functional Concurrency for the JVM (presented at Open Source Bridge)
PDF
NDC London 2014: Erlang Patterns Matching Business Needs
Erlang - Concurrent Language for Concurrent World
1 hour dive into Erlang/OTP
Erlang vs. Java
Concurrency in Elixir with OTP
Let It Crash (@pavlobaron)
Elixir Elevated: The Ups and Downs of OTP at ElixirConf2014
Elixir and OTP
What can be done with Java, but should better be done with Erlang (@pavlobaron)
Winning the Erlang Edit•Build•Test Cycle
Erlang - Because s**t Happens by Mahesh Paolini-Subramanya
Clojure class
Elixir talk
High Performance Erlang
Messaging With Erlang And Jabber
20 reasons why we don't need architects (@pavlobaron)
Clojure values
Clojure made-simple - John Stevenson
VoltDB and Erlang - Tech planet 2012
Clojure: Functional Concurrency for the JVM (presented at Open Source Bridge)
NDC London 2014: Erlang Patterns Matching Business Needs
Ad

Similar to Let it crash! The Erlang Approach to Building Reliable Services (20)

ODP
An introduction to erlang
PPTX
PPS
Erlang plus BDB: Disrupting the Conventional Web Wisdom
PPS
Disrupt
PPTX
Erlang real time
KEY
Osdc 2011 michael_neale
PDF
Erlang from behing the trenches by Francesco Cesarini
PDF
FunctionalConf '16 Robert Virding Erlang Ecosystem
PPT
The Erlang Programming Language
PDF
Distributed Erlang Systems In Operation
PDF
Erlang, the big switch in social games
PDF
Erlang factory SF 2011 "Erlang and the big switch in social games"
PDF
Programming Erlang Software for a Concurrent World Second Edition Joe Armstrong
PDF
Erlang, an overview
PDF
Why Erlang? - Bar Camp Atlanta 2008
PDF
Choosing the Erlang Ecosystem for Developing the Applications of the Future!
KEY
Erlang bootstrap course
PDF
You shall not get excited
PDF
Introduction to Erlang Part 2
PDF
NDC London 2014: Thinking Like an Erlanger
An introduction to erlang
Erlang plus BDB: Disrupting the Conventional Web Wisdom
Disrupt
Erlang real time
Osdc 2011 michael_neale
Erlang from behing the trenches by Francesco Cesarini
FunctionalConf '16 Robert Virding Erlang Ecosystem
The Erlang Programming Language
Distributed Erlang Systems In Operation
Erlang, the big switch in social games
Erlang factory SF 2011 "Erlang and the big switch in social games"
Programming Erlang Software for a Concurrent World Second Edition Joe Armstrong
Erlang, an overview
Why Erlang? - Bar Camp Atlanta 2008
Choosing the Erlang Ecosystem for Developing the Applications of the Future!
Erlang bootstrap course
You shall not get excited
Introduction to Erlang Part 2
NDC London 2014: Thinking Like an Erlanger

More from Brian Troutwine (11)

PDF
(Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software
PDF
Getting Uphill on a Candle: Crushed Spines, Detached Retinas and One Small Step
PDF
The Charming Genius of the Apollo Guidance Computer
PDF
Fault-tolerance on the Cheap: Making Systems That (Probably) Won't Fall Over
PDF
Monitoring Complex Systems: Keeping Your Head on Straight in a Hard World
PDF
Automation With Humans in Mind: Making Complex Systems Predictable, Reliable ...
PDF
Monitoring Complex Systems - Chicago Erlang, 2014
PDF
Erlang, LFE, Joxa and Elixir: Established and Emerging Languages in the Erlan...
PDF
Instrumentation as a Living Documentation: Teaching Humans About Complex Systems
PDF
10 Billion a Day, 100 Milliseconds Per: Monitoring Real-Time Bidding at AdRoll
PDF
Monitoring with exometer at AdRoll
(Moonconf 2016) Fetching Moths from the Works: Correctness Methods in Software
Getting Uphill on a Candle: Crushed Spines, Detached Retinas and One Small Step
The Charming Genius of the Apollo Guidance Computer
Fault-tolerance on the Cheap: Making Systems That (Probably) Won't Fall Over
Monitoring Complex Systems: Keeping Your Head on Straight in a Hard World
Automation With Humans in Mind: Making Complex Systems Predictable, Reliable ...
Monitoring Complex Systems - Chicago Erlang, 2014
Erlang, LFE, Joxa and Elixir: Established and Emerging Languages in the Erlan...
Instrumentation as a Living Documentation: Teaching Humans About Complex Systems
10 Billion a Day, 100 Milliseconds Per: Monitoring Real-Time Bidding at AdRoll
Monitoring with exometer at AdRoll

Recently uploaded (20)

PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PPTX
Internet of Things (IOT) - A guide to understanding
PDF
Well-logging-methods_new................
PPT
Project quality management in manufacturing
PPTX
CH1 Production IntroductoryConcepts.pptx
PPTX
Fundamentals of safety and accident prevention -final (1).pptx
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PDF
BIO-INSPIRED HORMONAL MODULATION AND ADAPTIVE ORCHESTRATION IN S-AI-GPT
PPTX
Safety Seminar civil to be ensured for safe working.
PDF
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
PDF
composite construction of structures.pdf
PPTX
Artificial Intelligence
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PPTX
Current and future trends in Computer Vision.pptx
PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
PDF
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
Internet of Things (IOT) - A guide to understanding
Well-logging-methods_new................
Project quality management in manufacturing
CH1 Production IntroductoryConcepts.pptx
Fundamentals of safety and accident prevention -final (1).pptx
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
BIO-INSPIRED HORMONAL MODULATION AND ADAPTIVE ORCHESTRATION IN S-AI-GPT
Safety Seminar civil to be ensured for safe working.
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
composite construction of structures.pdf
Artificial Intelligence
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
Current and future trends in Computer Vision.pptx
Automation-in-Manufacturing-Chapter-Introduction.pdf
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf

Let it crash! The Erlang Approach to Building Reliable Services