4 ms·
Agreed! Just like people admire at a beautifully engineered ship, plane or nice building, I think BEAM VM is marvel of software engineering. It got so many thi
by rdtsc 10y ago
Agreed! Just like people admire at a beautifully engineered ship, plane or nice building, I think BEAM VM is marvel of software engineering.
It got so many things right, it was ahead of its time. Is already stable and is serving critical pieces of infrastructure around the world for many years.
It is also worth pointing out that the BEAM was designed with one purpose and that is to run Erlang. Other languages can be implemented on it, but they sort of have to adapt to the Erlang way. The downside there is that the BEAM official specification is its ... implementation. And reasons for implementation were written down. You can catch Joe Armstrong or Robert Virding at one of the events like Erlang Factory and they'll happily tell you why things works the way they do.
Things I like about this VM:
* Process isolation : sounds like magic but it's true you can have millions of processes _and_ all having isolated heaps.
* Dynamic tracing : connect to a node and start tracing any function
* Hot code loading : don't feel like stopping a critical production server to add an extra log statement or upgrade it, don't have to. Can just load the code.
* Like you mentioned, GC. It will never "stop the world". When process ran and exited, the whole block can be reclaimed quickly and efficiently.
Anyway using BEAM with Erlang, Elixir, LFE or other languages, feels a bit like using a secret weapon that very few know about.
- rdtsc 10y agoEDIT: too late to edit but it should have been "... reasons for implementation were NOT written down...". So yes do track Robert and Joe down and ask them why
- Tomte 10y agoAnd write the answer down. Somewhere, even if it's just your blog with about three readers.
- jacquesm 10y agoAnd the very nice 1-2 between the Erlang compiler and BEAM that ensures the system keeps on ticking by limiting the amount of work done in a single reduction. That's a very elegant solution to various CPU hogging problems that would otherwise be extremely hard to solve in userland.