Sanwaad presentation

397 views

Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Sanwaad presentation

  1. 1. Node.js
  2. 2. Set of libraries on top of V8
  3. 3. Evented I/O e.g. ioOperation(args, callbackFunction );
  4. 4. <ul><li>Evented </li></ul><ul><ul><li>setTimeout(function(){ </li></ul></ul><ul><ul><li>console.log(“world”);},2000); </li></ul></ul><ul><ul><li>console.log(“hello”); </li></ul></ul><ul><li>Sequential </li></ul><ul><ul><li>print(“hello”); </li></ul></ul><ul><ul><li>sleep(2); </li></ul></ul><ul><ul><li>print (“world”); </li></ul></ul>
  5. 5. No threads :) More scalable Code in js Benefits
  6. 6. WebSocket
  7. 7. Full duplex single socket connection
  8. 8. Polling Client Server Something new ? NO !!! Something new ? NO !!! Something new ? Yeah! Here it is !
  9. 9. Long-Polling = polling with time factor
  10. 10. Benefits Bi-directional communication Full duplex Less overhead as compared to HTTP/AJAX
  11. 11. Sanwaad
  12. 12. The real-time chat server
  13. 13. Design Server: app.js – router sanwaad.js – controller index.jade – view
  14. 14. Design... Client: landing HTML page lib.css – cascaded stylesheet lib.js – client side java script jquery.js – a js library to write less and do more
  15. 15. Design... Testing: qunit.js – javascript test suite utest.js – unit tests testRunner.html – Test Runner
  16. 16. Demo
  17. 17. Questions ?

×