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.
What is Node.js?
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?
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.