<div dir="ltr">Hi,<br><div class="gmail_extra"><div><br style="font-family:'arial black',sans-serif">Thanks everyone for their time to reply on this post.</div><div><br></div><div style>Anil, TCP/IP sockets are slow(not really actually) compared to erlang message passing in an erlang cluster. The more important thing is if I use erlang message passing and other distributive features of the language, it will avoid writing the code myself, will be more fault tolerant and more reliable to use. As I cannot do everything in erlang, I am using node.js on the front end side (erlang is on back end side). My application is running in a cluster where any server may have to talk to other for information, I thought that doing the nodejs to erlang communication locally and use message passing among the nodes in the cluster will be better.</div>

<div style><br></div><div style>Thanks once again :)</div><div style>I will try some of the ideas given here and will experiment and choose the one that fits to my requirements.</div><div><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></div>
<br><br><div class="gmail_quote">On Thu, Apr 11, 2013 at 8:33 PM, Anil <span dir="ltr"><<a href="mailto:anilashanbhag@gmail.com" target="_blank">anilashanbhag@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

Can you highlight more on why you think its 'slow and inefficient' ? Also probably give more details on what exactly erlang process and nodejs process is doing ?<div><br><div>As Tapan pointed out - using message brokers like ZeroMQ or RabbitMQ is according to me best way out.. </div>

<div><br><div><div><div class="im">On Thursday, April 11, 2013 2:18:15 PM UTC+5:30, tapan pandita wrote:</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<div class="im"><div dir="ltr">Hey Aman,<div><br></div><div>Have you considered using <a href="http://www.zeromq.org/bindings:erlang" target="_blank">ZeroMQ</a>? You can use it over tcp/ip or IPC(if processes are local) and it's pretty efficient. It has bindings for many languages including erlang, node.js, C++, C, etc.</div>



</div></div><div><br><br><div class="gmail_quote"><div class="im">On Thu, Apr 11, 2013 at 12:19 AM, aman mangal <span dir="ltr"><<a>mangal...@gmail.com</a>></span> wrote:<br>

</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Hi,<br><div><div class="im"><div><br style="font-family:'arial black',sans-serif">

How can I go about implementing JS in erlang? This seems interesting to me. Please tell me what do you mean by implementing JS or node.js in erlang?</div>

<div>


<div><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></div>
<br><br></div></div><div class="gmail_quote"><div class="im">On Wed, Apr 10, 2013 at 10:42 PM, Zheng Zhibin <span dir="ltr"><<a>wite...@gmail.com</a>></span> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">






<div dir="auto"><div class="im"><div>beam.js would be one way to build node.js into Erlang :)<br><br></div><div>Cheers</div><div>Ben</div><div><br></div></div><div>在 2013-4-10,下午11:46,Robert Virding <<a>robert....@erlang-<u></u>solutions.com</a>> 写道:<br>






<br></div><div><div><blockquote type="cite"><div><div style="font-size:12pt;font-family:'times new roman','new york',times,serif"><div class="im">The most efficient way of connecting Erlang with node.js would be, of course, to implement JS and hence node.js in Erlang. Maybe not the easiest way, but definitely the most efficient connection. :-)<br>






<br>Robert<br><br><hr></div><blockquote style="padding-left:5px;font-size:12pt;font-style:normal;margin-left:5px;font-family:Helvetica,Arial,sans-serif;text-decoration:none;font-weight:normal;border-left-width:2px;border-left-style:solid;border-left-color:rgb(16,16,255)">

<b>From: </b>"Joe Armstrong" <<a>erl...@gmail.com</a>><br>




<b>To: </b>"Eduardo Gurgel" <<a>edgu...@gmail.com</a>><br><b>Cc: </b>"Ali Attarwala" <<a>ali....@novanet.net</a>>, "Shailesh Tyagi" <<a>shai...@novanet.net</a>>, "wncc iitb" <<a>wncc...@googlegroups.com</a>>, "Erlang" <<a>erlang-q...@erlang.org</a>>, "chirag jain" <<a>chira...@novanet.net</a>><div class="im">

<br>




<b>Sent: </b>Wednesday, 10 April, 2013 11:14:19 AM<br><b>Subject: </b>Re: [erlang-questions] integrating nodejs with erlang code<br><br><div dir="ltr"><br><div>Just curious, but what is the *least efficient* way of connecting node.js to Erlang.</div>






