Susumu Yamazaki (ZACKY) is currently an Associate Professor at the University of Kitakyushu. One of his current research interests focuses on system and social implementation using Elixir, Phoenix, Nerves and Nx. He is a co-founder and creator of Pelemay series, and satellite image processing systems with Elixir.
When implementing a system that requires performance, we sometimes use NIFs, a mechanism for calling higher-performance C code from Elixir. NIFs perform better than Port, another mechanism to call C. However, they have the disadvantage that if they crash, the entire Erlang VM will be abnormally terminated, even under Supervisor’s control. This defect is a significant obstacle when building fault-tolerant systems.
This talk shows three points to describe robust NIFs: