powered by Jive Software

Process flow for gateway presence

Hey Guys:

It was a couple of weeks ago now that we discussed in the chat as far as that the presence sent by a gateway was not being processed by the server. In other words, only if the gateway directed the presence to the user would the presence get through. This creates an issue if the gateway does not outlive the server process, even though the generally expected behavior is for it to outlive it. I was perusing the Gateway Interaction JEP when I found this in section 8, under buisness rules:

Existing gateway implementations do not strictly adhere to the bi-directional nature of Jabber presence notifications, since they do not broadcast presence from the gateway itself to registered users of the gateway, but rather wait for a registered user to send presence to the gateway before sending presence to the user. This sidesteps scalability challenges but may be sub-optimal; while this JEP does not require existing gateways to change their current behavior, it does RECOMMEND that they broadcast presence notifications to registered users in accordance with the standard Jabber presence model. Specifically:

*On startup, a gateway (1) SHOULD send presence to all registered users of that gateway but (2) MAY wait to receive presence changes from each registered user.

*On shutdown, a gateway SHOULD send unavailable presence to all registered users of the gateway.

So, it looks like the gateway should send the updated presence to all of its registered users and it should not in fact be handled by the server as was my original arugment. Just wanted to post that for anyone who might run into the same troubles.