19

Node.js & socket.io

Embed Size (px)

DESCRIPTION

In this slides we cover a bit about the history of the web, why we should use socket.io and a demo about node.js

Citation preview

Page 1: Node.js & socket.io
Page 2: Node.js & socket.io

Node.JS, Socket.IOand the

Real-Time WebAlon Nativ

Page 3: Node.js & socket.io

Alon Nativ

@anativ [email protected]

Page 4: Node.js & socket.io

Why are we here?

Page 5: Node.js & socket.io

Why Sockets?

Page 6: Node.js & socket.io

History

Page 7: Node.js & socket.io

Web history

dfasdsfasdfasd

Real Time Apps

dfasdsfasdfasd

AJAX Apps

dfasdsfasdfasd

Static Docs

dfasdsfasdfasd

Dynamic Docs

Page 8: Node.js & socket.io

HTTP

Client (browser)

Request

Response

Don't call me I'll call you!

But I have something to say

Server

Page 9: Node.js & socket.io

Ajax Polling

Client (browser)

Anything?

No!

Anything?

No!

Anything?

Yes!

Page 10: Node.js & socket.io

Long Polling

Client (browser)

Anything?

Yes

Server

Anything?

Page 11: Node.js & socket.io

Sockets

Client (browser) Server

let's Talk

Page 12: Node.js & socket.io

Sockets and the Web

WebSocket

Flash Socket

AJAX Long Polling

AJAX Multipart streaming

Forever Iframe

JSONP Polling

Page 13: Node.js & socket.io

How can we handle all the formats?

Page 14: Node.js & socket.io

Server?

Page 15: Node.js & socket.io

We need a server

Page 16: Node.js & socket.io

Let the coding begin... Client

Server

Page 17: Node.js & socket.io

Demo...

http://bit.ly/techmeetup1 http://socket-io-canvas.herokuapp.com/

Page 18: Node.js & socket.io

Node.js - http://nodejs.org/Socket.IO - http://socket.io/Demo Site - http://bit.ly/techmeetup1Demo Code - https://github.com/anativ/collaborative-canvas

Read more...

Page 19: Node.js & socket.io

@anativ

Thanks

@anativ