Node
Upcoming SlideShare
Loading in...5
×
 

Node

on

  • 4,530 views

 

Statistics

Views

Total Views
4,530
Views on SlideShare
2,314
Embed Views
2,216

Actions

Likes
0
Downloads
19
Comments
0

10 Embeds 2,216

http://athousandnodes.com 2022
http://www.athousandnodes.com 118
http://athousandnodes.in 44
http://athousandnodes.drupalvillage.org 13
http://www.athousandnodes.in 8
url_unknown 4
http://paper.li 3
http://avielmed 2
http://translate.googleusercontent.com 1
http://localhost 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Node Node Presentation Transcript

  • How to node!
  • What is Node?• Javascript on the server• Asynchronous and non-blocking code• Event driven• Scalable real-time applications
  • Existing solutions• NGINX• Tornado• Thin
  • Node v/s PHP PHP Node"Hello World" 3177.27 5579.30Simple html file"File Read" 20.31 47.21Textfile of 100KB"Read Remote File" 3.21 6.43Read a remote page and deliver
  • Node v/s the restTested under Ubuntu using a Intel Core 2 Duo,2.53 GHz, 4 GB memory, Approximately 100 byte response for each
  • Node v/s the restSame environement. Variables : Fixed concurrency of 300, size of response
  • Javascript on the Server?• Runs on Google’s V8 Engine
  • Conventional Server• Request is processed sequentially• Queued requests
  • Asynchronous Server• Concurrent execution• Non-blocking code• Scalable
  • How does Node do it all?
  • Node Server//Nodehttp = require(http);http.createServer(function(request, response){   response.writeHead(200);  response.write(Hello World);  response.end();}).listen(8000);
  • Event Driven //JS window.onload = function(){     document.body.innerHTML = Hello World; };//Nodehttp = require(http);http.createServer(function(request, response){     response.writeHead(200);     response.write(Hello World);     response.end();}).listen(8000);
  • Examples
  • Real World Real Time App• Hummingbird• Wheat• Multi player games• Real time push notifications
  • Extend Node• NPM• Socket.io• Now• Express.js
  • How to Node?• Why to Node?• When to Node?• When not to?
  • Resources• http://nodejs.org• http://npmjs.org• http://howtonode.org• http://github.com/joyent/node
  • Thanks Arjun Raj(http://athousandnodes.com | @athousandnodes)