<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">That is an interesting note about running it on another node and using it to communicate. For this though, I would then have to monitor when/if the node goes down as well .<br class=""><div><blockquote type="cite" class=""><div class="">On Aug 16, 2017, at 11:07 AM, Dmytro Lytovchenko <<a href="mailto:dmytro.lytovchenko@gmail.com" class="">dmytro.lytovchenko@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Just an assumption, possibly a false assumption.<div class="">If they already have a NIF, it means networked communication would possibly be slower than they expect.</div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">2017-08-16 17:05 GMT+02:00 Roger Lipscombe <span dir="ltr" class=""><<a href="mailto:roger@differentpla.net" target="_blank" class="">roger@differentpla.net</a>></span>:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 16 August 2017 at 14:53, code wiget <<a href="mailto:codewiget95@gmail.com" class="">codewiget95@gmail.com</a>> wrote:<br class="">
> I have been reading about NIF’s here:<br class="">
> <a href="http://erlang.org/doc/tutorial/nif.html" rel="noreferrer" target="_blank" class="">http://erlang.org/doc/<wbr class="">tutorial/nif.html</a> but it seems like they are<br class="">
> incredibly unsafe: “it is also the least safe, because a crash in a NIF<br class="">
> brings the emulator down too”.<br class="">
<br class="">
</span>They're not "incredibly unsafe". There's nothing inherently unstable<br class="">
about a NIF. It's precisely as stable (or unstable) as the underlying<br class="">
implementation. It's just that it's running inside the BEAM, which<br class="">
means that *if* it crashes, it's going to crash the whole Erlang node.<br class="">
<br class="">
So: if you think you can write reliable C, go for it. If not, then you<br class="">
need to look at other options. See Dmytro's email. He skipped "C Node"<br class="">
as an option, incidentally. Another option is to host the NIF in<br class="">
another Erlang node, and use Erlang distribution to talk to it.<br class="">
<div class="HOEnZb"><div class="h5">______________________________<wbr class="">_________________<br class="">
erlang-questions mailing list<br class="">
<a href="mailto:erlang-questions@erlang.org" class="">erlang-questions@erlang.org</a><br class="">
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank" class="">http://erlang.org/mailman/<wbr class="">listinfo/erlang-questions</a><br class="">
</div></div></blockquote></div><br class=""></div>
_______________________________________________<br class="">erlang-questions mailing list<br class=""><a href="mailto:erlang-questions@erlang.org" class="">erlang-questions@erlang.org</a><br class="">http://erlang.org/mailman/listinfo/erlang-questions<br class=""></div></blockquote></div><br class=""></body></html>