Changing JMAP IDs for Calendar and Contacts to be server generated

Bron Gondwana brong at fastmailteam.com
Mon Dec 2 17:51:27 EST 2019


Hi All,

This was discussed into today's Cyrus call, but I figured I should put it here for a public note and to cover the discussion in more detail :)

Fastmail has a "caldav_sync" tool, which replicates calendars from outside. Right now we rewrite the UID both ways in order to allow uniqueness of UIDs within our system, because we also constrain each UID to only exist once in all of a user's calendars (because of scheduling).

This is variously buggy and annoying.

Looking at various solutions for embedding mailboxid as well into the JMAP id, we came to the conclusion that the best move was actually to generate JMAP IDs synthetically on first receipt of a UID, and maintain that ID across changes. This has a couple of other good benefits:

* doesn't use random junk off the wire as part of ids
* can maintain the JMAP id even when moving between different calendars
* fixed length IDs for JMAP, whereas UIDs can be quite long from some services
* restricted character set means we don't have to escape parts of the UID (which is not ObjectId safe)

All together, a big win. The same as not using the Message-Id header from emails, we won't use the UID from calendars or contacts.

I'm looking at potential options for upgrade path for existing events - possibly even rewriting them on disk! It will definitely need a dav_db rewrite.

Bron.

--
 Bron Gondwana, CEO, Fastmail Pty Ltd
 brong at fastmailteam.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.andrew.cmu.edu/pipermail/cyrus-devel/attachments/20191203/b709bffa/attachment.html>


More information about the Cyrus-devel mailing list