[erlang-questions] node.js compared to erlang
Sun Oct 3 20:40:20 CEST 2010
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
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
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
On Sun, Oct 3, 2010 at 5:00 PM, Pablo Platt <> wrote:
> I'm using erlang and I love it.
> I'm not trying to create an argument but to better understand the power of
> 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
> 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.
More information about the erlang-questions