Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
SlideShare a Scribd company logo
Reverse Ajax
                     Something You Don’t Know About HTTP

                                  RDSS Team
                                   2012-04




Monday, May 14, 12
Author

                     澄净
                     F2E & Translator
                     http://goddyzhao.me




Monday, May 14, 12
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
Solutions

               • HTTP Polling & JSONP Polling
               • Piggyback
               • Comet
               • Bayeux(CometD)
               • WebSockets

Monday, May 14, 12
HTTP Polling
                     Browser     Server




                                    Timeline
                      Timeline




Monday, May 14, 12
HTTP Polling
                     Browser                      Server
                                 Ajax Requst #1




                                                     Timeline
                      Timeline




Monday, May 14, 12
HTTP Polling
                     Browser                            Server
                                   Ajax Requst #1


                                 Response #1(no data)




                                                           Timeline
                      Timeline




Monday, May 14, 12
HTTP Polling
                     Browser                            Server
                                   Ajax Requst #1


                                 Response #1(no data)




                                                           Timeline
                      Timeline




                                    Ajax Requst #2




Monday, May 14, 12
HTTP Polling
                     Browser                            Server
                                   Ajax Requst #1


                                 Response #1(no data)




                                                           Timeline
                      Timeline




                                    Ajax Requst #2


                                 Response #2(no data)




Monday, May 14, 12
HTTP Polling
                     Browser                            Server
                                   Ajax Requst #1


                                 Response #1(no data)




                                                           Timeline
                      Timeline




                                    Ajax Requst #2


                                 Response #2(no data)
                                                                      Data/Event




Monday, May 14, 12
HTTP Polling
                     Browser                            Server
                                   Ajax Requst #1


                                 Response #1(no data)




                                                           Timeline
                      Timeline




                                    Ajax Requst #2


                                 Response #2(no data)
                                                                      Data/Event
                                                                      Data/Event




Monday, May 14, 12
HTTP Polling
                     Browser                            Server
                                   Ajax Requst #1


                                 Response #1(no data)




                                                           Timeline
                      Timeline




                                    Ajax Requst #2


                                 Response #2(no data)
                                                                      Data/Event
                                                                      Data/Event
                                    Ajax Requst #3




Monday, May 14, 12
HTTP Polling
                     Browser                              Server
                                    Ajax Requst #1


                                 Response #1(no data)




                                                             Timeline
                      Timeline




                                    Ajax Requst #2


                                 Response #2(no data)
                                                                        Data/Event
                                                                        Data/Event
                                    Ajax Requst #3


                                 Response #3(with data)



Monday, May 14, 12
HTTP Polling




Monday, May 14, 12
HTTP Polling




Monday, May 14, 12
HTTP Polling
              Pros




Monday, May 14, 12
HTTP Polling
              Pros
                     Require no special features on server




Monday, May 14, 12
HTTP Polling
              Pros
                     Require no special features on server
                     Works in all browsers




Monday, May 14, 12
HTTP Polling
              Pros
                     Require no special features on server
                     Works in all browsers
                     Easy to implement in client




Monday, May 14, 12
HTTP Polling
              Pros
                     Require no special features on server
                     Works in all browsers
                     Easy to implement in client

             Cons




Monday, May 14, 12
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
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
Piggyback
                     Browser     Server




                                    Timeline
                      Timeline




Monday, May 14, 12
Piggyback
                     Browser                      Server
                                 Ajax Requst #1




                                                     Timeline
                      Timeline




Monday, May 14, 12
Piggyback
                     Browser                      Server
                                 Ajax Requst #1


                                  Response #1




                                                     Timeline
                      Timeline




Monday, May 14, 12
Piggyback
                     Browser                      Server
                                 Ajax Requst #1


                                  Response #1




                                                     Timeline
                      Timeline




                                 Ajax Requst #2




Monday, May 14, 12
Piggyback
                     Browser                      Server
                                 Ajax Requst #1


                                  Response #1




                                                     Timeline
                      Timeline




                                 Ajax Requst #2


                                  Response #2




Monday, May 14, 12
Piggyback
                     Browser                      Server
                                 Ajax Requst #1


                                  Response #1




                                                     Timeline
                      Timeline




                                 Ajax Requst #2


                                  Response #2
                                                                Data/Event




Monday, May 14, 12
Piggyback
                     Browser                      Server
                                 Ajax Requst #1


                                  Response #1




                                                     Timeline
                      Timeline




                                 Ajax Requst #2


                                  Response #2
                                                                Data/Event
                                                                Data/Event




