2 ms·
When a NIF causes a crash it does take down the whole VM. I think the way to isolate NIFs is have them on their own nodes.
by sjtgraham 11y ago
When a NIF causes a crash it does take down the whole VM. I think the way to isolate NIFs is have them on their own nodes.
- seiji 11y agoKinda hilarious since we've had completely isolated ports for a loooong time. For non-data-intensive tasks, don't underestimate how fast speaking erl_interface over a unix pipe can be. Plus, free isolation, free fault tolerance and free supervision restarting without any networking required. http://erlang.org/doc/reference_manual/ports.html http://erlang.org/doc/reference_manual/ports.html (15.1) Here's one of my old examples (no guarantees to its current effectiveness or correctness): https://github.com/mattsta/libgeoip-erlang/blob/master/c_src/geoipport.c https://github.com/mattsta/libgeoip-erlang/blob/master/c_src... — then the whole thing is opened and run from Erlang like https://github.com/mattsta/libgeoip-erlang/blob/70b58ef5ef8adfec6089c886426be3a322e82da2/src/libgeoip.erl#L21-L33 https://github.com/mattsta/libgeoip-erlang/blob/70b58ef5ef8a... It's just cleaner to stay outside direct VM linkage as much as possible.