Admin User May,31 2018
“MEAN” become one of the popular advanced modern technology stack and continue increasing development demand for high scalable modern solution for SMBs and Large-scale enterprises globally.
It is interesting to know about key technical features those really make Node.js as the most preferred, powerful and advanced platform to build rich & scalable progressive apps.
Let us quickly go over further about Node.js core technical features like NPM, Unified API, V8, Threading, Event Loops etc.
NPM is one of the key Node.js feature of its core ecosystem, that makes pieces of codes available to all.
Node.js server is bundled with a pre-installed NPM – Node.js Package Manager. NPM is used to install Node.js programs from its registry, can also be used to improve development performance while organizing third party Node.js programs.
Make a note that NPM and CommonJS “require()” statement are not the same as NPM designed to install the code and dependencies management from command line, so it is not used to load the code. NPM registry include all possible packages ranging from simple helper library to task runners’ type library.
Express.js is a Sinatra-inspired framework.
MongoDB wrappers for providing API for MongoDB object databases.
Redis as a client library
Common server-side components.
A templating engine from Express.js.
An extensible HTTP server framework provides middleware collections of plugins and serves as a base foundation for Express.
a compiler for Coffee Script.
Utility to check the continuous work of a node script.
Unified API to combine with JSON, Browser and Document DB primarily to develop a unified JS development stack that provides sharp attention to client-side frameworks and server-side development patterns as MVC, MVP, MVVM that ultimately allows to use the same service interface for both client-side and server-side. It works like a charm for unified API development.
Talking about Node.js treading firstly that treading relies on non-blocking I/O calls and operates on a single thread. This is the reason that Node.js support no end of concurrent connections and eliminate the thread context-switching cost. Node.js may be the most compatible to develop high concurrent apps by sharing a single thread between all possible requests and function that performs I/O should use a callback.
What is not good? May be scaling with CPU core numbers in Node.js is impossible and where it must need to use an additional pm2 module.
So, by the way using child process.fork() API to spawn child processes with easy communication means in an absence of threads doesn’t cancel the advantage of multiple cores in environment. Cluster Module on the same interface may allow to enable load balance over multiple cores so somewhat sockets are shared between processes.
Normally, Node.js is notified when a connection is made, while OS issues a callback. So, when Node.js starts an event loop then system uses these events to scale all simultaneous connections where event loop does not require to be called explicitly.
Alternatively, in a case where callbacks are well defined then server enters the event loop by the end of definition process. It is like event loop is not going be used if there is no work to be performed.
There are many micro technical stuffs make all good reasons to use Node.js for modern age development. Just to name a few Node.js is being used by global enterprise like Paypal, NetFlix, Linkedin, Yahoo!, flickr, Aliexpress and many more…