Monday, May 14, 12
Piggyback
                     Browser                      Server
                                 Ajax Requst #1


                                  Response #1




                                                     Timeline
                      Timeline




                                 Ajax Requst #2


                                  Response #2
                                                                Data/Event
                                                                Data/Event
                                 Ajax Requst #3




Monday, May 14, 12
Piggyback
                     Browser                                    Server
                                       Ajax Requst #1


                                        Response #1




                                                                   Timeline
                      Timeline




                                       Ajax Requst #2


                                         Response #2
                                                                              Data/Event
                                                                              Data/Event
                                       Ajax Requst #3


                                 Mixed Response #3(with data)



Monday, May 14, 12
Piggyback




Monday, May 14, 12
Piggyback




Monday, May 14, 12
Piggyback
              Pros




Monday, May 14, 12
Piggyback
              Pros
                     Less resources consumption




Monday, May 14, 12
Piggyback
              Pros
                     Less resources consumption
                     Works in all browsers




Monday, May 14, 12
Piggyback
              Pros
                     Less resources consumption
                     Works in all browsers
                     No special requirements on server side




Monday, May 14, 12
Piggyback
              Pros
                     Less resources consumption
                     Works in all browsers
                     No special requirements on server side

             Cons




Monday, May 14, 12
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
Comet:http streaming
                     Browser     Server




                                    Timeline
                      Timeline




Monday, May 14, 12
Comet:http streaming
                     Browser                             Server
                                 Long-lived Request #1




                                                            Timeline
                      Timeline




Monday, May 14, 12
Comet:http streaming
                     Browser                             Server
                                 Long-lived Request #1
                                                                   Request is
                                                                   suspended




                                                            Timeline
                      Timeline




Monday, May 14, 12
Comet:http streaming
                     Browser                             Server
                                 Long-lived Request #1
                                                                   Request is
                                                                   suspended

                                                                        Data/Event




                                                            Timeline
                      Timeline




Monday, May 14, 12
Comet:http streaming
                     Browser                             Server
                                 Long-lived Request #1
                                                                   Request is
                                                                   suspended

                                                                        Data/Event




                                                            Timeline
                      Timeline




                                       Response




Monday, May 14, 12
Comet:http streaming
                     Browser                             Server
                                 Long-lived Request #1
                                                                   Request is
                                                                   suspended

                                                                        Data/Event




                                                            Timeline
                      Timeline




                                       Response
                                                                        Data/Event




Monday, May 14, 12
Comet:http streaming
                     Browser                             Server
                                 Long-lived Request #1
                                                                   Request is
                                                                   suspended

                                                                        Data/Event




                                                            Timeline
                      Timeline




                                       Response
                                                                        Data/Event
                                                                        Data/Event




Monday, May 14, 12
Comet:http streaming
                     Browser                             Server
                                 Long-lived Request #1
                                                                   Request is
                                                                   suspended

                                                                        Data/Event




                                                            Timeline
                      Timeline




                                       Response
                                                                        Data/Event
                                                                        Data/Event

                                       Response




Monday, May 14, 12
Comet:http streaming
                     Browser                             Server
                                 Long-lived Request #1
                                                                   Request is
                                                                   suspended

                                                                        Data/Event




                                                            Timeline
                      Timeline




                                       Response
                                                                        Data/Event
                                                                        Data/Event

                                       Response                         Data/Event




Monday, May 14, 12
Comet:http streaming
                     Browser                             Server
                                 Long-lived Request #1
                                                                   Request is
                                                                   suspended

                                                                        Data/Event




                                                            Timeline
                      Timeline




                                       Response
                                                                        Data/Event
                                                                        Data/Event

                                       Response                         Data/Event
                                                                        Data/Event




Monday, May 14, 12
Comet:http streaming
                     Browser                             Server
                                 Long-lived Request #1
                                                                   Request is
                                                                   suspended

                                                                        Data/Event




                                                            Timeline
                      Timeline




                                       Response
                                                                        Data/Event
                                                                        Data/Event

                                       Response                         Data/Event
                                                                        Data/Event

                                       Response



Monday, May 14, 12
Comet:http streaming




Monday, May 14, 12
Comet:http streaming
                     Forever Iframe




Monday, May 14, 12
Comet:http streaming
                     Forever Iframe




Monday, May 14, 12
Comet:http streaming
                     Forever Iframe


               Multipart xhr
              (multipart/x-mixed-replace)




