my adventure with websockets
TRANSCRIPT
My Adventurewith
WebSockets
Michiel De MeyTwitter: @michieldemey
Website: michieldemey.be
So, what are websockets?
“WebSocket is a web technology providing full-duplex communications channels over a single
TCP connection. ”
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
Why should you bother?
Two-way communication (full duplex)
Real-time data
No firewall getting in your way
The downsidesYour network has to be compatible with websockets.
Load balancersHTTP Proxies...
The lifecycle
My final project onwebsockets
The stack and stuff
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
Module for Nginx to deploy Ruby on Rails apps.
Platform running on Google's V8 JavaScript engine.
Used to build fast and scalable network applications.
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
CoffeeScript is a little language that compiles into JavaScript.
Both the websocket server and the client are written inCoffeeScript.
Demo
Thank youTwitter: @michieldemey
Artwork by Jorge Jacintohttp://blinck.deviantart.com/