彗星和jQuery [英] Comet and jQuery

查看:138
本文介绍了彗星和jQuery的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经用javascript进行了一些关于服务器推送的研究,并且发现普遍的共识是,我正在寻找的是彗星设计模式。在jQuery之上构建了这种模式的好的实现方法吗?如果没有,这个模式有没有好的实现?不管这些问题的答案如何,有没有关于这个模式的文档从一个实现的立场?

I've done some research into server push with javascript and have found the general consensus to be that what I'm looking for lies in the "Comet" design pattern. Are there any good implementations of this pattern built on top of jQuery? If not, are there any good implementations of this pattern at all? And regardless of the answer to those questions, is there any documentation on this pattern from an implementation stand-point?

推荐答案

我写了Till提到的插件该插件是 Bayeux 协议的实现,目前支持长轮询(通过AJAX的本地服务器)和回调轮询(通过XSS的远程服务器)。有一个 Bayeux 实现的Python称为cometd-twisted,我听说我的插件工程,但我还没有验证这个。我已经通过测试和验证,它与 cometd-jetty erlycomet ,其中包含一个jQuery Comet示例。有关我的博客的更多信息,当前有基本聊天示例的代码可以在其 Google代码页。希望这个信息是有帮助的,如果需要任何进一步的插件帮助,请随时与我联系。

I wrote the plugin mentioned by Till. The plugin is an implementation of the Bayeux protocol and currently supports long-polling (local server via AJAX) and callback-polling (remote server via XSS). There is a Bayeux implementation for Python called cometd-twisted that I have heard my plugin works with, but I have not verified this. I have tested and verified it works with cometd-jetty and erlycomet which has a jQuery Comet example included. There is more info on my blog and the current code with a basic chat example can be found on its google code page. Hope this info is helpful and feel free to contact me if need any further help with the plugin.

这篇关于彗星和jQuery的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