Monday, May 14, 12
Comet:http streaming
                     Forever Iframe


               Multipart xhr
              (multipart/x-mixed-replace)




Monday, May 14, 12
Comet:http streaming




Monday, May 14, 12
Comet:http streaming
              Pros




Monday, May 14, 12
Comet:http streaming
              Pros
                     Save the most bandwidth usage




Monday, May 14, 12
Comet:http streaming
              Pros
                     Save the most bandwidth usage
                     Easy to implement(FI)




Monday, May 14, 12
Comet:http streaming
              Pros
                     Save the most bandwidth usage
                     Easy to implement(FI)



              Cons



Monday, May 14, 12
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
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
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
Comet:Http Long Polling
                     Browser     Server




                                    Timeline
                      Timeline




Monday, May 14, 12
Comet:Http Long Polling
                     Browser                             Server
                                 Long-lived Request #1




                                                            Timeline
                      Timeline




Monday, May 14, 12
Comet:Http Long Polling
                     Browser                             Server
                                 Long-lived Request #1
                                                                   Request is
                                                                   suspended




                                                            Timeline
                      Timeline




Monday, May 14, 12
Comet:Http Long Polling
                     Browser                             Server
                                 Long-lived Request #1
                                                                   Request is
                                                                   suspended

                                                                        Data/Event




                                                            Timeline
                      Timeline




