Real time web applications
-
Upload
jess-chadwick -
Category
Technology
-
view
331 -
download
0
Transcript of Real time web applications
Developing Real-Time and Asynchronous Web Applications
Jess ChadwickArchitect / RIA Specialist
weblogs.asp.net/[email protected]
Gratuitous Plug$$$
Buy My Books! $
$$
Now with 100% more
Awesome!
Gluten Free!
The Real-Time Web
• Information as it happens
• Always Connected
Why Should I Care?
•User Interaction, aka “Social Networking”
•News
Ok, you’ve sold me.
Let’s do it!
The Web Isn’t Real-Time!
Real-Time Web
1,000’s of users connected at once
The Traditional Web
One user at a time
Real-Time Web Hacks
Real-Time Web Hack #1:
Polling
PollingBenefits Drawbacks
• Takes advantage of how the web really works
• Reliable
• Universal browser support
• Wasteful – requests occur regardless of data
• Drains server and network resources
• Doesn’t scale
Real-Time Web Hack #2:
Long Polling
Long PollingBenefits Drawbacks
• Uses “standard web techniques”
• Less wasteful – fewer requests than “regular” polling
• Universal browser support
• Less reliable – frequent broken connections
• Based on request-response interaction (might be some delay between requests)
Real-Time Web Hack #3:
Server-Sent Events
Server-Sent EventsBenefits Drawbacks
• True real-time
• Rich JavaScript API
• Universal browser support…
except
• Less reliable (broken connections)
• One-way communication (client server)
Real-Time Web Hack #4:
Web Sockets
WebSocketsBenefits Drawbacks
• True real-time
• True bi-directional communication
• Rich JavaScript API
• Good browser support…
except and Opera
• Emerging standard
• Doesn’t use “standard web techniques”
• Less reliable (broken connections)