A bit rambling towards the end, but this was a good talk nonetheless. A great look at the theoretical side of things demoed in The Soul of Erlang and Elixir .
- It’s hard to write parallel programs. Write concurrent programs instead, and automate parallelizing them.
- Distributing processes onto cores is difficult; people on the Erlang/OTP team have solved this so you don’t even have to think about it.
- In contrast, every C++ programmer working on multithreaded code needs to figure this stuff out from scratch.
- It’s easier to fill a bucket efficiently with sand than rocks.
- Prefer tons of very lightweight processes (Erlang/BEAM processes) over fewer, heavier processes (OS threads).
- Erlang exclusively uses message passing for coordination, and data accompanying messages is copied.
- Related thought: how does BEAM’s preemptive scheduler work, and how does it deal with open IO at preemption time?
- Looks like this is a good resource for answers: https://blog.stenmans.org/theBeamBook/#CH-Scheduling