Needs
I have the following scenario:
- ~100 thousand players
- 50 admins
Each player may have 1:1 conversations with each admin; a player may even have 1:1 conversations with all admins at the same time in separate conversations.
But at any time the admin of one of these conversations may invite another (or many) admin into one of these thousands of conversations.
Additional:
- ALL messages stored with MAM with
default:always
- Stream Management with
resend_on_timeout:true
. - A player cannot message another player
Example:
- Let's say player 1 has 3 active separate conversations
P1:Admin A, P1:Admin G, P1:Admin H
- Then admin A invites Admin H into the
P1:Admin A
conversation (the fact that Admin H was invited into Admin A's conversation won't close the activeP1:Admin H
conversation), player will then have these active conversations:P1:Admin A + Admin H
,P1:Admin G
,P1:Admin H
Solution #1: Muc Rooms
I am thinking in making all conversations into private non-discoverable MUC rooms (when an user wants to chat with an admin, the client will issue a custom IQ that an ejabberd module that I'll develop will handle and create the room, putting the player and admin automatically whitelisted in this new room).
For the example scenario that could mean 5 million MUC rooms. I know 5 million normal chats is a common scenario, but is it ok to have this amount of rooms?
Solution #2: XEP-0033 Extended Stanza Addressing
For this solution I was thinking of having messages to be identified to be part of a room with an extended element channel
. This way recipients may enter and go a conversation.
But this doesn't have the security control of MUC rooms, which only whitelisted users may talk in a channel. Is there a way to overcome this privacy thing with this approach?
An example using the channel
element:
P1:Admin A + Admin B, room 1
<message to='header.org' from='player1'>
<addresses xmlns='http://jabber.org/protocol/address'>
<address type='to' jid='adminA'/>
<address type='to' jid='adminB'/>
</addresses>
<channel xmlns='chanel:namespace' id='1'>
<body>Hi admin A and admin B!</body>
</message>
Admin B lefts, P1:Admin A, still room 1
<message to='header.org' from='player1'>
<addresses xmlns='http://jabber.org/protocol/address'>
<address type='to' jid='adminA'/>
</addresses>
<channel xmlns='chanel:namespace' id='1'>
<body>Hi admin A only on the same room!</body>
</message>
Final solution?
Considering that client and server customisation is not a problem... Which solution is the best, considering all requirements? Or is there another optimal solution?