sanwaad presentation
DESCRIPTION
TRANSCRIPT
Node.js
Set of libraries on top of V8
Evented I/O
e.g. ioOperation(args, callbackFunction);
Evented
setTimeout(function(){console.log(“world”);},2000);console.log(“hello”);
Sequential
print(“hello”);sleep(2);print (“world”);
No threads :)
More scalable
Code in js
Benefits
WebSocket
Full duplex single socket connection
Polling
Client Server
Something new ?
NO !!!
Something new ?
NO !!!
Something new ?
Yeah! Here it is !
Long-Polling = polling with time factor
Benefits
Bi-directional communication
Full duplex
Less overhead as compared to HTTP/AJAX
Sanwaad
The real-time chat server
Design
Server:
app.js – routersanwaad.js – controllerindex.jade – view
Design...
Client:
landing HTML pagelib.css – cascaded stylesheetlib.js – client side java scriptjquery.js – a js library to write less and do more
Design...
Testing:
qunit.js – javascript test suiteutest.js – unit teststestRunner.html – Test Runner
Demo
Questions ?