Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
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.