[standards-jig] Roster behaviour in IETF document

Peter Saint-Andre stpeter at jabber.org
Mon Aug 19 14:55:50 UTC 2002


First, thanks for checknig the CVS version before posting your question.
:)

I think your concern is misplaced, but perhaps I need to describe this
more clearly in the docs. (BTW, I once wrote a more detailed document
about subscriptions and rosters because it's rather complicated, but I
kept that out of the IETF drafts. I may introduce a topic about this on
the Jabber-IETF list, i.e., how much detail to include about rosters +
subscriptions in the IETF docs.)

When you send the roster update to the server, the server first performs
the roster update in persistent storage. So that is what you see here:

<iq type="set" id="roster_2">
  <query xmlns="jabber:iq:roster">  
    <item 
        name="Nurse" 
        jid="nurse at capulet.com">
      <group>Servants</group>
    </item>
</iq>
<iq type="result" id="roster_2"/>

Now what happens next is that the server does an IQ set back to any
connected resource associated with the account of the person who did the
original roster update. So in the example from the IETF doc, the server
sends the following XML to both connected resources associated with
juliet at capulet.com....

<iq type="set" id="roster_3" to="juliet at capulet.com/balcony"/>
  <query xmlns="jabber:iq:roster">  
    <item 
        name="Nurse" 
        jid="nurse at capulet.com">
      <group>Servants</group>
    </item>
</iq>
<iq type="set" id="roster_3" to="juliet at capulet.com/chamber"/>
  <query xmlns="jabber:iq:roster">  
    <item 
        name="Nurse" 
        jid="nurse at capulet.com"
        subscription="none">
      <group>Servants</group>
    </item>
</iq>

You can see that this is a separate roster push sent from server to client
*after* the roster update has already taken place in persistent storage.

HTH,

Peter

--
Peter Saint-Andre
Jabber Software Foundation
http://www.jabber.org/people/stpeter.html

On Sat, 17 Aug 2002, Tijl Houtbeckers wrote:

> In the IETF documents on XMPP Instant Messaging on this spot:
> 
> http://www.jabber.org/ietf/draft-miller-xmpp-im-00.html#roster-login
> 
> it talks about adding people to your roster. I'm a bit worried about 
> what I see here. What frightens me (besides the fact that advanced 
> Jabber AI technology figures out our id naming scheme and tag the 
> updates with an id="roster_3") is that the result IQ packet is send 
> *before* the updates to the roster. In practice, thankfully this is 
> done the other way around, but since this is a pretty official document 
> does it mean that in the future I can not count on this behaviour? 
> 
> the CVS version on:
> 
> http://www.jabberstudio.org/cgi-bin/viewcvs.cgi/ietf/draft-miller-xmpp-
> im-00.xml 
> 
> still has it like this as well.
> 
> The example XML given looks like this:
> 
> >At any time, a node MAY add an item to its roster.
> >
> >Node adds a new item:
> >
> ><iq type="set" id="roster_2">
> >  <query xmlns="jabber:iq:roster"> 
> >    <item
> >        name="Nurse"
> >        jid="nurse at capulet.com">
> >      <group>Servants</group>
> >    </item>
> ></iq>
> >       
> >
> >The host is responsible for updating the roster information in 
> >persistent storage, and also for pushing that change out to all 
> >connected resources for the node using an iq element of type "set". 
> >This enables all connected resources to remain in sync with the host-
> >based roster information. 
> >
> >Host replies with an IQ result to the sending resource and pushes the 
> >updated roster information to all connected resources: 
> >
> ><iq type="result" id="roster_2"/>
> ><iq type="set" id="roster_3" to="juliet at capulet.com/balcony"/>
> >  <query xmlns="jabber:iq:roster"> 
> >    <item
> >        name="Nurse"
> >        jid="nurse at capulet.com">
> >      <group>Servants</group>
> >    </item>
> ></iq>
> ><iq type="set" id="roster_3" to="juliet at capulet.com/chamber"/>
> >  <query xmlns="jabber:iq:roster"> 
> >    <item
> >        name="Nurse"
> >        jid="nurse at capulet.com"
> >        subscription="none">
> >      <group>Servants</group>
> >    </item>
> ></iq>
> 
> 
> 
> 
> 
> _______________________________________________
> Standards-JIG mailing list
> Standards-JIG at jabber.org
> http://mailman.jabber.org/listinfo/standards-jig
> 




More information about the Standards mailing list