In 2019 or 2020, I started to extract all Joe Armstrong from his publications and conferences. It started as a small project on Wikiquote. If you are interested, please help me! If you want to help me, you can also subscribe to this blog, you will receive more quotes from Joe Armstrong and others!
Faults, Scaling and Erlang concurrency
Faults, Scaling and Erlang concurrency, September 24, 2014
In order to handle failure, you need two machines. [...] You have to be interested in distributed programming. You have to be interesting in parallel computing. You have to be interested in concurrent programming.
One way I think Erlang was a kind of software emulating Tandem machine.
If you managed to scale horizontally, you can scale.
You can both kept fault tolerance and scalability. You can have both or none of them
Shared memory is evil.
Defensive programming in C, is only necessary because you have only have a single thread of computation. If you have a sequential language and it crashes, you lost everything.
In Erlang, you have as many processes you want. You can arrange the processes observing each other. If you have got half million processes to do something, what is it matter if few thousand of them fail?
The cornerstones of fault tolerant programming are to isolate errors to make sure if one thing crash it does not crash anything else. That's what the processes in operating system do.
Bad concurrency model, I think, is something that make a lot of programming artificially difficult.
If you can't detect failures, you are unable to recover from them. That's an obvious principle you need.
We need to know why things fails. If we want to improve our system, we need to put that information into that system into logs or something.
Processes are isolated by design. Context switching are very lightweight. The processes by design cannot damage each other.
Our goal is actually to have about 75% utilization if we had one hundred CPU we would hope that our program will go 75% faster without tweaking it.