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='[EMAIL PROTECTED]/home'
    id='75'
    type='result'
    part='1'
    part-count='2'>
  <query xmlns='http://jabber.org/protocol/disco#items'>
    <item jid=' [EMAIL PROTECTED]'
    name='comitedesabios (0)'/>
    <item jid='[EMAIL PROTECTED]'
    name='asilo (0)'/>
    <item jid='[EMAIL PROTECTED]'
    name='blondie (1)'/>
    <item jid=' [EMAIL PROTECTED]'
    name='Babilu esperante (4)'/>
    <item jid='[EMAIL PROTECTED]'
    name='Hawaii (0)'/>
  </query>
</iq>

<iq from='conference.jabber.org'
    to='[EMAIL PROTECTED]/home'
    id='75'
    type='result'
    part='2'
    part-count='2'>
  <query xmlns='http://jabber.org/protocol/disco#items'>
    <item jid='[EMAIL PROTECTED] '
    name='kanava (0)'/>
    <item jid='[EMAIL PROTECTED]'
    name='Profit (3)'/>
    <item jid='!use@conference.jabber.org'
    name='!use (0)'/>
    <item jid='[EMAIL PROTECTED]'
    name='Directnet (1)'/>
    <item jid='[EMAIL PROTECTED]'
    name='stevegt-ctl (1)'/>
    <item jid='[EMAIL PROTECTED]'
    name='asplinux'/>
    <item jid='[EMAIL PROTECTED]'
    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

Reply via email to