[erlang-questions] [WnCC] Re: integrating nodejs with erlang code

aman mangal <>
Mon Apr 15 05:27:15 CEST 2013


Hi,

Thanks everyone for their time to reply on this post.

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.

Thanks once again :)
I will try some of the ideas given here and will experiment and choose the
one that fits to my requirements.

Aman Mangal
3rd year Undergraduate
Department of Computer Science & Engineering
IIT Bombay
www.cse.iitb.ac.in/~amanmangal


On Thu, Apr 11, 2013 at 8:33 PM, Anil <> wrote:

> 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 ?
>
> As Tapan pointed out - using message brokers like ZeroMQ or RabbitMQ is
> according to me best way out..
>
> On Thursday, April 11, 2013 2:18:15 PM UTC+5:30, tapan pandita wrote:
>
>> Hey Aman,
>>
>> Have you considered using ZeroMQ <http://www.zeromq.org/bindings:erlang>?
>> 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.
>>
>>
>> On Thu, Apr 11, 2013 at 12:19 AM, aman mangal <>wrote:
>>
>>> Hi,
>>>
>>> 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?
>>>
>>> Aman Mangal
>>> 3rd year Undergraduate
>>> Department of Computer Science & Engineering
>>> IIT Bombay
>>> www.cse.iitb.ac.in/~amanmangal
>>>
>>>
>>> On Wed, Apr 10, 2013 at 10:42 PM, Zheng Zhibin <>wrote:
>>>
>>>> beam.js would be one way to build node.js into Erlang :)
>>>>
>>>> Cheers
>>>> Ben
>>>>
>>>> 在 2013-4-10,下午11:46,Robert Virding <**solutions.com>
>>>> 写道:
>>>>
>>>> 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. :-)
>>>>
>>>> Robert
>>>>
>>>> ------------------------------
>>>>
>>>> *From: *"Joe Armstrong" <>
>>>> *To: *"Eduardo Gurgel" <>
>>>> *Cc: *"Ali Attarwala" <>, "Shailesh Tyagi" <
>>>> >, "wncc iitb" <>, "Erlang"
>>>> <>, "chirag jain" <>
>>>>
>>>> *Sent: *Wednesday, 10 April, 2013 11:14:19 AM
>>>> *Subject: *Re: [erlang-questions] integrating nodejs with erlang code
>>>>
>>>>
>>>> Just curious, but what is the *least efficient* way of connecting
>>>> node.js to Erlang.
>>>>
>>>> If I were doing this I'd start with the least efficient method, build
>>>> my app, measure, then optimize if
>>>> necessary.
>>>>
>>>> If the optimization is not necessary you have saved yourself a whole
>>>> lot of work.
>>>>
>>>> Alternatively, write the code and if it is not fast enough wait ten
>>>> years.
>>>>
>>>>
>>>> Cheers
>>>>
>>>> /Joe
>>>>
>>>>
>>>>
>>>>
>>>> On Tue, Apr 9, 2013 at 2:11 PM, Eduardo Gurgel <>wrote:
>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Mon, Apr 8, 2013 at 12:37 PM, aman mangal <>wrote:
>>>>>
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> 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!
>>>>>>
>>>>>>
>>>>> You could take a look on BERT RPC:
>>>>>
>>>>> https://github.com/rtomayko/**node-bertrpc<https://github.com/rtomayko/node-bertrpc>
>>>>>
>>>>> https://github.com/mojombo/**bert.erl<https://github.com/mojombo/bert.erl>
>>>>>
>>>>> Right now, bert-rpc.org is returning 404, but it was up two days ago:
>>>>>
>>>>> http://bert-rpc.org/
>>>>>
>>>>> Maybe checking cached webpage on bert-rpc.org may help you.
>>>>>
>>>>> --
>>>>>
>>>>> Eduardo
>>>>>
>>>>>
>>>>>
>>>>> ______________________________**_________________
>>>>> erlang-questions mailing list
>>>>> 
>>>>> http://erlang.org/mailman/**listinfo/erlang-questions<http://erlang.org/mailman/listinfo/erlang-questions>
>>>>>
>>>>>
>>>>
>>>> ______________________________**_________________
>>>> erlang-questions mailing list
>>>> 
>>>> http://erlang.org/mailman/**listinfo/erlang-questions<http://erlang.org/mailman/listinfo/erlang-questions>
>>>>
>>>>
>>>> ______________________________**_________________
>>>> erlang-questions mailing list
>>>> 
>>>> http://erlang.org/mailman/**listinfo/erlang-questions<http://erlang.org/mailman/listinfo/erlang-questions>
>>>>
>>>>
>>>> ______________________________**_________________
>>>> erlang-questions mailing list
>>>> 
>>>> http://erlang.org/mailman/**listinfo/erlang-questions<http://erlang.org/mailman/listinfo/erlang-questions>
>>>>
>>>>
>>>  --
>>> --
>>> The website for the club is http://stab-iitb.org/wncc
>>> To post to this group, send email to 
>>>
>>>
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Web and Coding Club IIT Bombay" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to wncc_iitb+...@**googlegroups.com.
>>>
>>> For more options, visit https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
>>> .
>>>
>>>
>>>
>>
>>  --
> --
> The website for the club is http://stab-iitb.org/wncc
> To post to this group, send email to 
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Web and Coding Club IIT Bombay" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to 
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130415/4254b353/attachment.html>


More information about the erlang-questions mailing list