Awesome javascript library for building real time, fast, scalable applications
Use Cases and Deployment Scope
Pros
- Node.js provides a feature called callback and promise. This feature lets the code get executed faster and hence increases the performance of the application.
- Node.js makes the application scalable. The application becomes scalable due to load balancing. We can have multiple jobs for a node to process and it can handle it giving high throughput with no significant burden.
- We needed a feature called multi-tenancy in our product's enterprise which was very effectively provided by Node.js.
- Also, Node.js provides real-time data-intensive applications which were a must for our e-learning product.
Cons
- The biggest drawback of Node.js even now is its inability to process CPU-bound tasks. For computation-intensive applications, PHP is preferred over Node.js. Whenever a heavy request comes to the event loop, Node.js would set all the CPU available to process it first, and then answer other requests queued. That results in slow processing and overall delay in the event loop, which is why Node.js is not recommended for heavy computation. Node.js should work upon this feature too.
- Due to its asynchronous nature, Node.js relies heavily on callbacks, the functions that run after each task in the queue is finished. Keeping a number of queued tasks in the background, each with its callback, might result in the so-called callback hell, which directly impacts the quality of code. This should also be improved.
- There are some modules in the npm registry which are not of good quality so these should be worked upon.
Likelihood to Recommend
2. It is not suitable for building computationally extensive applications, it may lead to bad performance.
