[jdev] how to program a jabber game server
Mridul
mridul at sun.com
Fri Feb 9 07:04:17 CST 2007
Norman Rasmussen wrote:
> On 2/9/07, Richard Dobson <richard at dobson-i.net> wrote:
>> How? How is the bot going to be able to create all of the extra
>> resources required on all servers consistently without having to make
>> multiple connections? Plus, how is that bot going to host multiple games
>> at once? I cant see how it can.
>
> Some servers allow you to send messages 'from' any resource (as long
> as the bare jid matches your authenticated jid). This seems to be
> very implementation specific though.
And that would be a bug imo. You can send stanzas only from your bound
jid or the bare jid.
>
> You would need to create one connection per room though, where as a
> component would used a single connection for the entire domain. (but
> it sounds like you'd like to load components dynamically (which
> servers like jabberd2 support, btw)
>
I dont understand the connection part - client has a single xmpp session
the server, conference component has a single xmpp session to the
server, any third party bot/whatever will have a single xmpp session
with the server ...
How it manages the data from/to is up to it.
If it is a muc - then the node/resource allows it to identify
room/participants.
If it is a simple bot, then some other data : like metadata within the
payload for example, will allow it to identify sender/reciepent. In this
case, you are using xmpp as a messaging bus : and like applications
which use a bus (jms , etc), the bot will have its own state management.
Regards,
Mridul
More information about the JDev
mailing list