Fault Tolerance
Erlang and Elixir have reputations for tremendous fault tolerance. This is well deserved, but not because they prevent errors. Instead they give us the tools to recover gracefully from any errors that crop up at runtime.
Almost all languages, including Elixir, have built-in mechanisms to handle exceptions. These require that we identify risky code in advance, wrap it in a block that tries to execute it, and provide a block to rescue the situation if the code fails. In most languages, this kind of exception handling is essential, but in Elixir we hardly ever have to reach for it.
The OTP team at Ericsson took an interesting tack around this pattern. For them, extreme fault tolerance wasn’t a “nice to have.” It was a critical requirement ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access