Node.js is a divisive topic in the programming world: it would seem that for each enthusiastic supporter praising its advantages, there is a vocal counterpart highlighting its shortcomings, or at least his personal disapproval of all the hype that’s been recently surrounding this technology.
So, it’s worth taking a closer look at the potential benefits that can be derived from Node.js. It’s not so much a question of ‘is it as good as they say or not?’, but a question of ‘which use cases benefit the most from it and when is it not such a good idea?’
2. Real-time applications – Node.js is a great choice for real-time data-intensive web apps as well as soft real-time systems, like social networks, instant messaging networks or chat software. You can use it to build web-connected apps that gather data from different sources, consolidate it and push it to a great number of clients in real-time, as it provides an easily deployable migration layer that either proxies data to existing systems or collects and reformats data for different uses – this is why Node.js works great as a bridging technology for existing systems.
Node.js as bridging technology – image source: https://apmblog.dynatrace.com/2015/04/09/node-js-is-hitting-the-big-time-in-enterprise-markets/
3. Single page applications – because Node.js enables the processing of many requests / second with low response time and because of the fast synchronization between client and server, it works really well for web apps that do a lot of processing on the client, like AJAX heavy single page applications.
4. Command line utilities – js’ ability to spawn thousands of child processes and treat their outputs as a stream makes it a great choice for writing command line scripts and running shell commands to UNIX tools.
These are just a few examples of how Node’s capabilities can be best put to work.