<div><br></div><div>If I were doing this I'd start with the least efficient method, build my app, measure, then optimize if</div>
<div>necessary.</div><div><br></div><div>If the optimization is not necessary you have saved yourself a whole lot of work.</div><div><br></div><div>Alternatively, write the code and if it is not fast enough wait ten years.</div>







<div><br></div><div><br></div><div>Cheers</div><div><br></div><div>/Joe</div><div><br></div><div>  </div></div></div><div><br><br><div class="gmail_quote">On Tue, Apr 9, 2013 at 2:11 PM, Eduardo Gurgel <span dir="ltr"><<a>edgu...@gmail.com</a>></span> wrote:<br>







<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="im"><div dir="ltr"><br><div><br><br><div class="gmail_quote">

<div><div>On Mon, Apr 8, 2013 at 12:37 PM, aman mangal <span dir="ltr"><<a>mangal...@gmail.com</a>></span> wrote:<br>






<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style: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></blockquote><div><br></div></div></div><div>You could take a look on BERT RPC: </div><div><br></div><div><a href="https://github.com/rtomayko/node-bertrpc" target="_blank">https://github.com/rtomayko/<u></u>node-bertrpc</a><br>








</div><div><br></div><div><a href="https://github.com/mojombo/bert.erl" target="_blank">https://github.com/mojombo/<u></u>bert.erl</a><br></div><div><br></div><div>Right now, <a href="http://bert-rpc.org" target="_blank">bert-rpc.org</a> is returning 404, but it was up two days ago:</div>








<div><br></div><div><a href="http://bert-rpc.org/" target="_blank">http://bert-rpc.org/</a><br></div><div><br></div><div>Maybe checking cached webpage on <a href="http://bert-rpc.org" target="_blank">bert-rpc.org</a> may help you.</div>








<div><br></div><div>--</div><div><br></div><div>Eduardo</div><div><br></div><div> </div></div></div></div>
<br>______________________________<u></u>_________________<br>
erlang-questions mailing list<br>
</div><a>erlang-q...@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/<u></u>listinfo/erlang-questions</a><br>
<br></blockquote></div><br></div>
<br>______________________________<u></u>_________________<br>erlang-questions mailing list<br><a>erlang-q...@erlang.org</a><br><a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/<u></u>listinfo/erlang-questions</a><br>






</blockquote><br></div></div></blockquote><blockquote type="cite"><div><span>______________________________<u></u>_________________</span><br><span>erlang-questions mailing list</span><br><span><a>erlang-q...@erlang.org</a></span><br>






<span><a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/<u></u>listinfo/erlang-questions</a></span><br></div></blockquote></div></div></div><br>______________________________<u></u>_________________<br>







erlang-questions mailing list<br>
<a>erlang-q...@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/<u></u>listinfo/erlang-questions</a><br>
<br></blockquote></div><br></div></div><div><div><div class="im">

<p></p>

-- <br>
-- <br>
The website for the club is <a href="http://stab-iitb.org/wncc" target="_blank">http://stab-iitb.org/wncc</a><br></div>
To post to this group, send email to <a>wncc...@googlegroups.com</a><div class="im"><br>
 <br>
--- <br>
You received this message because you are subscribed to the Google Groups "Web and Coding Club IIT Bombay" group.<br></div>
To unsubscribe from this group and stop receiving emails from it, send an email to <a>wncc_iitb+...@<u></u>googlegroups.com</a>.<div class="im"><br>
For more options, visit <a href="https://groups.google.com/groups/opt_out" target="_blank">https://groups.google.com/<u></u>groups/opt_out</a>.<br>
 <br>
 <br>
</div></div></div></blockquote></div><br></div>
</blockquote></div></div></div></div><div class=""><div class="h5">

<p></p>

-- <br>
-- <br>
The website for the club is <a href="http://stab-iitb.org/wncc" target="_blank">http://stab-iitb.org/wncc</a><br>
To post to this group, send email to <a href="mailto:wncc_iitb@googlegroups.com" target="_blank">wncc_iitb@googlegroups.com</a><br>
 <br>
--- <br>
You received this message because you are subscribed to the Google Groups "Web and Coding Club IIT Bombay" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:wncc_iitb%2Bunsubscribe@googlegroups.com" target="_blank">wncc_iitb+unsubscribe@googlegroups.com</a>.<br>
For more options, visit <a href="https://groups.google.com/groups/opt_out" target="_blank">https://groups.google.com/groups/opt_out</a>.<br>
 <br>
 <br>
</div></div></blockquote></div><br></div></div>