MUC as back end

I use FLEX and a library ti comunicate via xmpp protocol, evrything works ok.

Now i'd like to use xmpp to communicate between processes over TCP as with socket.

1) I'd like to use multiple MUC.
2) I have created various BOTs that responds at a specific command.
3) I test them directly so connection is 1:1

now problem.

A) rooms has to be created only by bots is this possible?
B) I'm not interested in old messages, so can i have problems with memory if I use non persistent room and 0 logging message with mod_muc_*? The question is related to the fact that bots never go out to the room
C) It's a bit triky but can i send a message to evryone in the romm and the Bot can reply only to me, is this correct.
D) how to avoid duplicate bot response on the same question for example i have BOT master and BOT backup, bot backup reply only when bot master is down?

babbomaria wrote: A) rooms

babbomaria wrote:

A) rooms has to be created only by bots is this possible?

Yes, a bot can create a room.

How to create a room: send a presence stanza to a non-existing room.
http://xmpp.org/extensions/xep-0045.html#enter-muc

babbomaria wrote:

B) I'm not interested in old messages,

Then configure:

{modules, [
  {mod_muc, [
    {history_size, 0},
    ...
  ]},
  ...
]}.
babbomaria wrote:

so can i have problems with memory if I use non persistent room and 0 logging message with mod_muc_*? The question is related to the fact that bots never go out to the room

C) It's a bit triky but can i send a message to evryone in the romm

Yes: http://xmpp.org/extensions/xep-0045.html#message

babbomaria wrote:

and the Bot can reply only to me, is this correct.

Yes: http://xmpp.org/extensions/xep-0045.html#privatemessage

babbomaria wrote:

D) how to avoid duplicate bot response on the same question for example i have BOT master and BOT backup, bot backup reply only when bot master is down?

Idea: When master sees a question, it sends the response to the user and to the backup bot. If backup bot sees a question and receives no response from master in 10 seconds, then backup bot sends a response to the user.

Syndicate content