What is node js ?

Node js is server server side program that is based on v8 javascript engine. Node.js is designed to write scalable Internet applications. Node js programs are written in server side javascript.

Node JS contains a built-in http server. This http server can be control using server side javascript. Using this can develop simple client-server based web application.

How to decide when to use Node.JS and why?

  1. Node.js is well suited for applications that have a lot of concurrent connections and each request only needs very few CPU cycles, because the event loop (with all the other clients) is blocked during execution of a function.
  2. If server side application code requires very less cpu cycle. In other world application are doing non blocking operation and does not have heavy algorithm or Job which consumes lots of CPU cycle. then you can use Node Js.
  3. If you are Java Script programmer and comfortable in writing Single Threaded code just like client side JS.
  4. Node JS can be use to serve client site scripts as  css,javascript,images etc. Using this web server load will be reduce hence get high performance application.

nodejs_logo

When NOT to use Node.JS

  1. If server side application includes blocking oprations like File IO or Socket IO.
  2. If server side application is dependent on heavy CPU consuming algorithm/Job.
  3. If server side application request is dependent on third party WebService Call.

Scalability with Node.JS

Currently, Node.JS itself does not utilize all core of system and it is single threaded by default, you have to write program logic by your own to utilize multi core processor and make it multi threaded.

Note: nodejs is great for making real time systems like analytics, chat-apps, apis, ad servers, etc.

No Comments

Leave us a comment

No comment posted yet.

Leave a Comment

* Copy This Password *

* Type Or Paste Password Here *

 

↑ BACK TO THE TOP ↑