开发者

Need help with comet, and what to choose

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 fr开发者_运维技巧om MySQL and send to listener?

Thanks.


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.


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]

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