<div dir="ltr">There is "most efficient" and "pragmatic".<div><br></div><div style>My "pragmatic" suggestion would be to run nodejs as a port (e.g. open_port) and use stdio to interact with it. Then you can let Erlang supervise a pool of nodejs VMs. If you want to be fancy, you can implement a ping/pong protocol for detecting when the nodejs system has gone off the deep end chasing down endless chains of callbacks. :)</div>
<div style><br></div><div style>I may or may not have had to do this recently. :)</div><div style><br></div><div style>D.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Apr 8, 2013 at 9:37 AM, aman mangal <span dir="ltr"><<a href="mailto:mangalaman93@gmail.com" target="_blank">mangalaman93@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br clear="all"><div>Hi,<br><br style="font-family:arial black,sans-serif">What is the most efficient way to pass events/data from erlang processes to nodejs and vice versa? Setting up a tcp socket may be slower or inefficient. I was thinking of doing something native. Both erlang and nodejs provide libraries(NIF) to call C functions but none of them provide an efficient implementation for calling erlang/nodejs functions from C or C++ as far as I know. Please suggest some ideas!</div>
<div><br></div><div>Thanks in advance.<span class="HOEnZb"><font color="#888888"><br><font style="color:rgb(102,51,51);font-family:tahoma,sans-serif"><br clear="all"></font><font style="color:rgb(102,51,51);font-family:tahoma,sans-serif">Aman Mangal</font><div>
<font style="color:rgb(102,51,51);font-family:tahoma,sans-serif">3rd year Undergraduate<br>
Department of Computer Science & Engineering<br>
IIT Bombay<br></font><a href="http://www.cse.iitb.ac.in/~amanmangal" target="_blank">www.cse.iitb.ac.in/~amanmangal</a>
</div></font></span></div>
</div>
<br>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div><br></div>