[Standards-JIG] An XMPP Race Condition most Vexing

Matthias Wimmer m at tthias.eu
Sat Oct 28 00:33:11 UTC 2006

Hi Chris!

Chris Mullins schrieb:
> In the XMPP world, we already see this sometimes:
> - Two users exchange presence subscriptions over an s2s link. 
> - during that exchange, server2 goes down, but server 1 has already sent the message. 
> - Server 1 will never resend the message. Server 2 will never process the message.
> - How often do we see goofed up Roster Items as a result of this? Pretty often, if my jabber.org roster is any indication.

If you see this that often, you may be using the wrong software on the
server. ;)
In jabberd14 these problems are solved and subscription states are
syncronized automatically without the need of the other server to have
support for that.

I think I described how this works about a year ago. (Short: if you
receive a presence probe, but the probing sender is not subscribed, then
send unsubscribed; if you receive a presence stanza you are not
interested in, then send unsubscribe.)

(BTW: When implementing this algorithm do not only check against the
user's roster, but also against the directed presences a user has sent,
else you get problems with conferencing. - Also take care that you
handle non-existant users the same as users without a subscription, else
you get vulnerable to a dictionary attack.)

Tot kijk

Matthias Wimmer      Fon +49-700 77 00 77 70
Züricher Str. 243    Fax +49-89 95 89 91 56
81476 München        http://ma.tthias.eu/

More information about the Standards mailing list