1
votes

I'm designing a net-game that needs to support thousands (even tens of thousands) of end users.
* The client side is browser-based.
* The server side "engine" will be based on XMPP with MUC functionalities.
* The game is made of many scenarios (dozens to hundreds), where the end-users (the players) join in order to take part in that scenario.
* Every scenario must have a unique "bot" that controls the flow. For example: player X casts a spell at player Y: the bot receives the "cast spell request" BEFORE the rest of the room, calculates the result and "notifies" the rest of the scenario participants regarding what's done (player X fired, player Y hit...).

My questions are:
1. What XMPP server would fit best for the job?
2. What server-side language can support a near real-time "messaging" for the expected amount of players? (24/7, multiple "rooms" [scenarios], tens of thousands of end users).
3. If we assume that each scenario should be able to host up to 100 users, and that we need a bot to be present in each scenario to respond to the players' actions and "deliver" them to the rest of the participants in that scenario, what would be the best approach:
A. Use MUCs with a bot created for each room, joining as a user, or:
B. Use PubSub or other methods.

1

1 Answers

0
votes

I had a similiar scenario for my project. i used ejabberd as server, and strophejs for client side. On the server side I used java since it was familiar for me. I used whack library. Here are the thing i did.

  1. created an external component which will listen on some particular port.
  2. Whenever a client wants join a game, it will send a message to the component
  3. upon recieving message, the external component creates a new room, and joins in the game as bot.

  4. This component implementation will give listeners for messages, presence notification, etc.So component or bot can act upon each message or presence.

  5. When there are no users left in the rom , room will be shutdown.
    So far I managed complete a working demo, the product is not full yet.me too finding some difficulties..:-)