This document discusses real-time web technologies including server-sent events (SSE), websockets, and polling. It provides an overview of each technology, including how they work, browser support, and server-side support. The document concludes with a demo of websockets in Windows 8 using ASP.NET and WCF and a request for questions and answers.
7. Comet/long polling
Real-time user experience
High number of clients determines high
pressure on
bandwidth, memory, threads/processes
DEMO
8. Html5 server-sent events
Browser Server
open event stream
<EventSource>
event event
onmessage
event
event
onmessag
e event
event
onmessag
e
9. Html5 server-sent events
Simulates a server push channel over HTTP
Unidirectional, from server to browser
Standardizes some form of Comet/http
streaming
New html tag: <EventSource>
New mime type: text/event-stream
10. Html5 WebSockets
GET /text HTTP/1.1
Client/Browser Upgrade: WebSocket
Server
Connection: Upgrade
Host: www.websocket.org ...
HTTP/1.1 101 WebSocket Protocol
Handshake
Upgrade: WebSocket ...
TCP comm channel
Full
duplex, bidirectional
11. Html5 WebSockets
Full duplex, bidirectional
Single TCP socket
Standard ports: http/80, https/443
Bandwidth savings
Higher scalability comparing with Comet
In&outside of browser
IETF WebSockets Communication protocol
W3C WebSockets API
12. Server side support
Socket.IO (node.js) Socket.IO Fallbacks
Jetty (Java) Adobe Flash Socket
Ruby/EventMachine AJAX Long Polling
Python/Twisted AJAX Multipart
Streaming
Windows 8, IIS 8, ASP.NET-WCF
4.5 Forever iFrame
… others JSONP Polling
http://socket.io/
15. WebSockets @Microsoft
Your code!
WCF high level
abstractions
ASP.NET high level
WCF WebSocket transport
abstractions
System.Net.WebSockets
ASP.NET HTTP Pipeline
HttpListener IIS (iiswsock.dll)
http.sys