Erlang's not about lightweight processes and message passing
7 days ago
- #Distributed Systems
- #Behaviours
- #Erlang
- Erlang's key innovation is not just lightweight processes and message passing, but its generic components called 'behaviours'.
- Behaviours in Erlang are like interfaces in other languages, providing a structured way to build reliable distributed systems.
- Erlang was developed at Ericsson for telephone switches, handling internet-scale traffic before the internet was widespread.
- After being banned at Ericsson in 1998, Erlang was open-sourced, leading to its broader adoption.
- Joe Armstrong, one of Erlang's creators, emphasized the importance of behaviours in his PhD thesis.
- Behaviours like gen_server, gen_event, gen_fsm, supervisor, application, and release provide a framework for building robust systems.
- Supervisors in Erlang manage process health, restarting failed processes according to predefined strategies.
- The 'let it crash' philosophy promotes reliability by allowing processes to fail fast and be restarted by supervisors.
- Erlang's behaviours enable sequential code for business logic while handling concurrency and distribution transparently.
- Simulation testing and formal verification are easier with the structured approach provided by behaviours.