[jdev] Service Discovery (XEP-0030) and large item sets
Jean-Louis Seguineau
jean-louis.seguineau at laposte.net
Wed Oct 11 12:46:44 CDT 2006
Hi Tobias,
I believe it would be a perfect use of XEP-0059 Result Set Management. And
that would bode well with the XMPP approach of letting server do the hard
work. In addition, it would not break existing client or server
implementations.
Jean-Louis
-----Original Message-----
Message: 2
Date: Wed, 11 Oct 2006 15:29:03 +0200
From: "Tobias Markmann" <tmarkmann at googlemail.com>
Subject: [jdev] Service Discovery (XEP-0030) and large item sets
To: "Jabber software development list" <jdev at jabber.org>
Message-ID:
<5cfc0a8e0610110629o537a89e1v8cbc1786ff762e47 at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
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
More information about the JDev
mailing list