NODE.JS

Introduction Node.js is open-source, cross-platform, runtime execution environment used to execute JavaScript code outside the browser. It was developed by Ryan Dahl in 2009. Until 2009, we were not able to run JavaScript code outside the browser. He came out with an idea about executing JavaScript code outside the browser. He used the most powerful JavaScript engine known as Google Chrome V8. With the help of C++ and V8 engine he developed "Node.js" which is able to create servers and run JavaScript outside the browser. It was and is a evolutionary step by Ryan Dahl. Node.js uses non-blocking technique (Asynchronous behaviour). Node uses single thread to serve multiple requests that's why it is faster.

Why Node.js ?

  1. Easy to get started.
  2. Node.js is super fast and highly scalable.
  3. Can be used for prototyping and Agile development.
  4. Cleaner and more consistent codebase.
  5. Larger ecosystem of operating system libraries (libs).

Large companies that uses Node.js

  1. Paypal :- Paypal replaced the java(Spring) with Node.js, as node.js offered increased speed, doubled request handling capacity.
  2. Walmart.
  3. Uber.

When to use Node.js Node.js uses single thread that's why it is best for I/O intensive application which works with real time data.

When to avoid Node.js Node.js is not suitable for CPU intensive application means applications which needs more CPU level processing (ex. video decoding ,image manipulation).