Apache with Comet Support

我与影子孤独终老i 提交于 2019-11-29 17:04:37

When you have a shared hosting environment and there are a number of restrictions enforced then it's a good idea to outsource the realtime functionality. I would say this since I work for one such company, Pusher. But I hope others will back me up on this.

When using a hosted solution you can push a notification by making a HTTP request to a RESTful API. The service will then deliver the message to the connected Web Client (browser). The browser does need to include a script tag or use a library that also connects to the hosted service.

The main benefits are:

  • No installation or maintenance
  • No need to handle persistent connections - no resource usage
  • Really simple usage: Script tag in app and call REST API
  • The hosted solution handles scaling

Also, here's a list of hosted realtime solutions.

So you can use Python. Then you can use Tornado. (psst... facebook uses it)

And I had same problem with open connections. Just don't spend time for search solution in PHP - later you will be sorry. I was. Just use what is made for Comet. If you more prefere JAVA, then there is: CometD.

And for game get a normal hosting. They cheap this days.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!