Node.JS vs Erlang

511 views
Skip to first unread message

Vitaliy Feoktistov

unread,
Nov 12, 2014, 7:52:11 PM11/12/14
to nod...@googlegroups.com
Hello,
I'd like to have an objective comparison of Node.JS vs Erlang.
* my main criteria of choise :
- concurrency
- error tolerance
- performance
- scalability (scale-in, scale-out)
- adapted for multi-CPU servers (openmp pool, cgroups mapping,..)
- adapted for mobile applications
- ease of programming
- integration with other languages (C/C++...)
- existance of libraries and developed code/projects
- database integration (sql, nosql, in-memory)
- hire skills / price
Thank you for your help

Matt

unread,
Nov 12, 2014, 10:30:05 PM11/12/14
to nod...@googlegroups.com

On Wed, Nov 12, 2014 at 7:52 PM, Vitaliy Feoktistov <vitaliy.f...@gmail.com> wrote:
- concurrency

Erlang is better, period.
 
- error tolerance

Erlang is better.
 
- performance

Node is significantly better based on the computer language shootout.
 
- scalability (scale-in, scale-out)

Erlang is better at scale-in. Neither are much different at scale-out.
 
- adapted for multi-CPU servers (openmp pool, cgroups mapping,..)

Erlang is better. Node relies on forking a process per CPU.
 
- adapted for mobile applications

I have no idea what this means. Neither are great at native apps on mobile (iOS and Android). Both are fine if you're just serving JSON.
 
- ease of programming

Node is way easier. The syntax is simpler and more familiar to the majority of programmers.
 
- integration with other languages (C/C++...)

Node is easier because it has FFI interfaces available. It's still a proposal to build something like that in Erlang.
 
- existance of libraries and developed code/projects

Node wins. Despite being decades younger.
 
- database integration (sql, nosql, in-memory)

Not sure about Erlang, but Node has everything pretty much covered.
 
- hire skills / price

It's far far FAR easier to find Javascript programmers. Erlang programmers will tell you that when you find an Erlang programmer they are generally a "10x" programmer. YMMV.

Matt.

// ravi

unread,
Nov 12, 2014, 11:03:11 PM11/12/14
to nod...@googlegroups.com


To summarise: http://www.jwz.org/doc/worse-is-better.html :-)

—ravi, don’t know a thing about Erlang, actually


--
Job board: http://jobs.nodejs.org/
New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+un...@googlegroups.com.
To post to this group, send email to nod...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/CAPJ5V2aH2--ZyHScNxv9MTuqVrdGu9FJzXscwR94izb0OcT9wA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Tristan Slominski

unread,
Nov 12, 2014, 11:23:52 PM11/12/14
to nod...@googlegroups.com
If you want to make Node feel like Erlang try this: https://github.com/organix/tartjs

Behrad Zari

unread,
Nov 13, 2014, 12:06:43 AM11/13/14
to nod...@googlegroups.com
Just a few points came to my mind to add to Matt's answer,

Erlang gives you built-in node distribution across clusters.
Erlang's concurrency model is Actor Model, Node.js's is Event Loop, So Erlang can also give you simple robustness model via Supervisors, and fail-fast pattern
Rate of memory leaks in Node.js apps are more than Erlang ones, but Node.js ecosystem is largers and more to the edge of technology
Erlang has some very nice language level features, like better List comprehensions, atoms, pattern matching, ... missing in Javascript
Node.js is more rapid in development than Erlang

Tiago Katcipis

unread,
Nov 13, 2014, 6:47:50 AM11/13/14
to nod...@googlegroups.com
If you fancy the advantages of the Erlang VM but find Erlang a little odd you could check out elixir:

Alex Gounares

unread,
Nov 13, 2014, 12:27:14 PM11/13/14
to nod...@googlegroups.com
Hi Vitaliy--at Concurix, we got our start building an Erlang based operating system, and now we are building Node.js profiling and monitoring tools.  So we can speak in depth about the two platforms--feel free to ping me offline if we can help.

In the meantime, +1 for other points made on this thread.  A few things I would add:

1. While Erlang has a very elegant concurrency model, the actual implementation has a ton of singletons, particularly with gen_servers.  As a result, the *actual* multi-core scale-up factor is a LOT less than you would otherwise expect.  We have found the process-per-CPU model of Node clusters to be a more efficient multi-core scaleup paradigm.

2. NPM is a true gem, and there is no equivalent in Erlang (yet--they are working on it).  While not perfect, Node/NPM's ability to handle lots of third party modules with different version all in the same app via the closure encapsulation is a big big deal.  In Erlang, you typically need to be very careful about which third party modules are included, and which versions, as the module namespace is global. 

3. +1000 on the depth of the community in Node.  You will find amazing, and amazingly talented folks in the Erlang community, but the sheer scale of Node brings a lot of depth to the set of available libraries, help on stack overflow, etc.

4. List comprehensions and function pattern matching in Erlang can yield some very elegant and tight code. 

Good luck!
cheers,
alex

Reply all
Reply to author
Forward
0 new messages