This is an introduction to NodeJS which is an open-source, cross-platform run-time environment for developing server-side Web Applications. It also discusses the implications of NodeJS in Internet of Things (IoT).
2. Whatisnode.js ??????????
Node.js is an open-source, cross-platform runtime environment for developing
server-side Web applications.
The runtime environment interprets JavaScript using Google's V8 JavaScript
engine.
Node.js was originally written in 2009 by Ryan Dahl.
2
6. NODE.JSSEEMSBETTER……?
Node supports asynchronous I/O, based on events such as the completion of a
file read operation or a database query.
These events are handled with callback functions, which enable the
application to proceed while I/O is being performed.
The event loop handles these events.
Users of Node are free from worries of dead-locking the process, since there are
no locks.
Almost no function in Node directly performs I/O, so the process never blocks.
6
8. ChallengesofInternetofThings???
Internet of Things, or IoT, will usher in significant challenges.
Scalability, for one thing, will present a whole new hurdle.
The sky is no longer the limit!! Data growth is essentially limitless.
And when anything and everything begins to acquire intelligence and require
data management, network control and design will need to change.
Across all of these areas and more, application development will have to keep
up.
App dev must become more rapid, agile, and flexible than ever. 8
10. Whynode.jsforInternetofThings…..??
Node.js is known for its speed, scalability and efficiency—making it great for
developing data-intensive, real-time applications.
This, of course, makes Node.js well-suited for the IoT, which is reliant on data-
intensive, real-time devices and applications.
Further, effective and secure communications and interactivity are of
paramount importance in the IoT, which is the very reason why APIs lend
themselves so well to the IoT model.
The single greatest and most widely accepted use case for Node.js is APIs. For
example, the first thing LinkedIn built in Node.js was its mobile API. 10
11. MoreonIoTandNodefriendship…..
There are many frameworks— including HapiTrack, ExpressTrack,
RestifyTrack designed for creating APIs in Node.js.
Even without a powerful pre-built solution, however, it takes only a few lines of
code to get an API started using Node.js.
Devices within the IoT, such as sensors, beacons and wearables generate large
floods of requests.
Node.js is well-suited for managing these requests via streams that can be
processed and monitored very efficiently. 11
12. NPM…….
It’s also important to note that the Node.js community has an affinity for IoT
technologies, and early adopters of IoT have a tendency to use Node.js for
experiments and products.
In fact, the Node Packaged Modules (NPM) repository is an indicator of the
association between these communities.
It includes more than 80 packages for the Arduino controller, over 15 for
Bluetooth Low Power, and multiple packages for the Pebble and Fitbit
wearable devices.
By the end of June 2014, the number of Node.js modules in NPM had grown to
over 80,000 and surpassed Maven Central modules, putting NPM’s stake in
12
13. Estimated 48% of developers use Node.js at IoT companies.
33% Healthcare startups are using Node.js
In the most in-demand IoT skills , Node.js showed an 86% growth.
13