Introduction to Node.js
What is Node.js?
Who Developed Node JS?
Node.js was developed by Ryan Dahl in 2009 and it supported only Linux platforms. In 2011 Microsoft and Joyent implemented native windows version on Node.js and was released to the public.
Node.js OS support
- Microsoft Windows
- Mac OS X
Features of Node.js
The most important features of Node.js are as follows.
#1. Event Driven and Asynchronous
All the API’s available in the Node.js are asynchronous also called as non-blocking. Once the API is called the server never waits for the data to return instead it moves to execute the next API. A notification mechanism of events helps the server to get a response for the previous API calls.
Using Node.js you could perform the async operation and execute multiple parallel actions
#2. Super Fast.
Node.js can handle thousands of concurrent requests with minimal overhead on the single process.
#3. Single Threaded and Highly Scalable
Node.js uses the single-threaded mechanism with event looping and it is a Thread Lock Free. Event mechanism helps the server to respond to other API in a nonblocking way and makes the server highly scalable. This is one of the biggest feature and advantages of using Node.js
#4. No Buffering
Node.js applications never buffer any data. These applications simply output the data in chunks.
#5. Easy to Learn
Where to use Node.js?
Node.js is used extensively in the following areas to build applications
- Real-time Applications –Applications like Browser-based Online Chat, Real-time games, Collaboration tools etc can be built using Node.js
- Single Page Applications (SPA) – If you are developing one-page application then you could choose Node.js.
- JSON Based Applications – Since Node.js is faster and light weight you could develop JSON based applications and host it.
- Streaming and Analytics Applications – Apps like video streaming , audio streaming, analytics app can be built on Node.js
Where not to use Node.js?
If you are developing an application which uses heavy CPU consuming then it is not advisable to use Node.js