Apache with Comet Support

前端 未结 2 635
小鲜肉
小鲜肉 2020-12-22 03:50

I\'d like to build a multiplayer web game application in which it supports chat. I presume the application will have to handle hundreds of simultaneous connections.

相关标签:
2条回答
  • 2020-12-22 04:10

    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.

    0 讨论(0)
  • 2020-12-22 04:23

    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.

    0 讨论(0)
提交回复
热议问题