Comet and jQuery
Query:
Exploring the possibilities of server-push with JavaScript, research has identified the Comet design pattern as a potential solution. Within the jQuery framework, are there any notable implementations of this pattern, if not, are there any viable implementations available? Further, is there accessible documentation on implementing the Comet pattern in practice?
Answer:
In response to your inquiry, I'm the developer of the jQuery Comet plugin mentioned by Till. This plugin utilizes the Bayeux protocol and offers support for both long-polling (via AJAX on local servers) and callback-polling (via XSS on remote servers).
While I've received anecdotal evidence of compatibility with cometd-twisted (a Python implementation of Bayeux), I have not personally verified this. However, the plugin has been tested and confirmed to work with cometd-jetty and erlycomet, the latter of which includes a sample jQuery Comet implementation.
For further information, you can refer to my blog and the Google Code page associated with the plugin. A simple chat example is also available on the Code page. I'm also open to providing assistance if you have any additional questions about the plugin.
The above is the detailed content of Does jQuery Offer Comet Pattern Implementations?. For more information, please follow other related articles on the PHP Chinese website!