Admin User     May,31 2018

Node.js Core Technical Features

“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.

 

Node.js is the core of MEAN stack, Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine and uses an event-driven, non-blocking I/O model that makes it lightweight and efficient.

 

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.

 

Nodejs        NPM – Package Management:

 

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:

Express.js is a Sinatra-inspired framework.

 

mongo, mongojs:

MongoDB wrappers for providing API for MongoDB object databases.

 

Redis:

Redis as a client library

 

socket.io, sockjs:

Common server-side components.

 

Jade:

A templating engine from Express.js.

 

connect:

An extensible HTTP server framework provides middleware collections of plugins and serves as a base foundation for Express.

 

coffee-script:

a compiler for Coffee Script.

 

forever:

Utility to check the continuous work of a node script.

 

Underscore:

Node.js JavaScript utility library.

 

 

Nodejs        V8 :

 

V8 is a powerful JavaScript run-time that compiles source code of JavaScript to native machine code that process to remove its real time interpretation, V8 is written in C++. V8 mean to connect all technologies together with operating system. Some component creates an abstract layer for file system and network functionalities.

 

 

Nodejs        Unified API:

 

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.

 

 

Nodejs        Threading:

 

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.

 

 

Nodejs        Event loop:

 

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.

 

Nodejs

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…

 

Primarily no other than JavaScript, that mean Node.js delivers super-fast JavaScript execution with feature like V8 and event loop are working great for real time high performance.