Successfully reported this slideshow.

WebSockets - Today, in the Past, in Future and in Production.

1

Share

Upcoming SlideShare
Web Sockets - HTML5
Web Sockets - HTML5
Loading in …3
×
1 of 16
1 of 16

WebSockets - Today, in the Past, in Future and in Production.

1

Share

Download to read offline

In the given talk I cover interesting fact about the protocol which provides HTTP bidirectional communication. Starting with the past state of web sockets and their implementation I explain the protocol step by step, present my own stream based WebSocket implementation and compare it to present challengers. To the end I talk about my personal experience with WebSockets and how I predict the future of them.

In the given talk I cover interesting fact about the protocol which provides HTTP bidirectional communication. Starting with the past state of web sockets and their implementation I explain the protocol step by step, present my own stream based WebSocket implementation and compare it to present challengers. To the end I talk about my personal experience with WebSockets and how I predict the future of them.

More Related Content

Related Books

Free with a 14 day trial from Scribd

See all

WebSockets - Today, in the Past, in Future and in Production.

  1. 1. WebSockets by Bodo Kaiser
  2. 2. What are WebSockets? WebSockets allow bidirectional communication over HTTP!
  3. 3. HTTP Server Client GET / HTTP/1.1 Host: localhost Accept: */* HTTP/1.1 200 OK Content-Type: text/plain Content-Length: 12
  4. 4. WS Server Client GET / HTTP/1.1 Host: localhost Upgrade: websocket Connection: Upgrade Sec-WebSocket-Key: … Sec-WebSocket-Version:13 HTTP/1.1 101 Switching… Upgrade: websocket Connection: Upgrade Sec-WebSocket-Accept: …
  5. 5. Frame Encoding 1000 0001 0000 0101 0100 1000 0110 0101 0111 1001 PayloadHeader H e y F I N R S V OP CODE M A S K LENGTH Extended Length Masking
  6. 6. WebSockets in node.js socket.io by learn boost fallback support, high level api (e.g. events) ! ws by einaros „fastest“ websocket implementation
  7. 7. Walve - socket.io by learn boost not working, using xhr fallback all the time, cannot read code for PR ! - other ws implementations awful API design, also bad to read 1. Follows node’s core conventions 2. Uses node’s TransformStreams 3. Written in readable JavaScript
  8. 8. Design http.Server „upgrade“ Event walve.Server walve.Response walve.Socket walve.Socket walve.Incoming walve.Outgoing „response“ Event Some Router / Web Framework
  9. 9. Code Examples Visit http://github.com/bodokaiser/node-walve ! ! ! Do not forget to leave a Start :)
  10. 10. Performance (Hello World) Hello World 0,000 1,000 2,000 3,000 4,000 5,000 ws walve
  11. 11. Performance (Small Image) Small Image 60,000 70,000 80,000 90,000 100,000 110,000 ws walve
  12. 12. Performance (Large Image) Large Image Werteachse 2000,000 2400,000 2800,000 3200,000 3600,000 4000,000 4400,000 4800,000 5200,000 5600,000 6000,000 ws walve
  13. 13. Performance (Memory Consumption) Memory Consumption 0,0 100,0 200,0 300,0 400,0 500,0 walve ws
  14. 14. Further Thoughts 1. Reliability ! 2. Extendability ! 3. Future development ! 4. Mobile Usage (ProTip)
  15. 15. Examples Messenger ! Simple WebSocket Chat with Image support. Nearby ! Realtime Tracking with Google Maps and Geolocation. ! http://github.com/bodokaiser/messenger http://github.com/bodokaiser/nearby
  16. 16. Thanks and Q&A Follow me on twitter @bodojs ! Star my projects on github github.com/bodokaiser

×