Thanks for the information, too.<br>Now all we can do is to make the client as fault-tolerant as possible :) <br><br><div><span class="gmail_quote">On 19/06/07, <b class="gmail_sendername">Sylvain Hellegouarch</b> <<a href="mailto:sh@defuze.org">
sh@defuze.org</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Thanks for this summary because I've been reading these sections of RFC
<br>3921 *a lot* and there are so many different combinations that I lose it<br>quickly.<br><br>/me pokes psa too. A diagram of all the different interactions would go<br>a long way /me thinks<br><br>- Sylvain<br><br>Mridul Muralidharan a écrit :
<br>><br>> Hi,<br>><br>> I think Peter is in the process of clarifying the bis spec on the<br>> subscription appendix's. /me pokes psa :)<br>> It might be a good idea to wait for that to be complete ... currently,
<br>> the state of specs is a bit icky from an impl point of view (though<br>> well defined).<br>><br>> Roughly, 3921 says these :<br>><br>> - a user can add any contact to his roster, this does not trigger a
<br>> presence subscription request - but a roster push(*) will occur.<br>><br>> - a user can ask for subscription to contact : (if contact is not in<br>> the user's roster (step 1 omitted), it gets automatically added) this
<br>> triggers a roster push(*) with change in subscription status (ask<br>> attribute).<br>><br>> - if contact is online, subscribe is pushed to all available resources<br>> using rules similar to roster push(*).
<br>><br>> - if contact is offline or no resource is available which satisfies<br>> rule for roster push(*), this is stored for later delivery.<br>><br>> - if contact rejects subscription (unsubscribed), this triggers a
<br>> roster update in user's roster appropriately (must not result in<br>> removal of entry - I see that some servers remove the contact's jid<br>> from user roster) and a corresponding roster push(*).<br>
><br>> - 3921 says that the unsubscribed must be delivered to the user's<br>> resources(*).<br>><br>> (*) The roster push above will happen only to all resources which have<br>> requested (or modified) roster in some way (including asking for
<br>> subscription).<br>><br>> Similar steps above when contact's approves subscription.<br>><br>> The state table related to inbound unsubscribe, unsubscribed and<br>> subscribed could be changed for 3921 bis spec (it has already been
<br>> changed for subscribed). If I am not wrong, the last step above would<br>> not happen - that is, unsubscribe(d) will not be routed to the user.<br>><br>> Here, I assumed that there is no subscription between user & contact,
<br>> if that is present, it just adds more to the flow - refer to section 9<br>> in 3921 [1]<br>><br>> Hope this clarifies. The steps above are the same irrespective of<br>> whether it is a local contact, s2s contact, clustered configuration or
<br>> other combinations.<br>><br>> Regards,<br>> Mridul<br>><br>> [1] <a href="http://www.xmpp.org/rfcs/rfc3921.html#substates">http://www.xmpp.org/rfcs/rfc3921.html#substates</a><br>><br>> Tran Thai Son wrote:
<br>>> Hi all,<br>>><br>>> I am writing a client and I've experienced different behaviors from<br>>> different servers in handling client's actions such as add / accept /<br>>> deny subscription requests. What surprised me is that it seems there
<br>>> is no standard behaviors ( e.g. processes of treating actions, order<br>>> of notification messages pushing to the clients...) for the server.<br>>><br>>> E.g.:<br>>> - ejabbered 1.1.3
always adds the incoming contact to the user's<br>>> roster (with the subscription status = 0, means no relationship)<br>>> before pushing the subscription (add-friend) request to the user. So<br>>> the client gets two messages: one to notify that there is an item
<br>>> added, the next to notify that there is a subscription request.<br>>> - meanwhile, openFire 3.3.1 does not add the contact before, so you<br>>> get only the later message. One (probably) bug I found: even when the
<br>>> client sent a message denying the subscription request, the server<br>>> still adds the contact to the user's roster (with subscription= 0)<br>>><br>>> Furthermore, with the same actions from the clients, the number and
<br>>> order of messages that the servers send significantly different.<br>>> E.g.<br>>> - ejabbered 1.1.3 tends to not to send any message to the contact<br>>> with subscription = 0. Example: If user B denied a subscription
<br>>> request from user B (means no relationship at the moment), B will not<br>>> receive the next unsubscription request from A, but with openFire<br>>> 3.3.1, it will.<br>>> - Furthermore, I found the order of messages that openFire pushes to
<br>>> the clients rather annoying. For example, if user A removes user B<br>>> from its roster (and therefore B will also remove A - my<br>>> implementation), A will receive "unsubscribed" and "unsubscribe"
<br>>> (respectively) from B before received the notification that its<br>>> removal was done. So you cannot trust that: when you remove a contact<br>>> from your roster, you won't receive unexpected message from that
<br>>> contact; You also see that contact still in your roster for a while<br>>> (with subscription = 0).<br>>><br>>> Does any body experience similar problems ?<br>>><br>>> Son.<br>>>
<br>>><br>>><br><br></blockquote></div><br>