4 ms·
> When a Java thread crashes it doesn't bring down the whole JVM any more than when an Erlang process does. Just the one thread dies. I think this is inaccurat
by dschiptsov 13y ago
> When a Java thread crashes it doesn't bring down the whole JVM any more than when an Erlang process does. Just the one thread dies.
I think this is inaccurate also.) Technically there is no memory protection from one pthread to another, so "crashed" pthread could damage shared data or the common stack. It is, however, not JVM's problem but of the pthreads as a concept, and Armstrong argued that only share-nothing architecture (process-based) could be fault-tolerant, and pthreads are just "broken by design".
- pron 13y agoTrue, but this is not black-and-white, but a matter of degree. Erlang processes also share memory: ETS. A crashed process could well leave an ETS table in an applicatively illegal state. So isolation is a scale. With Quasar we try to tip the scale closer to Erlang's isolation levels, but, as I've said, shared data structures could be extremely useful, too. If fault-tolerance is your most important requirement, that far exceeds in its importance any other requirement, then by all means use BEAM. It was designed for precisely that kind of application. If, however, fault-tolerance is just one of several important requirements, then the JVM will be the better choice in many circumstances.