Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 9. Adding Dynamic Interactions U... > Using Google App Engine’s Channel AP...

Using Google App Engine’s Channel API

AJAX code examples, to this point in the chapter, have used a simple and direct request-response model. Although asynchronous, the server needs to respond within 30 seconds. This makes it impossible for the server to reach the client when the client is not asking. Furthermore, developers are encouraged to make the server respond as quickly as possible. A purposely delayed response using the normal App Engine code would not be advisable.

For highly interactive web applications, long polls are increasingly popular. When using a long poll, an AJAX request connects to the server and waits as long as required for a response—far beyond the 30-second limit. This way, when the server has a notification for the client, the client receives it instantaneously, with no lag from an update polling interval.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial