Menu

Post image 1
Post image 2
1 / 2
0

The BEAM Is Not Like Other Runtimes (And That's Why Elixir Scales the Way It Does)

DEV Community·shayan holakouee·about 1 month ago
#zxke6ig0
Reading 0:00
15s threshold

You have been writing Elixir for a while. You know GenServers. You know supervisors. You have hit the BEAM's concurrency model enough times to trust it. But there is a level below that which most Elixir developers never look at, and it explains a lot of behavior that otherwise seems like magic. Why does spawning a hundred thousand processes not kill your system? Why is a process crash isolated but not silent? Why does garbage collection in Elixir not stop the world? The answers are all in the BEAM, and they are worth understanding properly. The BEAM Is Not the JVM With a Different Language This comparison comes up constantly and it misleads people. Both are virtual machines that run bytecode. That is roughly where the similarity ends. The JVM was designed around threads. Concurrency on the JVM means OS threads, shared mutable state, locks, and a garbage collector that operates across the entire heap. The BEAM was designed around processes. Not OS processes. Not OS threads.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More