Erlang/OTP
"Systems that run forever, self-heal and scale"
Background
Ericsson in the 80s
Programming telephone switches
Joe Armstrong (@joeerl) & others
Inspiration in lots of languages inc. Smalltalk & Prolog
High availability
Concurrency
Language
-
Functional
-
Pattern Matching
-
Prolog syntax
- Small
Concurrency (Actor Model)
-
Independent entities that communicate through messaging
-
No shared state
-
Asynchronous Communication
- Implemented using lightweight processes
Let It Crash
- Don't trap errors in code, let Actors die
- Crash at the point of failure = Error detection
- Don't spread to other parts of system = Error containment
Supervisors
-
Watch over worker processes
- Start & Restart
- Rule based
- Children can be workers or other supervisors
- Supervision Trees
- Error recovery
Erlang Systems
- Applications & Processes
- Feels like an operating system
- Interactive, tools for inspection
- 'Hot' code loading
- Micro (nano?) services
- Large surface area
Distributed Erlang / OTP
- Location transparency
- Erlang clusters
-
ErlangOTP - library / framework for building robust systems