3 ms·
Do you know other VMs that resist a crash in external, native, unchecked code? A NIF is basically VM code that undergo some minor limitation and runs at full s
by lostjohnny 7y ago
Do you know other VMs that resist a crash in external, native, unchecked code?
A NIF is basically VM code that undergo some minor limitation and runs at full speed.
BEAM is not a sandbox and will (probably) never be.
The most important lesson Erlang teaches is that there could be no recovery from crashes from the same code that crashed.
That's why in OTP Supervisors are in the shape of a tree, each level is responsible for its children and only its children.
If you need control on some process tree, you start another supervisor to supervise it and so on.
The same goes for the VM: if you need to supervise the VM, you start an external process to check its status.
A crashed process is better than a process that misbehaves.
Non locality of error handling is the only way to be really fault tolerant.