What is Node.js?

Node.js has been causing a lot of buzz around the web.
What is node.js? Why is everyone talking about it?

Briefly, Node is:

  • A sever-side solution for JavaScript
  • Highly parallel but single threaded
  • Runs JavaScript, but it is NOT JavaScript

Server-side solution for JavaScript

Node is a server-side solution that can be programmed in Javascript. Meaning that the same code you run on your browser you can now run on your server!

Highly parallel but single threaded

We can’t talk about node without talking about the event loop. The event loop empowers node to be highly parallel and single threaded at the same time.

Node Event Loop

The event loop will keep spinning as long as theres something to execute. Node is essentially listening for events. When these events occur, node runs the callback function attached to that event. The trick is that only one callback function will execute at any given time. Everything else is handled in parallel. Your code however, will never be executed at the same time as anything else.

Runs JavaScript, but it is NOT JavaScript

Node allows you to program server-side scripts using JavaScript (as opposed to PHP, Perl, ASP … ), but it is not JavaScript. Node in fact, is actually programmed in C. Because of the nature of C, Node can perform amazingly well when dealing with networking and OS system calls. Node has fantastic support for writing HTTP servers and scalable web services.

Why is everyone talking about it?

JavaScript has become the world’s standard VM in web browsers! Because web applications are heavily dependent on speed and asynchronous calls node is right in between the two and it is ready to take off!


Posted on: March 14th, 2014 by Stephani

Leave a Reply