[Standards] Exact hint for Result Set Management

Florian Schmaus flo at geekplace.eu
Wed Jul 11 15:33:14 UTC 2018

I recently submitted PR #672 to the xeps repo


to make users of RSM, like MAM, aware whether the result is exact or
not. It received some scepticism from the council members in today's
council meeting. I am to blame here as I thought the abstract motivation
in the commit message was enough. It appears it wasn't.

While I think multiple applications could exploit that information, my
particular motivation was MAM. Consider the scenario where you have a
master archive and a local archive. The local archive may have multiple
holes at unknown locations. Now you want to sync your local archive from
the master using MAM/RSM.

If you don't know whether or not the MAM RSM results are exact, you need
resort to basically re-syncing the complete archive from the master. But
if you know that the results are exact, you could use count-only MAM RSM
queries (XEP-0059 § 2.7) and the unique-and-stable IDs of the archived
messages to effectively determine the holes and fill them up, using a
simple bisection algorithm which compares the message count with the
expect unique-and-stable archive message ID. This saves a lot of
roundtrips and especially transferred data when syncing the archive.

I also like to point out that the changes in #672 are backwards
compatible. Not namespace bump required.

I'm off to barbecue, but I'm still looking forward to your feedback.

- Florian

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 618 bytes
Desc: OpenPGP digital signature
URL: <http://mail.jabber.org/pipermail/standards/attachments/20180711/aa030240/attachment.sig>

More information about the Standards mailing list