Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Node.js or Erlang

I really like these tools when it comes to the concurrency level it can handle.

Erlang/OTP looks like much more stable solution but requires much more learning and a lot of diving into functional language paradigm. And it looks like Erlang/OTP makes it much better when it comes to multi-core CPUs (correct me if I am wrong).

But which should I choose? Which one is better in the short and long term perspective?

My goal is to learn a tool which makes scaling my Web projects under high load easier than traditional languages.

like image 875
user80805 Avatar asked Jun 10 '10 02:06

user80805


People also ask

What is better than Nodejs?

Out of the gate, Go beats Node. js in terms of scalability because it supports concurrency, which helps handle side-by-side tasks. Go can manage 1000 concurrent requests per second, making Go superior.

Is node js worth learning 2020?

Yes, Learning Node. js is absolutely 100% Worth in 2020. Firstly, Node. JS is one of the most prominent JavaScript structures which emphatically relieves the work of any person building internet applications.

Is Uber using node JS?

Uber chose Node. js to build its massive matching system due to its ability to keep up with the pace of Uber's huge business needs and enhanced data processing capabilities. “Node. js is particularly well-suited to writing systems that have all their state in memory,” said Kris Kowal, Software Engineer at Uber.


2 Answers

I would give Erlang a try. Even though it will be a steeper learning curve, you will get more out of it since you will be learning a functional programming language. Also, since Erlang is specifically designed to create reliable, highly concurrent systems, you will learn plenty about creating highly scalable services at the same time.

like image 62
Justin Ethier Avatar answered Sep 27 '22 23:09

Justin Ethier


I can't speak for Erlang, but a few things that haven't been mentioned about node:

  • Node uses Google's V8 engine to actually compile javascript into machine code. So node is actually pretty fast. So that's on top of the speed benefits offered by event-driven programming and non-blocking io.
  • Node has a pretty active community. Hop onto their IRC group on freenode and you'll see what I mean
  • I've noticed the above comments push Erlang on the basis that it will be useful to learn a functional programming language. While I agree it's important to expand your skillset and get one of those under your belt, you shouldn't base a project on the fact that you want to learn a new programming style
  • On the other hand, Javascript is already in a paradigm you feel comfortable writing in! Plus it's javascript, so when you write client side code it will look and feel consistent.
  • node's community has already pumped out tons of modules! There are modules for redis, mongodb, couch, and what have you. Another good module to look into is Express (think Sinatra for node)

Check out the video on yahoo's blog by Ryan Dahl, the guy who actually wrote node. I think that will help give you a better idea where node is at, and where it's going.

Keep in mind that node still is in late development stages, and so has been undergoing quite a few changes—changes that have broke earlier code. However, supposedly it's at a point where you can expect the API not to change too much more. So if you're looking for something fun, I'd say node is a great choice.

like image 25
Jarsen Avatar answered Sep 27 '22 22:09

Jarsen