Jstanbul, Node.js based Socket.IO, Express and HTML5 based Bingo Game
Building real time apps with node.js, socket.io, knockout.js
description
Transcript of Building real time apps with node.js, socket.io, knockout.js
![Page 1: Building real time apps with node.js, socket.io, knockout.js](https://reader033.fdocuments.in/reader033/viewer/2022051210/54b7ade14a79594b258b4704/html5/thumbnails/1.jpg)
Building real-time apps with node.js, socket.io
and knockout.js
Iván Loire
twitter: @ivanloire
email: [email protected]
Betabeers Zaragoza, 09/03/2012
Monday, March 12, 2012
![Page 2: Building real time apps with node.js, socket.io, knockout.js](https://reader033.fdocuments.in/reader033/viewer/2022051210/54b7ade14a79594b258b4704/html5/thumbnails/2.jpg)
you want real-time apps?
get the fastest tools!
Monday, March 12, 2012
![Page 3: Building real time apps with node.js, socket.io, knockout.js](https://reader033.fdocuments.in/reader033/viewer/2022051210/54b7ade14a79594b258b4704/html5/thumbnails/3.jpg)
node.js
high performance javascript library for intensive I/O operations. (like HTTP)
single threaded, event oriented.
built on Chrome’s Javascript runtime (V8)
lightweight, efficient, really fast.
.. insanely fast.
Monday, March 12, 2012
![Page 4: Building real time apps with node.js, socket.io, knockout.js](https://reader033.fdocuments.in/reader033/viewer/2022051210/54b7ade14a79594b258b4704/html5/thumbnails/4.jpg)
websockets
bi-directional, full duplex over a single tcp socket.
connection remains open = no tcp handshake
lightweight protocol = no http headers, 2 byte overhead
supported chrome 16, FF 11, IE 10, Opera 10
reducing latency from 150 (http) to 50 ms (sockets)
Monday, March 12, 2012
![Page 5: Building real time apps with node.js, socket.io, knockout.js](https://reader033.fdocuments.in/reader033/viewer/2022051210/54b7ade14a79594b258b4704/html5/thumbnails/5.jpg)
socket.iowebsockets for the rest of us.
fallback transports (yes, it also works in IE!!)
websockets
flash sockets
ajax long polling
ajax streaming
iframe
json polling..
Monday, March 12, 2012
![Page 6: Building real time apps with node.js, socket.io, knockout.js](https://reader033.fdocuments.in/reader033/viewer/2022051210/54b7ade14a79594b258b4704/html5/thumbnails/6.jpg)
knockout.js
rich, responsive display with a clean underlying data model.
declarative bindinds
automatic UI refresh
dependency tracking
templating
Monday, March 12, 2012
![Page 7: Building real time apps with node.js, socket.io, knockout.js](https://reader033.fdocuments.in/reader033/viewer/2022051210/54b7ade14a79594b258b4704/html5/thumbnails/7.jpg)
... and a fast database!
open source, high performance, in-memory, key-value data store
support master-slave replication
really fast!
if durability is not needed... insanely fast!
Monday, March 12, 2012
![Page 8: Building real time apps with node.js, socket.io, knockout.js](https://reader033.fdocuments.in/reader033/viewer/2022051210/54b7ade14a79594b258b4704/html5/thumbnails/8.jpg)
real-time web apps
node.js + redis + socket.io + knockout.js
real-time... or close enough?
Monday, March 12, 2012
![Page 9: Building real time apps with node.js, socket.io, knockout.js](https://reader033.fdocuments.in/reader033/viewer/2022051210/54b7ade14a79594b258b4704/html5/thumbnails/9.jpg)
let’s build a really simple real-time game...
thanks to @gimenete for getting me into node.js!... and thanks to @jmendiara for the node.js sticker!
Thanks!
Iván Loire (twitter: @ivanloire)
code: https://github.com/iloire/math-race
demo: http://letsnode.com:8090/
Monday, March 12, 2012