concept Comet in category ejb

This is an excerpt from Manning's book EJB 3 in Action, Second Edition.
The AJAX approach we discussed in the last section works perfectly for situations where the client needs to request information from the server, but it’s not a good solution for situations where the server needs to push events back to the client. The client can use AJAX to poll the server, but this isn’t an ideal solution for several reasons, including excessive network traffic and latency. Comet isn’t a well-defined standard but rather a technique whereby existing web technologies are used to provide server-side push within the limitations of HTTP 1.1. The limitations of HTTP 1.1, of course, are the lack of support for long-lived connections whereby the server can push data back to the client. This is the problem that WebSockets solves.
There are several approaches to implementing Comet that can be grouped into either streaming or long-polling. This is nicely broken down in an article on IBM developerWorks.[1] This article describes how each approach works and provides code samples. We’ll describe the two different approaches at a high level and contrast the technology with WebSockets. Actually implementing a Comet solution is beyond the scope of this section and you’ll definitely want to use WebSockets.
1 Carbou, Mathieu. “Reverse Ajax, Part 1: Introduction to Comet.” IBM developerWorks, July 19, 2011, http://www.ibm.com/developerworks/library/wa-reverseajax1/.