Anupam Datta | 593455 | datta.anupam@tcs.com
TCS Innovation Lab | Kolkata
[ #GetFact ]
 Open Source
 Cross-platform runtime environment.
 Provides event driven architecture & Non-blocking I/O
API. Asynchronous with callback ()
 Optimized throughput & increased scalability.
 Uses Google V8 javascript engine.
 Coding on Javascript.
 Most libraries are in Javascript.
 Invented in Joyent
 package manager npm
 primarily used for network application and server
 single thread [ concurrency | zero context switching cost ]
 Module does the job [ file R/W , networking and ++ ]
After over 20 years of stateless-web based on the
stateless request-response paradigm, we finally have web
applications with real-time, two-way connections.
-Ryan Dahl [ the man behind node.js ]
Traditional Web server :
2 MB/thread | theoretical concurrent connection 4000 for
8GB RAM + context switching cost
Node.js :
over 1M concurrent connection
Node.js is not good for CPU intensive Heavy
Computation
Node.js was never created to solve the compute scaling
problem. It was created to solve the I/O scaling problem
Example : Myntra uses Node.js
 Chat [ real time | multi user | high traffic | data intensive |
low computation ]
 Message Queuing [ data intensive | concurrent resource ]
 Data Streaming [ process data while in stream ]
 Proxy [ concurrent connection | high load ]
 Real time monitor [ large data set | concurrent | scalable ]
 IoT [ fast data | realtime ]
NodeFunda :
 module [ similar to #include <>, import ]
 callback [ continuation passing style | continue program
execution ]
 events [ event driven hence subscribing to EventEmitter
can change program execution ]
 stream [ .pipe () | manipulate on data flow | reduce
memory usage ]
 error handling [ must or else crashed ]
Resources :
 https://nodejs.org [ official site ]
 http://nodeschool.io [ tutorials ]
 azure.microsoft.com/en-us/develop/nodejs [ MS dev ]
 http://cylonjs.com/ [ JavascriptRobotics ]
 http://nodered.org/ [ Wiring IoT visually ]
 https://tessel.io/ [ High Level Hardware API for coding
small devices in node.js #IoT ]

nodejs

  • 1.
    Anupam Datta |593455 | datta.anupam@tcs.com TCS Innovation Lab | Kolkata [ #GetFact ]
  • 2.
     Open Source Cross-platform runtime environment.  Provides event driven architecture & Non-blocking I/O API. Asynchronous with callback ()  Optimized throughput & increased scalability.  Uses Google V8 javascript engine.  Coding on Javascript.  Most libraries are in Javascript.
  • 3.
     Invented inJoyent  package manager npm  primarily used for network application and server  single thread [ concurrency | zero context switching cost ]  Module does the job [ file R/W , networking and ++ ] After over 20 years of stateless-web based on the stateless request-response paradigm, we finally have web applications with real-time, two-way connections. -Ryan Dahl [ the man behind node.js ]
  • 4.
    Traditional Web server: 2 MB/thread | theoretical concurrent connection 4000 for 8GB RAM + context switching cost Node.js : over 1M concurrent connection Node.js is not good for CPU intensive Heavy Computation Node.js was never created to solve the compute scaling problem. It was created to solve the I/O scaling problem
  • 5.
    Example : Myntrauses Node.js  Chat [ real time | multi user | high traffic | data intensive | low computation ]  Message Queuing [ data intensive | concurrent resource ]  Data Streaming [ process data while in stream ]  Proxy [ concurrent connection | high load ]  Real time monitor [ large data set | concurrent | scalable ]  IoT [ fast data | realtime ]
  • 6.
    NodeFunda :  module[ similar to #include <>, import ]  callback [ continuation passing style | continue program execution ]  events [ event driven hence subscribing to EventEmitter can change program execution ]  stream [ .pipe () | manipulate on data flow | reduce memory usage ]  error handling [ must or else crashed ]
  • 7.
    Resources :  https://nodejs.org[ official site ]  http://nodeschool.io [ tutorials ]  azure.microsoft.com/en-us/develop/nodejs [ MS dev ]  http://cylonjs.com/ [ JavascriptRobotics ]  http://nodered.org/ [ Wiring IoT visually ]  https://tessel.io/ [ High Level Hardware API for coding small devices in node.js #IoT ]