Chapter 9. Comet

Earlier in the book we discussed how Ajax changed the nature of the Web by freeing users from the traditional click-and-wait paradigm. Although it improves the user experience, Ajax still uses the standard HTTP model: the client sends a request for resources to the server, which is answered by a response from the server with the requested resources (or an error message if they are not available). This is called a pull method of communication.

In the pull architecture, the client is in control. Communication begins when the client makes a request and ends when the client receives the response. The pull architecture is how the Web has always worked, but as it continues to evolve and user expectations rise, this communication method is increasingly becoming a burdensome hurdle.

Consider a typical chat client such as Yahoo! Messenger. This type of client uses a push architecture, allowing the server to push information out to the client whenever necessary. The result is fast communication because data is being sent as soon as it is available. If chat clients used a pull architecture, their performance would suffer, and there would be significantly more network traffic as the client repeatedly polled to see if new data was available. Since the nature of chat is such that new data may be available several times a second, the push architecture is much more suitable for this purpose.

Given the speed and usability advantages of push architectures, web developers have begun investigating means by which the same functionality can be realized on the Web. Ajax was just the beginning; the next step is going beyond traditional HTTP to implement push-based web systems using one or more of several new techniques. Alex Russell coined the term Comet to describe the evolving push architecture of the web (Comet is a tongue-in-cheek jab at Ajax, since both are also household cleaners).

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset