需要有关彗星的帮助以及选择什么

发布于 2024-08-23 07:22:21 字数 212 浏览 1 评论 0原文

我是 comet 的新手,但我读过它,并且我意识到 PHP 不利于 comet 长轮询。

我的所有项目都是用 CodeIgniter PHP 框架编写的,所以我所有的代码都是 PHP。但我需要每秒请求数据来更新拍卖产品,并且我正在寻找 comet,但由于 PHP 是一个不好的 comet 方式,我该怎么办?

还可以从 MySQL 读取并发送给监听器吗?

谢谢。

I'm new to comet, but I have read about it and I realize that PHP is bad for comet long polling.

All of my project is written in CodeIgniter PHP Framework, so all my code is PHP. But I need request data all seconds to update auctions products, and I'm looking for comet, but as PHP is a bad way to comet, how can I do it?

also it is possible to read from MySQL and send to listener?

Thanks.

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

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

发布评论

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

评论(2

孤凫 2024-08-30 07:22:21

一种解决方案是Ajax Push Engine - 他们提供自己的服务器来处理与客户端的连接,但是您可以使用任何后端向 APE 提供数据 - 包括 PHP。您还可以直接使用 MySQL - 请参阅示例 one两个注意: APE 服务器只能在 Linux、BSD 或 Mac OS X 上运行(不过,似乎应该可以移植到 Windows,因为它是用纯C,AFAICT)。

另一种是 NGiNX_HTTP_Push_Module - 您使用 nginx 作为推送服务器(不需要运行额外的服务器,例如这是 APE 的情况)并且该协议很容易使用/直接恕我直言。

One solution is Ajax Push Engine - they dish out their own server for handling the connections with clients, but you can use whatever backend to feed data to APE - including PHP. You can also work with MySQL directly - see example one and two. Note: the APE server can only be run on Linux, BSD or Mac OS X (though, it would seem that a port to Windows should be possible, since it's written in pure C, AFAICT).

The other one is NGiNX_HTTP_Push_Module - you use nginx as your push server (no need for an extra server running, like it's in APE's case) and the protocol is easy to work with/straightforward IMHO.

许一世地老天荒 2024-08-30 07:22:21

另一种选择是托管 Comet SaaS 解决方案,例如 WebSync On-Demand。它很便宜,而且因为它是托管的,所以没有服务器要求。

有一个 PHP SDK 用于集成数据推送。

[免责声明:我在那里工作]

Another options would be a hosted comet SaaS solution, such as WebSync On-Demand. It's cheap, and because it's hosted doesn't have server requirements.

There's a PHP SDK for integrating your data push.

[Disclaimer: I work there]

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