3 ms·
Erlang is super cool, but... to be picky, it does and it doesn't share the Unix model. It does in the sense that you don't share anything between processes. B
by davidw 19y ago
Erlang is super cool, but... to be picky, it does and it doesn't share the Unix model. It does in the sense that you don't share anything between processes. But it doesn't because all those processes live in one real process, which is why spinning them out is so cheap. It's also why you have to be very careful about linking to 3rd party libs in Erlang - all it takes is one blocking call, and poof, everything grinds to a halt. IIRC, one defense mechanism they've developed against this is to actually start app linkages up in separate unix processes and talk to them via sockets.
- yariv 19y agoStrictly speaking, Erlang processes have a type of shared memory -- ets tables -- but the semantics are somewhat different from other languages that use traditional shared memory. However, when you need synchronization, you just use Mnesia transactions, which make working with this kind of shared memory a piece of cake. Also, Mnesia is distributed, a nice attribute that other STM implementations lack.