[Standards] XEP-0060, offline modifications and efficient synchronization

Kevin Smith kevin.smith at isode.com
Tue Sep 15 10:55:00 UTC 2015


On 14 Sep 2015, at 20:22, Matthieu Rakotojaona <matthieu.rakotojaona at gmail.com> wrote:
> 
> Excerpts from Kevin Smith's message of 2015-09-14 09:58:56 +0100:
>> On 7 Sep 2015, at 23:15, Matthieu Rakotojaona <matthieu.rakotojaona at gmail.com> wrote:
>>> 
>>> Excerpts from Kim Alvefur's message of 2015-09-07 14:49:59 +0200:
>>>> Hi!
>>>> 
>>>> On 2015-09-05 16:22, Matthieu Rakotojaona wrote:
>>>>> - MAM only allows something like "give me everything since this moment",
>>>>> however using dates is always problematic (clocks are not
>>>>> synchronized, time can drift, ...)
>>>> 
>>>> FYI: MAM lets you request by archive id.  There doesn't seem to be an
>>>> example describing that, but it's essentially the same as paging:
>>>> http://xmpp.org/extensions/xep-0313.html#query-paging
>>> 
>>> Hey !
>>> 
>>> Yes, you can page with MAM. The problem is that there is no interaction
>>> between MAM's archive ids and actual items, so whenever you receive a
>>> notification you know that the latest archive id must have changed but
>>> you don't know the new value. So you'll have to retrieve back from the
>>> last event you retrieved.
>>> 
>>> My idea was to make this id central in the Pubsub XEP, and then have
>>> references to other XEPs like "You can use RSM with those ids".
>>> 
>>> XEP-0312 does feel more lightweight and more importantly more generic
>>> (it doesn't apply to only pubsub, but to everything that is based on
>>> presence) but still has the issue of clocks.
>> 
>> Including the archive IDs in the delivered stanzas seems to be the most sensible way to do this, such that you can then do a MAM sync on your last-seen ID.
>> 
>> Yes/no?
>> 
>> /K
> 
> Yes, that would allow an implementor to make only the calls that are
> really needed for staying in sync.
> 
> However I don't see why it should be a MAM sync; MAM in itself only
> allows you to query by date, in order to filter by IDs you use RSM

I’m not sure that “MAM in itself” only allows you to query by date, given that RSM is a dependency of MAM - you can’t do MAM and not support querying by id.

> which
> is already usable directly with pubsub (instead of doing MAM+RSM). The
> only difference will be the response: either you get a list of relevant
> items through pubsub, or you get a stream of messages through MAM. I can
> imagine the latter is better for huge responses because messages don't
> "clog" the pipe (they can be interleaved with other stanzas); is it
> really the preferred way to do it ?

I’d expect in usual cases a pubsub node to only support querying the current state (which might be a few items), while MAM would expose a fuller history. So I’d be inclined to do it this way, yes.

/K


More information about the Standards mailing list