This chapter Node.js overview demonstrates about the history of node js and the real usage of node js with some key features. Following are the concepts covered.
Node.js
Node.js History
Usage of Node.js
Node.js
Description
Node.js is a framework to develop highly-scalable applications which can deal with a huge number of simultaneous client connections proficiently. Node.js is based on the V8 JavaScript Engine.
The scalable network programs can be built easily using Node.js. So, Node.js is used for developing high traffic web applications.
Node.js History
Description
Node.js is a server-side "JavaScript" platform. Node.js was first introduced to the community by its creator, Ryan Dahl, at the "2009 JSConf.eu Conference". Node.js presentation was received with a standing ovation. Since that time, node has continued to evolve, with contributions from the community as well as the project's primary sponsor, cloud computing Company Joyent. Node is among the most popular projects on "GitHub", often beating out other heavyweights such as "jQuery" and "Ruby on Rails". At a high level, node is comprised of three building blocks. The first is "Lib UV", a high performance, cross-platform evented IO library. It's a fairly new addition to node, and replaces or abstracts several UNIX-only libraries once directly required by the project. Lib UV was built as a part of porting "Node.js" to the "Windows" environment.
Next is "V8". This is Google's "JavaScript" engine, the same engine found in their Chrome web browser. The Node team makes every effort to leverage V8 out of the box within Node. This makes it easier for the team to include updated versions of V8 in each release of Node, and thereby benefit from Google's continuous innovation of their JavaScript engine. The last component of Node is the custom "C++" and "JavaScript" code developed specifically for the Node platform itself. These three things together make up the Node.js platform.
Conceptual
figure
The figure below demonstrates the Architecture of Node.js which uses "Single Threaded Event Loop Model".
Usage of Node.js
Description
Node.js is used in many Projects, Applications and Organizations in order to develop highly-scalable applications. Following are some of the types of applications which can be developed using Node.js.
The real time analysis applications like email, data.
Applications like Messaging, Chat.
HTTP Proxy
Web services like data applications
Client of another web services like twitter client
The real time collaboration
The web dependent software’s which serve a particular requirement of a client like booking reservation applications for films, restaurants.
Advantages
Following are some of the advantages of Node.js.
Event driven and Non-Blocking, so handles simultaneous connections productively than its counterparts.
It is better to have common language on both client and server.
If used with database like MangoDB then it is 100% javascript, from DataBase to server to client.
Node.js has clean functional API.
Disadvantages
Following are some of the Disadvantages of Node.js.
Node.js require many drivers for connecting database and modules in order to add few specific functionality.
Node.js is unstable on windows platform and this issue may be marginalized in future because node has a very responsive and active community.
Summary
Key Points
Node.js Overview - Node.js is based on V8 JavaScript engine.