[caldeveloper-l] Collection sync: limit results

Helge Hess helge.hess at icloud.com
Thu May 10 14:56:32 PDT 2018


On 10. May 2018, at 13:19, Ricki Hirner <hirner at bitfire.at> wrote:
> When we tried to "limit results" as described in RFC 6578 3.7 (use
> case: mobile CalDAV/CardDAV sync client with limited memory and
> bandwidth; possibly unstable connection), I have discovered that most
> servers/services (including [very] big ones) do not correctly (not)
> implement it.

The RFC is really not clear enough here, but I think the intention is that if the server actually supports limits, it can return the error if the batch is considered to big *on the server side*.
E.g. the client request 1000 items, but the server says it can only do 100 per batch.

Section 3.6 is a little more specific on this:

> … A server MAY limit the number of member URLs in a response …

Notice the “may”.

Having said this: I don’t think I know a server which actually supports limits? CalendarServer maybe?


Proper limits would allow you to reduce the number of HTTP sync requests in some common cases, but I think most clients just query the meta data using the sync report and then use multi-gets to retrieve the changed entities.

If your client is *so* constrained that it can’t deal with that approach, I think you very likely wouldn't want to do DAV directly, but rather have a bridge in between. Though such a device would have to be tiiiiny ;-)


> - ignore the limit silently (not conforming, but sync would at least be
> possible), or

This would be my expectation and is IMO proper, expected and conforming behaviour.


> - crash with 500 Internal server error (which at least allows to retry
> without limit), or

This is unfortunately far too common in many servers for many REPORTs, even PROPFINDs. Just bail out if something doesn’t match. File bug reports ...


> - worst case: they limit the number or returned entries, but return the
> very last sync-token (instead of the intermediate one), so that a lot
> of entries won't be synchronized at all.

What servers do this?


> Is there something I have missed? Or is there anyone else who has
> actually implemented and/or used "limit results" and can give me some
> hints?

Given the state of adoption I'd say you really don’t want to do limits, it really doesn’t seem worth the effort. Unless you have super-super tiny devices or super-super large calendars.

But maybe you can elaborate why you want to do this. Just to save the 1 extra HTTP request when only a few items changed?

hh



More information about the caldeveloper-l mailing list