Node.js applications are designed to maximize throughput and efficiency, using non-blocking I/O and asynchronous events. Node.js applications run single-threaded, although Node.js uses multiple threads for file and network events. Node.js is commonly used for real time applications due to its asynchronous nature.
Adoption as a server-side platform
Node.js is gaining adoption as a server-side platform and is used by Groupon, SAP, LinkedIn, Microsoft, Yahoo!, Walmart, Rakuten and PayPal.
Comparison of Node.js App Vs Java app
Node.Js version of the app perform better than Java version of the app.Here are the observation did by Paypal comparing the Node.js app Vs Java app :-
- Built almost twice as fast with fewer people
- Written in 33% fewer lines of code
- Constructed with 40% fewer files
- Double the requests per second vs. the Java application
- 35% decrease in the average response time
Java Script on the Server
Java Script is the world most popular language.Some of the notable firsts were Google Maps and Gmail but today there are a host of web applications from Twitter to Facebook to Github.Because Node use java script on the server side there are other benefits :-
- Developers can write web applications in one language, which helps by :-
- Reducing the “context” switch between client and server development
- allowing for code sharing between client and server (e.g. reusing the same
code for form validation or game logic)
Type of Application Node.Js is designed
Node.js is designed for DIRTy(Data Intensive Real Time Applications) applications.
It allows a server to hold open a number of connections while handling many requests and keeping a small memory footprint. It is designed to be responsive like the browser.
Many web applications now provide information virtually instantly, implementing things like: online
whiteboard collaboration, realtime pinpointing of approaching public transit buses, and multiplayer games.
Node is good at this and not just for web, but also other I/O heavy applications.