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"                                 317...
Node v/s the restTested under Ubuntu using a Intel Core 2 Duo,2.53 GHz, 4 GB memory, Approximately 100 byte response for e...
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....
Event Driven   //JS   window.onload = function(){       document.body.innerHTML = Hello World;   };//Nodehttp = require(ht...
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)
Upcoming SlideShare
Loading in...5
×

Node

6,805

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
6,805
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
20
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Node

  1. 1. How to node!
  2. 2. What is Node?• Javascript on the server• Asynchronous and non-blocking code• Event driven• Scalable real-time applications
  3. 3. Existing solutions• NGINX• Tornado• Thin
  4. 4. 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
  5. 5. 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
  6. 6. Node v/s the restSame environement. Variables : Fixed concurrency of 300, size of response
  7. 7. Javascript on the Server?• Runs on Google’s V8 Engine
  8. 8. Conventional Server• Request is processed sequentially• Queued requests
  9. 9. Asynchronous Server• Concurrent execution• Non-blocking code• Scalable
  10. 10. How does Node do it all?
  11. 11. Node Server//Nodehttp = require(http);http.createServer(function(request, response){   response.writeHead(200);  response.write(Hello World);  response.end();}).listen(8000);
  12. 12. 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);
  13. 13. Examples
  14. 14. Real World Real Time App• Hummingbird• Wheat• Multi player games• Real time push notifications
  15. 15. Extend Node• NPM• Socket.io• Now• Express.js
  16. 16. How to Node?• Why to Node?• When to Node?• When not to?
  17. 17. Resources• http://nodejs.org• http://npmjs.org• http://howtonode.org• http://github.com/joyent/node
  18. 18. Thanks Arjun Raj(http://athousandnodes.com | @athousandnodes)
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×