Wrapping Up
Concurrency and parallelism are tough topics at first, but they can be distilled down to a difference between coordinating multiple tasks and executing multiple tasks at the same time. Ruby is a concurrent language, but the Global Virtual Machine Lock prevents it from executing in parallel. The BEAM is a highly parallel runtime that allows Elixir to seamlessly scale across all CPU cores. This gives it an advantage when it comes to squeezing more performance out of a system for less total cost.
Processes are the foundation of concurrency in Elixir. Processes send and receive messages with other processes, and it’s common to run hundreds of thousands of processes in a production system. This is because processes are lightweight, with ...
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