The last article provided a brief introduction to node.js. In this article we shall study some of the most amazing node.js features. When you download node.js (which I will show in the next article) it comes with a node.js runtime enviroment and some prebuild JavaScript. The runtime environment is used to compile and execute node.js programs while the JavaScript library contains commonly used functionalities. In the following sections, we shall study some of the fundamental node.js features followed by it uses.
Following are some of the major features of node.js
Node.js is written in C/C++ since it uses Chrome’s V8 engine which is also written in C/C++. This makes Node.js extremely fast.
Node.js applications are asynchronous and non-blocking. It means that whenever node.js application sends an API call, it doesnt wait for the API to return data. Rather, specifies a call back function for the previous call and moves to the next API call. When the data from the previous API call is returned, the call back function for the previous call executes. This way, node.js applications execute in a non-blocking manner.
Though node.js applications are single threaded, still owing to their non-blocking and asynchronous nature, they can be easily scaled to perform multiple task simultaneously.
Node.js applications retrieve and process data in real time without storing any data in memory buffers. This is what makes node.js ideal for developing streaming applications
Node.js has become extremely popular in recent era. Currently many big companies like Microsoft, Yahoo, Uber, GoDaddy, Ebay etc are using node.js in their applications. Node.js applications are ideal for the following type of applications.
However, if you are developing an application that involves lots of complex processing, it is not advisable to use node.js applications.
This article explained some of the major node.js features. In the next article, we shall see how to setup local environment in order to run node.js applications.