3 April 2014

When To Use Nodejs

The ideal sort of projects have need for long polling, real-time streaming and potentially also are using functional approaches yet want to stick to JavaScript for both front and backend work. They also want to move away from a standard web project implementation to a full application view. There may also be multiple data sources to stream from. Perhaps, one wants to keep things simple but agile. And, also have time constraints. Maybe, there is even a need to evolve the project but initially have a need to prototype with a responsive feel. Maybe, there is a desire for the whole approach to be flexible from create, run, test, share, and deploy. There might also be a necessity for easy builds with plugins as well as cloud friendly environment. There could even be a need to build with flexibility to relational models as well as NoSQL. The primary reason for using nodejs for a project would be if there is a huge requirement for a callback concurrency model that does not excessively hog on CPU cycles per request, marginalizing on complexity with using a single language across the stack, have little overhead on serialization/deserialization of JSON, reuse across the full stack, as well as keeping the code base as lightweight as possible with no limitations on configuration and plugins. 

Typical Use Cases:
Chat Application
Online Games
Collaboration Tools
Real-Time Analytics Dashboards
Command-Line Utilities
Web APIs
Desktop Apps
Simple Web Servers
Single Page Apps
Educational Apps (especially with Gamification)
Service Monitoring Dashboards
Search Aggregation
Most anything on Ruby/Rails can be switched to Nodejs
....and possibly more and growing use cases