views:

171

answers:

2

I realize that they are different beast used to solve different problems, but I would like to ask for an enumerated list of advantages of Erlang over node.js (and vice-versa). When would you use one over the other?

+9  A: 

Erlang is a language and a runtime. I'm assuming you wish a comparison of the erlang runtime with node.js

First I'll list the similarities:

  • Both lend themselves to event driven programming.
  • Both focus on highly asynchronous programming.

And then then the advantages Erlang has:

  • Erlangs message passing abstracts the differences between local and distributed processes making distributed programming easier.
  • Erlangs hot code loading allows for in place releases on running services without disrupting any current activity.
  • Erlang has superior tools for packaging and deployment.
  • Erlangs supervisor and gen_server behviors provide a superior framework for building extremely robust and fault tolerant systems.
Jeremy Wall
Afaik node.js forces you to write event driven code where erlang only gives you the option, thus you can fall back to a different code style, when needed.
ZeissS
Hot loading is a hot topic in the node community, and we may see that as a possibility soon. There are ways to do it, using the existing V8 API, the question is mostly how to do it seamlessly.
Tor Valamo
+3  A: 

Erlang is 20 years old, and has been battle-tested many times. Uses all cores on your systems and makes clustering easy.

node.js is still very young, will only use one core per runtime.

And all what Jeremy Wall says.

cstar