views:

113

answers:

2

I'm planning an XMPP bot system in which a bot is "attached" to a Rails app in background to receive commands and so on. Is is appropriate to use the same account for all apps (40+) and just changed the resource part, like this:

account@host/bot1
account@host/bot2
account@host/bot2

or use totally different JIDs, like:

account1@host
account2@host
account3@host

Pros/cons? Thanks for any feedback!

+2  A: 

I'm still learning about this myself, but I've observed that implementing the bots as resources associated with the same bare JID has some characteristics:

  • XMPP servers may route Message stanzas (but not IQs or Presence stanzas) addressed to one resource to another resource which shares the same JID if delivery fails

  • The Jabber Session Manager component seems to maintain roster information on the bare JID level, so all the bots will share a XMPP

+1  A: 

You want to use unique JIDs, and not reuse same bare JID and change the resource. As Mitch described, sometimes the packet will go to the bare JID, sometimes the full JID. If you're already writing a Robot Army, make a setup script and register the unique names to create the accounts for the Army. It'll test that component as a bonus.

You will drive yourself crazy in 90% of your testing if you just change the resource name.

A. R. Diederich