有哪些用 Python 编写的现代 Comet 服务器?

发布于 2024-11-17 14:17:59 字数 200 浏览 3 评论 0 原文

我已经用 python 构建了我的应用程序(使用 eventlent 中的 greenthreads),并且我应该使用 Orbited 作为 comet 服务器将来自用户端 javascript 代码的请求传递到我的应用程序。

遗憾的是,我发现 Orbited 已经死了,网站关闭了几周,而且缺乏 python 2.7 支持。

您能推荐一些好的替代品吗?

I've built my application in python (using greenthreads from eventlent) and I was supposed to use Orbited as comet server to pass requests from user-end javascript code to my application.

Sadly, I found that Orbited is dead, site is down for a few weeks and it lack python 2.7 support.

Could you recommend some good replacements?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

天气好吗我好吗 2024-11-24 14:17:59

您可以使用 geventmeinheldmongrel2龙卷风扭曲uwsgi,所有这些都有长轮询示例。此列表并不详尽。您还可以考虑使用 WebSocket,其中一些也有 WebSocket 示例。

You could build a comet server using gevent, meinheld, mongrel2, tornado, twisted, or uwsgi, all of which have long-polling examples. This list isn't exhaustive. You could also consider using WebSockets instead, several have WebSocket examples as well.

眼角的笑意。 2024-11-24 14:17:59

我个人没有使用过它,但似乎 CometD 有一个基于 Twisted 的实现 其协议。

I haven't used it personally, but it seems that CometD has a Twisted-based implementation of its protocol.

于我来说 2024-11-24 14:17:59

看来目前最好的选择是使用 Socket.io,它在服务器端和客户端。 python 选项是:

It seems that for now the best option is to use Socket.io, which offer simple and feature-rich programming interface both on server and client side. The python options are:

孤寂小茶 2024-11-24 14:17:59

http://meteorserver.org/

当您正在寻找用以下语言编写的服务器时,这可能不会注册为答案Python。尽管如此,我还是会推荐这个用 Perl 编写的高效服务器。毕竟,恕我直言,作为一个开箱即用/现成的解决方案,它与任何其他基于 Python 的服务器一样好。

http://meteorserver.org/

Probably that won't register as an answer as you are looking for a server written in Python. Still, I would recommend this efficient server written in Perl. After all, IMHO, as an out-of-the-box/off-the-shelf solution it's as good as any other Python-based server can get.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文