[Standards] (ab)uses of 0059 in 0060
Bruce Campbell
b+jabber at bruce-2007.zerlargal.org
Sat Apr 28 00:30:57 CDT 2007
Result Set Management (0059) defines a (draft) standard for limiting what
is returned as a result of a query, and how many possible results there
are. In reading it, there are no suggestions as to how 'deep' within a
protocol it can be used.
For Yet-Another-Creative-Overlay-To-PubSub XEP that I'm writing[1], I'm
wanting to use RSM to partially retrieve a given item, and by extension,
to use RSM to allow <publish/>ing a given item in piecemeal fashion.
For example, instead of publishing an item as:
<iq type="set" to="pubsub.example.com" from="someone at example.com" id="create0">
<pubsub xmlns="http://jabber.org/protocol/pubsub">
<publish node="foo">
<item id="bar">
<data>a big chunk of data (1)</data>
<data>another big chunk of data (2)</data>
<data>really big chunk of data (3)</data>
</item>
</publish>
</pubsub>
</iq>
I'm wanting to use a piecemeal and possibly out-of-order upload of:
<iq type="set" to="pubsub.example.com" from="someone at example.com" id="create1">
<pubsub xmlns="http://jabber.org/protocol/pubsub">
<publish node="foo">
<item id="bar">
<data>really big chunk of data (3)</data>
<set xmlns="http://jabber.org/protocol/rsm">
<index>3</index>
</set>
</item>
</publish>
</pubsub>
</iq>
<iq type="set" to="pubsub.example.com" from="someone at example.com" id="create2">
<pubsub xmlns="http://jabber.org/protocol/pubsub">
<publish node="foo">
<item id="bar">
<data>a big chunk of data (1)</data>
<set xmlns="http://jabber.org/protocol/rsm">
<index>1</index>
</set>
</item>
</publish>
</pubsub>
</iq>
<iq type="set" to="pubsub.example.com" from="someone at example.com" id="create3">
<pubsub xmlns="http://jabber.org/protocol/pubsub">
<publish node="foo">
<item id="bar">
<data>another big chunk of data (2)</data>
<set xmlns="http://jabber.org/protocol/rsm">
<index>2</index>
</set>
</item>
</publish>
</pubsub>
</iq>
And likewise a possible partial retrieval result:
<iq type='result' from='pubsub.example.com' id='this_might_kill_my_karma'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<items node='foo'>
<item id='bar'>
<set xmlns='http://jabber.org/protocol/rsm'>
<index>2</index>
<count>3</count>
</set>
<data>another big chunk of data (2)</data>
</item>
</items>
</pubsub>
</iq>
Anyone with strong feelings one way or the other on this behaviour?
--
Bruce Campbell
[1] IMAP over XMPP, if you're curious.
More information about the Standards
mailing list