Fault Tolerance: Actor's 'Let It Crash' vs. CSP's Explicit Errors

Actor systems like Erlang and Elixir champion a 'let it crash' philosophy, achieving fault tolerance through isolated processes and supervision trees that automatically restart failed components. CSP, exemplified by Go's goroutines and channels, typically relies on explicit error propagation and structured concurrency for managing failures.

The top 3

  1. Erlang's 99.999% Uptime: "Let It Crash" in Telecom: Erlang, leveraging the Actor Model's "Let It Crash" philosophy, achieves five-nines (99.999%) availability in critical systems like Ericsson's telecom switches and WhatsApp. This is done by isolating failures to individual processes and automatically restarting them via supervisor trees, preventing system-wide outages.
  2. Go's Error Returns: CSP-Style Explicit Handling: Go, influenced by CSP, handles errors explicitly through multiple return values and mechanisms like `panic` and `recover`. This approach requires developers to actively check and manage error values, ensuring explicit control over error flow rather than relying on implicit exception handling.
  3. Fault Tolerance Philosophies: Actor's Reactive vs. CSP's Proactive: The Actor Model's "Let It Crash" embodies a reactive fault tolerance, relying on runtime supervision and automatic recovery of isolated processes. In contrast, CSP often encourages a more proactive approach, where developers design systems to anticipate and explicitly handle potential errors through structured communication and error-checking mechanisms.

Sources

Open the full topic