If you are a technology explorer like me then I am sure you have heard about Node.Js. This young server side technology is around internet for quite some time now, almost 3 years wow… and I am like following it from its Year One and kind of falling in love with it.

With any new technology come new syntax, new set of rules and so on, some are easy to learn and some are like a strangers whom you never want to meet again.  But creator of NodeJS was thinking exactly the same while designing this technology, why do we need all new stuff and can’t we use some existing stuff and make it more powerful and they thought of bring JavaScript to server. Their are lot of JavaScript based server side engines now like Mozilla Rhino, JSF and JSF based IBM XPages they can also do that too, but this one is actually different… keep reading.

What is Node.js?

Node.Js is a technology designed to develop scalable Internet application notably web servers.  The developer using JavaScript technology to write this application, using event-driven, asynchronous I/O to minimize overhead and maximize scalability. Node.js consists of Google’s V8 JavaScript engine, libUV, and several built-in libraries.

Who is behind this project?

It is designed and developed by Ryan Dahl who made this project open source, now 100 of developer around the web supporting and contributing this project. Currently this project is funded by Joyent a Cloud computing company who is also employer of Ryan Dahl. This project has got tremendous support and specially from Microsoft who is also the sponsor for Node.js. Microsoft is not just sponsor they have helped team to port the node.js platform on Windows OS and not just that Node.js is also one of technology supported by Microsoft’s Windows Azure cloud platform.

(early it was only supported on Linux and Mac which was a pain to install)

How does this work?

Like I said Node,js is a event-driven JavaScript based technology which runs on googles C,C++ based javascript engine V8, which happen to be one of the best java-script engine till date.

Node.js is best known for fast and effective client – server communication, unlike other technology node.js does not uses threads for I/O operations.

If you are using technology (for Example: Java / .Net )  they uses tread for I/O operations when a client makes a server call and a new process is initiated on the server everytime,  these processes has to wait for another process to complete its I/O operations which is internally managed by CPU with the help of treads.  Node.js solves this problem, it can run on single process and makes the I/O calls with the asynchronous callback method of javasciprt,( like an AJAX call made by client application).

I/O would execute the process and sets the callback and proceed with other request, it would make the callback function call whenever process completes the operation which inturn handles by CPU. Client doesn’t have to wait for a servers response, rather in this case server would contact all its clients when it has completed this I/O operations.

This is proven to be most efficient method so far, their is a graph which shows that if your are running a node.js server a single process can handle approximately 10,000 client requests/sec, where as an Apache server with same configuration can handle 3000 requests/sec which eventually goes down( multiple process no doubt, it runs Java…)

( Note: nginx is a c/c++ compiler used by node.js)

Its not just that Google V8 engine has also added a hell lot of power into this technology it also allow you to extend node js if you know C/C++ and create your own modules and library. This makes it as power full as any other web technology available in market.

Who are using Node.js?

Node.js is best combined with HTML5 and can handel server socket communication. This is going to be next big thing in your online communication and chat engines.

Node.js is very well adapted by Web and internet based multi-player games on facebook and other popular platform and even normal web based games like angry birds.

Not just cames in coming days their are going to be lots of mobile OS in making which are going to be running HTML5 based internet application as their local apps starting from Boot to Geko, webOS to new Linux project Tizen. Major chunck of this apps are going to be dependable on node.js … ( why u think Microsoft is supporting it  )

Node is still evolving and making it self stronger day by day. TechGearz is going to have a series of article on how to develop application using Node.js and what are the different tools which is going help us doing this.. so keep reading.