[erlang-questions] node.js compared to erlang

Kaiduan Xie kaiduanx@REDACTED
Sun Oct 3 21:07:25 CEST 2010


Joe,

- cross platform error detection and recovery
(i.e. to make something fault tolerant needs at least 2 machines,
think the case when one machine crashes - the second machine must be
able to take over)

Can you give us a real-life example on this point? I have not seen an
illustration for this in your book, and in Francesco/Simon's book. The
upcoming Erlang/OTP-In-Action also does not touch this area. OTP
supervisor structure seems focusing on re-start process on local
machine.

Of course Mnesia is a good example. I would like to see a code example
from other projects too.

Best regards,

/Kaiduan
On Sun, Oct 3, 2010 at 2:40 PM, Joe Armstrong <erlang@REDACTED> wrote:
> You have to ask why was erlang designed? why was node.js designed?
>
> I don't know why node.js ws desiged - I guess so you could write servers
> in js.
>
> Erlang was designed for building soft real-time fault-tolerant systems
> that could be
> upgraded without taking them out of service. These design criteria led
> to erlang features like:
>
> - fast per/process garbage collection
> - ability to change code on-the-fly (ie the module reload stuff, with the
>  ability to run old and new module code at the same time)
> - several orthogonal error detection mechanisms (catch-throw/links/ ...)
> - cross platform error detection and recovery
>  (ie to make something fault tolerant needs at least 2 machines,
>   think the case when one machine crashes - the second machine must be
>  able to take over)
>
> In the erlang system there is quite a lot going on behind the scenes to make
> sure this all happens without the user being aware of it - to first
> approximation
> you can spread processes and database tables over multiple nodes and
> it will behave in a reasonable manner ...
>
> I don't think things like have any correspondence in node.js - I guess if
> an entire node.js node crashes the user would not expect another node
> to take over
> in a seamless manner.
>
> The fun stuff in Erlang has to do with how the failure model interacts with
> code changing, moving code around, upgrading code without stopping the system
> and so on - these characteristics are extremely important if you want to
> build a 24x7 system with zero down time - less so if you just want to serve up
> pages as fast as possible and don't care if you take the system out of service
> for upgrades or errors.
>
> Erlang was designed for building fault-tolerant systems - node.js was not
>
> Cheers
>
> /Joe
>
>
>
>
> On Sun, Oct 3, 2010 at 5:00 PM, Pablo Platt <pablo.platt@REDACTED> wrote:
>> Hi
>>
>> I'm using erlang and I love it.
>> I'm not trying to create an argument but to better understand the power of
>> erlang.
>>
>> In what areas erlang dominates and what areas will you consider using node.js?
>> For example, would you consider building something like rabbitmq or ejabberd in
>> node.js?
>> Or maybe you'll use node.js just for a simple single chat room but erlang for
>> anything complicated than that.
>>
>> Are there a fundamental differences in performance or stability or use in
>> distributed systems?
>>
>> Ulf Wiger commented on the comparison of erlang and node.js
>> and said that erlang solves the problem of non blocking functions which might be
>> very hard for other languages.
>> http://journal.dedasys.com/2010/04/29/erlang-vs-node-js
>>
>> Thanks
>>
>>
>>
>
> ________________________________________________________________
> erlang-questions (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:erlang-questions-unsubscribe@REDACTED
>
>


More information about the erlang-questions mailing list