Node.Js all you want to knowsRjWPAdmin
Now a days, whenever performance oriented web server debate are done then one name emerges out of other web server framework, that is Node.Js. So, in our mind question occurs that, why Node.Js and not JavaEE or .Net framework or any other. I have tried to identify about this question.
My First question is “WHAT IS Node.JS?”
My Next question is “WHAT IS USE OF Node.JS?”
Node.js best uses is, when you require “long-pulling”. Long pulling means a persistent connection between server and browser, like send updates to client from server in real time. Currently Ruby on Rail or Django allow to create such applications, but such applications also use tremendous amount of RAM and CPU, because it has one process each for active client. But, Node does not require to maintain separate thread for such requirements. So, we can say that from evolution of state-less web based request – response model, now we have web application with real-time, two way connection where client and server can communicate and exchange data freely. So, ultimately following are the crucks of above understanding.
1. For RTAs: RTAs means Real – time applications. If Applications require high volume of short messages with low latency, then Node.js is the good choice. This applications are drawing/ editing – type apps, where user can watch live modification of data. Such RTAs application list with Node.js are very long.
2. Less CPU, memory foot print and more data travel: CPU hungry application have very bad effect on execution of Node. In opposite to this the application which use less CPU and data are moving between one places to other, or say data handshaking are more. Applications like live-chat, instant-messaging and e-commerce transactions.
4. Apart from above: So many modules are available which are developed on Node and you can download it with help of “npm”. With help of those modules user can design cross-platform application based on node-webkit, PDFKit lets you generate PDFs using an “HTML5 canvas-like API”, manages communication between mobile and your PC.
5. And finally: Based on Node.Js an operating system is announced which is called NodeOS.
Now let see the pros & cons for using Node.Js
3. Easy to scale with more module and resources
4. Asynchronous I/O and event handling model which helps to handle concurrent request
5. Code sharing and reuse with help of “npm”, user can find tons of free model there which are still growing
6. It’s help to develop RTA applications
7. Can stream big files
8. Has active and dynamic community, with lots of code sharing. It’s also supporting commonly used tools
1. Not suitable for CPU hungry and complex web applications
2. Lack of scalability. Not able to take advantage of multi core hardware, as supports only single threaded application
3. It does not support RDBMS
4. Design issue with callback methodology, as possibility of multiple nested callback
5. Lack of common powerful libraries and developer finds difficulties to accomplish their common programming task
6. As Node is open source platform of development; API is unstable and changes frequently. New API may not support backward compatibility
7. It’s difficult to understand the Asynchronous model and it is complicated compared to blocking I/O programming
The Final Conclusion: