SlideShare ist ein Scribd-Unternehmen logo
1 von 99
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Andere mochten auch

Masters of SlideShare
Masters of SlideShareMasters of SlideShare
Masters of SlideShareKapost
 
STOP! VIEW THIS! 10-Step Checklist When Uploading to Slideshare
STOP! VIEW THIS! 10-Step Checklist When Uploading to SlideshareSTOP! VIEW THIS! 10-Step Checklist When Uploading to Slideshare
STOP! VIEW THIS! 10-Step Checklist When Uploading to SlideshareEmpowered Presentations
 
Getting Started With SlideShare
Getting Started With SlideShareGetting Started With SlideShare
Getting Started With SlideShareSlideShare
 
How To Get More From SlideShare - Super-Simple Tips For Content Marketing
How To Get More From SlideShare - Super-Simple Tips For Content MarketingHow To Get More From SlideShare - Super-Simple Tips For Content Marketing
How To Get More From SlideShare - Super-Simple Tips For Content MarketingContent Marketing Institute
 
Dear NSA, let me take care of your slides.
Dear NSA, let me take care of your slides.Dear NSA, let me take care of your slides.
Dear NSA, let me take care of your slides.Emiland
 
What Makes Great Infographics
What Makes Great InfographicsWhat Makes Great Infographics
What Makes Great InfographicsSlideShare
 
10 Ways to Win at SlideShare SEO & Presentation Optimization
10 Ways to Win at SlideShare SEO & Presentation Optimization10 Ways to Win at SlideShare SEO & Presentation Optimization
10 Ways to Win at SlideShare SEO & Presentation OptimizationOneupweb
 
A Guide to SlideShare Analytics - Excerpts from Hubspot's Step by Step Guide ...
A Guide to SlideShare Analytics - Excerpts from Hubspot's Step by Step Guide ...A Guide to SlideShare Analytics - Excerpts from Hubspot's Step by Step Guide ...
A Guide to SlideShare Analytics - Excerpts from Hubspot's Step by Step Guide ...SlideShare
 
What I Carry: 10 Tools for Success
What I Carry: 10 Tools for SuccessWhat I Carry: 10 Tools for Success
What I Carry: 10 Tools for SuccessJonathon Colman
 
Pinterest Your Resume!
Pinterest Your Resume!Pinterest Your Resume!
Pinterest Your Resume!MARKITECT.me
 
2015 Upload Campaigns Calendar - SlideShare
2015 Upload Campaigns Calendar - SlideShare2015 Upload Campaigns Calendar - SlideShare
2015 Upload Campaigns Calendar - SlideShareSlideShare
 
What to Upload to SlideShare
What to Upload to SlideShareWhat to Upload to SlideShare
What to Upload to SlideShareSlideShare
 
How to Make Awesome SlideShares: Tips & Tricks
How to Make Awesome SlideShares: Tips & TricksHow to Make Awesome SlideShares: Tips & Tricks
How to Make Awesome SlideShares: Tips & TricksSlideShare
 
Legal Issues for the Entrepreneur
Legal Issues for the EntrepreneurLegal Issues for the Entrepreneur
Legal Issues for the Entrepreneuramitgehi83
 
Care of patient in acute biologic crisis
Care of patient in acute biologic crisisCare of patient in acute biologic crisis
Care of patient in acute biologic crisisTosca Torres
 
The Ultimate Guide to Creating Visually Appealing Content
The Ultimate Guide to Creating Visually Appealing ContentThe Ultimate Guide to Creating Visually Appealing Content
The Ultimate Guide to Creating Visually Appealing ContentNeil Patel
 
Anatomy of a Container: Namespaces, cgroups & Some Filesystem Magic - LinuxCon
Anatomy of a Container: Namespaces, cgroups & Some Filesystem Magic - LinuxConAnatomy of a Container: Namespaces, cgroups & Some Filesystem Magic - LinuxCon
Anatomy of a Container: Namespaces, cgroups & Some Filesystem Magic - LinuxConJérôme Petazzoni
 

Andere mochten auch (19)

Masters of SlideShare
Masters of SlideShareMasters of SlideShare
Masters of SlideShare
 
STOP! VIEW THIS! 10-Step Checklist When Uploading to Slideshare
STOP! VIEW THIS! 10-Step Checklist When Uploading to SlideshareSTOP! VIEW THIS! 10-Step Checklist When Uploading to Slideshare
STOP! VIEW THIS! 10-Step Checklist When Uploading to Slideshare
 
Getting Started With SlideShare
Getting Started With SlideShareGetting Started With SlideShare
Getting Started With SlideShare
 
How To Get More From SlideShare - Super-Simple Tips For Content Marketing
How To Get More From SlideShare - Super-Simple Tips For Content MarketingHow To Get More From SlideShare - Super-Simple Tips For Content Marketing
How To Get More From SlideShare - Super-Simple Tips For Content Marketing
 
Dear NSA, let me take care of your slides.
Dear NSA, let me take care of your slides.Dear NSA, let me take care of your slides.
Dear NSA, let me take care of your slides.
 
What Makes Great Infographics
What Makes Great InfographicsWhat Makes Great Infographics
What Makes Great Infographics
 
You Suck At PowerPoint!
You Suck At PowerPoint!You Suck At PowerPoint!
You Suck At PowerPoint!
 
10 Ways to Win at SlideShare SEO & Presentation Optimization
10 Ways to Win at SlideShare SEO & Presentation Optimization10 Ways to Win at SlideShare SEO & Presentation Optimization
10 Ways to Win at SlideShare SEO & Presentation Optimization
 
A Guide to SlideShare Analytics - Excerpts from Hubspot's Step by Step Guide ...
A Guide to SlideShare Analytics - Excerpts from Hubspot's Step by Step Guide ...A Guide to SlideShare Analytics - Excerpts from Hubspot's Step by Step Guide ...
A Guide to SlideShare Analytics - Excerpts from Hubspot's Step by Step Guide ...
 
What I Carry: 10 Tools for Success
What I Carry: 10 Tools for SuccessWhat I Carry: 10 Tools for Success
What I Carry: 10 Tools for Success
 
Pinterest Your Resume!
Pinterest Your Resume!Pinterest Your Resume!
Pinterest Your Resume!
 
2015 Upload Campaigns Calendar - SlideShare
2015 Upload Campaigns Calendar - SlideShare2015 Upload Campaigns Calendar - SlideShare
2015 Upload Campaigns Calendar - SlideShare
 
What to Upload to SlideShare
What to Upload to SlideShareWhat to Upload to SlideShare
What to Upload to SlideShare
 
How to Make Awesome SlideShares: Tips & Tricks
How to Make Awesome SlideShares: Tips & TricksHow to Make Awesome SlideShares: Tips & Tricks
How to Make Awesome SlideShares: Tips & Tricks
 
Legal Issues for the Entrepreneur
Legal Issues for the EntrepreneurLegal Issues for the Entrepreneur
Legal Issues for the Entrepreneur
 
Care of patient in acute biologic crisis
Care of patient in acute biologic crisisCare of patient in acute biologic crisis
Care of patient in acute biologic crisis
 
The Ultimate Guide to Creating Visually Appealing Content
The Ultimate Guide to Creating Visually Appealing ContentThe Ultimate Guide to Creating Visually Appealing Content
The Ultimate Guide to Creating Visually Appealing Content
 
Employee Discipline and Grievance Handling
Employee Discipline and Grievance HandlingEmployee Discipline and Grievance Handling
Employee Discipline and Grievance Handling
 
Anatomy of a Container: Namespaces, cgroups & Some Filesystem Magic - LinuxCon
Anatomy of a Container: Namespaces, cgroups & Some Filesystem Magic - LinuxConAnatomy of a Container: Namespaces, cgroups & Some Filesystem Magic - LinuxCon
Anatomy of a Container: Namespaces, cgroups & Some Filesystem Magic - LinuxCon
 

Kürzlich hochgeladen

Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024The Digital Insurer
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 

Kürzlich hochgeladen (20)

Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

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