The document discusses various techniques for reverse Ajax communication, including HTTP polling, piggybacking, Comet, and websockets. HTTP polling involves the browser periodically sending asynchronous requests to the server to check for new data, while piggybacking embeds server responses for new data in the responses for regular requests. These approaches are compared in terms of their bandwidth efficiency and browser support.
Report
Share
Report
Share
1 of 99
Download to read offline
More Related Content
Reverse ajax
1. Reverse Ajax
Something You Don’t Know About HTTP
RDSS Team
2012-04
Monday, May 14, 12
3. About
RDSS
Research on Domain Specific Solution
We focus on existing specification, solution, production etc.
We apply our research to practice.
Monday, May 14, 12
17. HTTP Polling
Pros
Require no special features on server
Monday, May 14, 12
18. HTTP Polling
Pros
Require no special features on server
Works in all browsers
Monday, May 14, 12
19. HTTP Polling
Pros
Require no special features on server
Works in all browsers
Easy to implement in client
Monday, May 14, 12
20. HTTP Polling
Pros
Require no special features on server
Works in all browsers
Easy to implement in client
Cons
Monday, May 14, 12
21. HTTP Polling
Pros
Require no special features on server
Works in all browsers
Easy to implement in client
Cons
Bandwidth consuming
Monday, May 14, 12
22. HTTP Polling
Pros
Require no special features on server
Works in all browsers
Easy to implement in client
Cons
Bandwidth consuming
Large amounts of useless requests
Monday, May 14, 12
23. Piggyback
Browser Server
Timeline
Timeline
Monday, May 14, 12
24. Piggyback
Browser Server
Ajax Requst #1
Timeline
Timeline
Monday, May 14, 12
25. Piggyback
Browser Server
Ajax Requst #1
Response #1
Timeline
Timeline
Monday, May 14, 12
26. Piggyback
Browser Server
Ajax Requst #1
Response #1
Timeline
Timeline
Ajax Requst #2
Monday, May 14, 12
27. Piggyback
Browser Server
Ajax Requst #1
Response #1
Timeline
Timeline
Ajax Requst #2
Response #2
Monday, May 14, 12
35. Piggyback
Pros
Less resources consumption
Monday, May 14, 12
36. Piggyback
Pros
Less resources consumption
Works in all browsers
Monday, May 14, 12
37. Piggyback
Pros
Less resources consumption
Works in all browsers
No special requirements on server side
Monday, May 14, 12
38. Piggyback
Pros
Less resources consumption
Works in all browsers
No special requirements on server side
Cons
Monday, May 14, 12
39. Piggyback
Pros
Less resources consumption
Works in all browsers
No special requirements on server side
Cons
Server still have to wait for the request even though the
data/event has been arrived
Monday, May 14, 12
59. Comet:http streaming
Pros
Save the most bandwidth usage
Easy to implement(FI)
Monday, May 14, 12
60. Comet:http streaming
Pros
Save the most bandwidth usage
Easy to implement(FI)
Cons
Monday, May 14, 12
61. Comet:http streaming
Pros
Save the most bandwidth usage
Easy to implement(FI)
Cons
No way to implement error handling(FI)
Monday, May 14, 12
62. Comet:http streaming
Pros
Save the most bandwidth usage
Easy to implement(FI)
Cons
No way to implement error handling(FI)
Not supported by all the browsers(MX)
Monday, May 14, 12
63. Comet:http streaming
Pros
Save the most bandwidth usage
Easy to implement(FI)
Supported all the browsers(FI)
Cons
No way to implement error handling(FI)
Not supported by all the browsers(MX)
Monday, May 14, 12
78. Comet:Http Long Polling
Script Tags
Pros
No Cross-Domain Messaging Issue
Easy to implement
Monday, May 14, 12
79. Comet:Http Long Polling
Script Tags
Pros
No Cross-Domain Messaging Issue
Easy to implement
Cons
Monday, May 14, 12
80. Comet:Http Long Polling
Script Tags
Pros
No Cross-Domain Messaging Issue
Easy to implement
Cons
No way to implement error handling(FI)
Monday, May 14, 12
81. Comet:Http Long Polling
Script Tags
Pros
No Cross-Domain Messaging Issue
Easy to implement
Supported by all the browsers
Cons
No way to implement error handling(FI)
Monday, May 14, 12
88. Comet:Http Long Polling
XMLHttpRequest
Pros
Can implement good error handling
Monday, May 14, 12
89. Comet:Http Long Polling
XMLHttpRequest
Pros
Can implement good error handling
Easy to implement
Monday, May 14, 12
90. Comet:Http Long Polling
XMLHttpRequest
Pros
Can implement good error handling
Easy to implement
Supported by all the browsers
Monday, May 14, 12
91. Comet:Http Long Polling
XMLHttpRequest
Pros
Can implement good error handling
Easy to implement
Supported by all the browsers
Cons
Monday, May 14, 12
92. Comet:Http Long Polling
XMLHttpRequest
Pros
Can implement good error handling
Easy to implement
Supported by all the browsers
Cons
No main disadvantages
Monday, May 14, 12
93. Comet:Http Long Polling
XMLHttpRequest
Pros
Can implement good error handling
Easy to implement
Supported by all the browsers
Cons
No main disadvantages
Monday, May 14, 12
94. Bayeux
Just a protocol based on http
Monday, May 14, 12
95. WebSockets
Browser Server
Timeline
Timeline
Monday, May 14, 12
96. WebSockets
Browser Server
Timeline
Timeline
Monday, May 14, 12