Monday, May 14, 12
Comet:Http Long Polling
                     Browser                              Server
                                  Long-lived Request #1
                                                                    Request is
                                                                    suspended

                                                                         Data/Event




                                                             Timeline
                      Timeline




                                 Response(#1 Completed)




Monday, May 14, 12
Comet:Http Long Polling
                     Browser                              Server
                                  Long-lived Request #1
                                                                    Request is
                                                                    suspended

                                                                         Data/Event




                                                             Timeline
                      Timeline




                                 Response(#1 Completed)

                                  Long-lived Request #2




Monday, May 14, 12
Comet:Http Long Polling
                     Browser                              Server
                                  Long-lived Request #1
                                                                    Request is
                                                                    suspended

                                                                         Data/Event




                                                             Timeline
                      Timeline




                                 Response(#1 Completed)

                                  Long-lived Request #2




Monday, May 14, 12
Comet:Http Long Polling
                     Browser                              Server
                                  Long-lived Request #1
                                                                    Request is
                                                                    suspended

                                                                         Data/Event




                                                             Timeline
                      Timeline




                                 Response(#1 Completed)

                                  Long-lived Request #2

                                                                         Data/Event




Monday, May 14, 12
Comet:Http Long Polling
                     Browser                              Server
                                  Long-lived Request #1
                                                                    Request is
                                                                    suspended

                                                                         Data/Event




                                                             Timeline
                      Timeline




                                 Response(#1 Completed)

                                  Long-lived Request #2

                                                                         Data/Event
                                                                         Data/Event




Monday, May 14, 12
Comet:Http Long Polling
                     Browser                              Server
                                  Long-lived Request #1
                                                                    Request is
                                                                    suspended

                                                                         Data/Event




                                                             Timeline
                      Timeline




                                 Response(#1 Completed)

                                  Long-lived Request #2

                                                                         Data/Event
                                                                         Data/Event


                                 Response(#2 Completed)



Monday, May 14, 12
Comet:Http Long Polling




Monday, May 14, 12
Comet:Http Long Polling
                     Script Tags




Monday, May 14, 12
Comet:Http Long Polling
                     Script Tags

                 Pros




Monday, May 14, 12
Comet:Http Long Polling
                     Script Tags

                 Pros
                      No Cross-Domain Messaging Issue




Monday, May 14, 12
Comet:Http Long Polling
                     Script Tags

                 Pros
                      No Cross-Domain Messaging Issue
                      Easy to implement




Monday, May 14, 12
Comet:Http Long Polling
                     Script Tags

                 Pros
                      No Cross-Domain Messaging Issue
                      Easy to implement



                Cons

Monday, May 14, 12
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
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
Comet:Http Long Polling




Monday, May 14, 12
Comet:Http Long Polling

         XMLHttpRequest




Monday, May 14, 12
Comet:Http Long Polling

         XMLHttpRequest




Monday, May 14, 12
Comet:Http Long Polling




Monday, May 14, 12
Comet:Http Long Polling

         XMLHttpRequest




Monday, May 14, 12
Comet:Http Long Polling

         XMLHttpRequest
                 Pros




Monday, May 14, 12
Comet:Http Long Polling

         XMLHttpRequest
                 Pros
                     Can implement good error handling




Monday, May 14, 12
Comet:Http Long Polling

         XMLHttpRequest
                 Pros
                     Can implement good error handling
                     Easy to implement




Monday, May 14, 12
Comet:Http Long Polling

         XMLHttpRequest
                 Pros
                     Can implement good error handling
                     Easy to implement
                     Supported by all the browsers




Monday, May 14, 12
Comet:Http Long Polling

         XMLHttpRequest
                 Pros
                     Can implement good error handling
                     Easy to implement
                     Supported by all the browsers

                Cons

Monday, May 14, 12
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
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
Bayeux


                     Just a protocol based on http




Monday, May 14, 12
WebSockets
                     Browser     Server




                                    Timeline
                      Timeline




Monday, May 14, 12
WebSockets
                     Browser     Server




                                    Timeline
                      Timeline




Monday, May 14, 12
WebSockets




Monday, May 14, 12
WebSockets

                  WebSockets enables
        bi-direction, full-duplex communication
                          channel
                     like tcp sockets



Monday, May 14, 12
Thanks!



Monday, May 14, 12

More Related Content

Reverse ajax

  • 1. Reverse Ajax Something You Don’t Know About HTTP RDSS Team 2012-04 Monday, May 14, 12
  • 2. Author 澄净 F2E & Translator http://goddyzhao.me 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
  • 4. Solutions • HTTP Polling & JSONP Polling • Piggyback • Comet • Bayeux(CometD) • WebSockets Monday, May 14, 12
  • 5. HTTP Polling Browser Server Timeline Timeline Monday, May 14, 12
  • 6. HTTP Polling Browser Server Ajax Requst #1 Timeline Timeline Monday, May 14, 12
  • 7. HTTP Polling Browser Server Ajax Requst #1 Response #1(no data) Timeline Timeline Monday, May 14, 12
  • 8. HTTP Polling Browser Server Ajax Requst #1 Response #1(no data) Timeline Timeline Ajax Requst #2 Monday, May 14, 12
  • 9. HTTP Polling Browser Server Ajax Requst #1 Response #1(no data) Timeline Timeline Ajax Requst #2 Response #2(no data) Monday, May 14, 12
  • 10. HTTP Polling Browser Server Ajax Requst #1 Response #1(no data) Timeline Timeline Ajax Requst #2 Response #2(no data) Data/Event Monday, May 14, 12
  • 11. HTTP Polling Browser Server Ajax Requst #1 Response #1(no data) Timeline Timeline Ajax Requst #2 Response #2(no data) Data/Event Data/Event Monday, May 14, 12
  • 12. HTTP Polling Browser Server Ajax Requst #1 Response #1(no data) Timeline Timeline Ajax Requst #2 Response #2(no data) Data/Event Data/Event Ajax Requst #3 Monday, May 14, 12
  • 13. HTTP Polling Browser Server Ajax Requst #1 Response #1(no data) Timeline Timeline Ajax Requst #2 Response #2(no data) Data/Event Data/Event Ajax Requst #3 Response #3(with data) Monday, May 14, 12
  • 16. HTTP Polling Pros 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
  • 28. Piggyback Browser Server Ajax Requst #1 Response #1 Timeline Timeline Ajax Requst #2 Response #2 Data/Event Monday, May 14, 12
  • 29. Piggyback Browser Server Ajax Requst #1 Response #1 Timeline Timeline Ajax Requst #2 Response #2 Data/Event Data/Event Monday, May 14, 12
  • 30. Piggyback Browser Server Ajax Requst #1 Response #1 Timeline Timeline Ajax Requst #2 Response #2 Data/Event Data/Event Ajax Requst #3 Monday, May 14, 12
  • 31. Piggyback Browser Server Ajax Requst #1 Response #1 Timeline Timeline Ajax Requst #2 Response #2 Data/Event Data/Event Ajax Requst #3 Mixed Response #3(with data) Monday, May 14, 12
  • 34. Piggyback Pros 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
  • 40. Comet:http streaming Browser Server Timeline Timeline Monday, May 14, 12
  • 41. Comet:http streaming Browser Server Long-lived Request #1 Timeline Timeline Monday, May 14, 12
  • 42. Comet:http streaming Browser Server Long-lived Request #1 Request is suspended Timeline Timeline Monday, May 14, 12
  • 43. Comet:http streaming Browser Server Long-lived Request #1 Request is suspended Data/Event Timeline Timeline Monday, May 14, 12
  • 44. Comet:http streaming Browser Server Long-lived Request #1 Request is suspended Data/Event Timeline Timeline Response Monday, May 14, 12
  • 45. Comet:http streaming Browser Server Long-lived Request #1 Request is suspended Data/Event Timeline Timeline Response Data/Event Monday, May 14, 12
  • 46. Comet:http streaming Browser Server Long-lived Request #1 Request is suspended Data/Event Timeline Timeline Response Data/Event Data/Event Monday, May 14, 12
  • 47. Comet:http streaming Browser Server Long-lived Request #1 Request is suspended Data/Event Timeline Timeline Response Data/Event Data/Event Response Monday, May 14, 12
  • 48. Comet:http streaming Browser Server Long-lived Request #1 Request is suspended Data/Event Timeline Timeline Response Data/Event Data/Event Response Data/Event Monday, May 14, 12
  • 49. Comet:http streaming Browser Server Long-lived Request #1 Request is suspended Data/Event Timeline Timeline Response Data/Event Data/Event Response Data/Event Data/Event Monday, May 14, 12
  • 50. Comet:http streaming Browser Server Long-lived Request #1 Request is suspended Data/Event Timeline Timeline Response Data/Event Data/Event Response Data/Event Data/Event Response Monday, May 14, 12
  • 52. Comet:http streaming Forever Iframe Monday, May 14, 12
  • 53. Comet:http streaming Forever Iframe Monday, May 14, 12
  • 54. Comet:http streaming Forever Iframe Multipart xhr (multipart/x-mixed-replace) Monday, May 14, 12
  • 55. Comet:http streaming Forever Iframe Multipart xhr (multipart/x-mixed-replace) Monday, May 14, 12
  • 57. Comet:http streaming Pros Monday, May 14, 12
  • 58. Comet:http streaming Pros Save the most bandwidth usage 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
  • 64. Comet:Http Long Polling Browser Server Timeline Timeline Monday, May 14, 12
  • 65. Comet:Http Long Polling Browser Server Long-lived Request #1 Timeline Timeline Monday, May 14, 12
  • 66. Comet:Http Long Polling Browser Server Long-lived Request #1 Request is suspended Timeline Timeline Monday, May 14, 12
  • 67. Comet:Http Long Polling Browser Server Long-lived Request #1 Request is suspended Data/Event Timeline Timeline Monday, May 14, 12
  • 68. Comet:Http Long Polling Browser Server Long-lived Request #1 Request is suspended Data/Event Timeline Timeline Response(#1 Completed) Monday, May 14, 12
  • 69. Comet:Http Long Polling Browser Server Long-lived Request #1 Request is suspended Data/Event Timeline Timeline Response(#1 Completed) Long-lived Request #2 Monday, May 14, 12
  • 70. Comet:Http Long Polling Browser Server Long-lived Request #1 Request is suspended Data/Event Timeline Timeline Response(#1 Completed) Long-lived Request #2 Monday, May 14, 12
  • 71. Comet:Http Long Polling Browser Server Long-lived Request #1 Request is suspended Data/Event Timeline Timeline Response(#1 Completed) Long-lived Request #2 Data/Event Monday, May 14, 12
  • 72. Comet:Http Long Polling Browser Server Long-lived Request #1 Request is suspended Data/Event Timeline Timeline Response(#1 Completed) Long-lived Request #2 Data/Event Data/Event Monday, May 14, 12
  • 73. Comet:Http Long Polling Browser Server Long-lived Request #1 Request is suspended Data/Event Timeline Timeline Response(#1 Completed) Long-lived Request #2 Data/Event Data/Event Response(#2 Completed) Monday, May 14, 12
  • 75. Comet:Http Long Polling Script Tags Monday, May 14, 12
  • 76. Comet:Http Long Polling Script Tags Pros Monday, May 14, 12
  • 77. Comet:Http Long Polling Script Tags Pros No Cross-Domain Messaging Issue 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
  • 83. Comet:Http Long Polling XMLHttpRequest Monday, May 14, 12
  • 84. Comet:Http Long Polling XMLHttpRequest Monday, May 14, 12
  • 86. Comet:Http Long Polling XMLHttpRequest Monday, May 14, 12
  • 87. Comet:Http Long Polling XMLHttpRequest Pros 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
  • 98. WebSockets WebSockets enables bi-direction, full-duplex communication channel like tcp sockets Monday, May 14, 12