my adventure with websockets

19
My Adventure with WebSockets

Upload: michiel-de-mey

Post on 20-Aug-2015

302 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: My adventure with WebSockets

My Adventurewith

WebSockets

Page 2: My adventure with WebSockets

Michiel De MeyTwitter: @michieldemey

Website: michieldemey.be

Page 3: My adventure with WebSockets

So, what are websockets?

Page 4: My adventure with WebSockets

“WebSocket is a web technology providing full-duplex communications channels over a single

TCP connection. ”

Page 5: My adventure with WebSockets

A few things you should know

You're sending messagesUTF-8 text or binary dataMessages from client to server are “obfuscated”WebSockets automatically signal when the connection isabout to be terminatedBuilt-in heartbeating support

Not all browsers currently support the transfer of binary data

Page 6: My adventure with WebSockets

Why should you bother?

Page 7: My adventure with WebSockets

Two-way communication (full duplex)

Real-time data

No firewall getting in your way

Page 8: My adventure with WebSockets

The downsidesYour network has to be compatible with websockets.

Load balancersHTTP Proxies...

Page 9: My adventure with WebSockets

The lifecycle

Page 10: My adventure with WebSockets
Page 12: My adventure with WebSockets

My final project onwebsockets

The stack and stuff

Page 13: My adventure with WebSockets

High performant HTTP and reverse proxy server.

Running on Port 80 Proxying websockets on port 80 to port 8080

NOTE: requires Nginx 1.3.13

(Development version)Websocket proxying

Page 14: My adventure with WebSockets

Module for Nginx to deploy Ruby on Rails apps.

Page 15: My adventure with WebSockets

Platform running on Google's V8 JavaScript engine.

Used to build fast and scalable network applications.

Page 16: My adventure with WebSockets

Node.js package that makes real-time apps possible in everybrowser and device.

Server running on port 8080Falls back to different transport mechanismsServer kept running using forever

Page 17: My adventure with WebSockets

CoffeeScript is a little language that compiles into JavaScript.

Both the websocket server and the client are written inCoffeeScript.

Page 18: My adventure with WebSockets

Demo

Page 19: My adventure with WebSockets

Thank youTwitter: @michieldemey

Artwork by Jorge Jacintohttp://blinck.deviantart.com/