0

Is it possible to create a multi user char room from a xmpp component, beeing able to broadcast messages over the room but not receiving any presence or message stanzas from it?

The Background: I making a component for a turn based game. When a game is started, the component should create a multi user chat room so that all players (and observers) can chat while playing the game. When a player makes a turn, it sends it to the component which forwards it (after testing it) to the multi user chat to broadcast it to all players and observers. But the component is not interested on any char or presence messages happening in the multi user chat room and these would create unnecessary load on the component side (which should handle many games at once).

Nathan
  • 7,099
  • 14
  • 61
  • 125
  • 2
    May I suggest a more appropriate XMPP extension for "game turns" (I would even consider using it for in-game chat): [XEP-60 Publish-Subscribe](http://xmpp.org/extensions/xep-0060.html). – Flow Feb 04 '14 at 12:44
  • Looking at [XEP-60-Publish-Subscribe](http://xmpp.org/extensions/xep-0060.html) you are right, it seems appealing for game turns! But for ingame char? There everyone wants to send messages to everyone, so publish-subscribe does not make sense, or am I overseeing something? – Nathan Feb 04 '14 at 13:26
  • What do you think prevents pubsub from doing so? Every subscribed JID will be notified about new nodes, thats exactly what your chat use case describes. – Flow Feb 04 '14 at 13:29
  • 1
    Mmh, I am not sure if we understand each other. For the "chat" part, I just want every user to be able to send text messages, that all users receive. Which is exactly what a multi user chat does. – Nathan Feb 04 '14 at 15:40
  • 1
    Right, but PubSub does the same with a better design. You could easily achieve the same that MUC does by using PubSub. After all, it's just "broadcasting" stanzas to interested parties. – Flow Feb 04 '14 at 15:48
  • Ok, I got my answer in a comment, which is "use pubsub". It answers what I wanted perfectly, but does 100% suite the question. Should I just leave the question open? – Nathan Feb 04 '14 at 16:24
  • Depends, your problem was that you put a part of the solution ("using MUC") in the question. Instead of asking what you really wanted to know "How can I use XMPP for a turn based game and in-game chat?". – Flow Feb 04 '14 at 16:34
  • What I really wanted to know was "How can I use XMPP for a turn based game and in-game chat?". I thought MUC would be a good Idea (which I do not think anymore). – Nathan Feb 04 '14 at 20:32
  • Feel free to edit your question. – Flow Feb 04 '14 at 22:24

0 Answers0