[jdev] Service Discovery (XEP-0030) and large item sets

Tobias Markmann tmarkmann at googlemail.com
Wed Oct 11 08:29:03 CDT 2006


Hi,

Given the following query stanza:

<iq id='75'
>     to='conference.jabber.org'
>     type='get'
>     xml:lang='de-DE'>
>   <query xmlns='http://jabber.org/protocol/disco#items'/>
> </iq>


The server responds to this stanza with a large stanza, with hundreds of
items. If XMPP gets more common MUCs will have a lot more rooms. So why
don't split large stanzas in smaller chunks. Like in the following example:

<iq from='conference.jabber.org'
>     to='tobiasfar at jabber.org/home'
>     id='75'
>     type='result'
>     part='1'
>     part-count='2'>
>   <query xmlns='http://jabber.org/protocol/disco#items'>
>     <item jid='comitedesabios at conference.jabber.org'
>     name='comitedesabios (0)'/>
>     <item jid='asilo at conference.jabber.org'
>     name='asilo (0)'/>
>     <item jid='blondie at conference.jabber.org'
>     name='blondie (1)'/>
>     <item jid='esperanto at conference.jabber.org'
>     name='Babilu esperante (4)'/>
>     <item jid='hawaii at conference.jabber.org'
>     name='Hawaii (0)'/>
>   </query>
> </iq>
>
> <iq from='conference.jabber.org'
>     to='tobiasfar at jabber.org/home'
>     id='75'
>     type='result'
>     part='2'
>     part-count='2'>
>   <query xmlns='http://jabber.org/protocol/disco#items'>
>     <item jid='kanava at conference.jabber.org'
>     name='kanava (0)'/>
>     <item jid='profit at conference.jabber.org'
>     name='Profit (3)'/>
>     <item jid='!use at conference.jabber.org'
>     name='!use (0)'/>
>     <item jid='directnet at conference.jabber.org'
>     name='Directnet (1)'/>
>     <item jid='stevegt-ctl at conference.jabber.org'
>     name='stevegt-ctl (1)'/>
>     <item jid='asplinux at conference.jabber.org'
>     name='asplinux'/>
>     <item jid='international at conference.jabber.org'
>     name='international (0)'/>
>   </query>
> </iq>



This will result in some advantages like:

   - smaller XML stanza sizes -> easier to handle for servers
   - better responsiveness because you can still retrieve presences or
   other messages while receiving a large stanza

If someone knows a better way to do something like this, please tell me
about it.

regards
Tobias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.jabber.org/jdev/attachments/20061011/5ea01b42/attachment-0002.htm>


More information about the JDev mailing list