[Jmap] Review: draft-ietf-jmap-calendars-03

Bron Gondwana <brong@fastmailteam.com> Mon, 13 July 2020 13:23 UTC

Return-Path: <brong@fastmailteam.com>
X-Original-To: jmap@ietfa.amsl.com
Delivered-To: jmap@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 6354A3A11C3 for <jmap@ietfa.amsl.com>; Mon, 13 Jul 2020 06:23:05 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.119
X-Spam-Level:
X-Spam-Status: No, score=-2.119 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=fastmailteam.com header.b=QAyO8bve; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=OHopiDHV
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bTfU5kh8ed-f for <jmap@ietfa.amsl.com>; Mon, 13 Jul 2020 06:23:03 -0700 (PDT)
Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 5E1583A11BC for <jmap@ietf.org>; Mon, 13 Jul 2020 06:23:03 -0700 (PDT)
Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 8DBBC5C0102 for <jmap@ietf.org>; Mon, 13 Jul 2020 09:23:02 -0400 (EDT)
Received: from imap7 ([10.202.2.57]) by compute1.internal (MEProxy); Mon, 13 Jul 2020 09:23:02 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= fastmailteam.com; h=mime-version:message-id:date:from:to:subject :content-type; s=fm3; bh=ern45x6bnTeufI0lzwVQW4E7D5oaX2GHf0xYeH+ ng3k=; b=QAyO8bve5jtAX/wkdjTNooU7/aVsQnMy6uftdbAMzw1psk3Vh7ULqLA eG7sKY2qXiIXH7VXrgKqevLxKHTaMsGmFX3w3UtsERWsNwPY1sf9BNNQZ9UiXrG+ VJ4NU8Z3lkxq/7DG+2Lt2l36zydwGdoChDqmQCNjoG1MVvbLOeb9rM1L08TZZJVz ODBTLNVmgImuxRd0zLgCHbq4D+LhYxR/AE4VUkXqioJ6K8ZRZ+dSpds9DeeF3RsC 5ntPHSswd8f3pnJx8shJ1vtwi/n4+kqAfehDIrfRGVmuyDFSVV3lfMK5iheFmhqP weYvtGttELWxnqzfJpsn8PkpWCJkywA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=ern45x6bnTeufI0lzwVQW4E7D5oaX 2GHf0xYeH+ng3k=; b=OHopiDHVCulh0H3CShaiCvz2+YEMDuTeI/wA6yb00LVDg GVajtge63KZk/5ZHXyU9X+ClKjI9ZM6a/oh9uPDw83i3/XXO7hd+csGJBnVIAUge /+Q8Z3mv/szNk8SmmEnyJaMJJOBUPrXZYOUH4FSZvWMIrnpQo9vMlKeSdhe6UQ2u /y3MMNDFlHe8Ebo66Pg/4hJi1mt6NJQgekH5VX5j3VXlaTHg6QvmtPgXRCCNQbQD OFHFAhlBtyjrWBDXC17DoZZ4vAqeNre5aUwxCEKPCIpXyWUhwv38ushuGUywrwU1 28q1xOMQlq00xAq+q035hxztvsekQUpyCXvczZu0A==
X-ME-Sender: <xms:NmAMX7yiAtQciWert51HRfF8UkFlWQz0yR4b-H5NfRgR3D2hFwdJPw>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrvdekgdeigecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepofgfggfkfffhvffutgesrgdtreerre ertdenucfhrhhomhepfdeurhhonhcuifhonhgufigrnhgrfdcuoegsrhhonhhgsehfrghs thhmrghilhhtvggrmhdrtghomheqnecuggftrfgrthhtvghrnhepvdetteeiveeihfegie dtgeeigfduveelhefgffelgeelueehhfeitdelgedtffegnecuvehluhhsthgvrhfuihii vgeptdenucfrrghrrghmpehmrghilhhfrhhomhepsghrohhnghesfhgrshhtmhgrihhlth gvrghmrdgtohhm
X-ME-Proxy: <xmx:NmAMXzROmvgQh4oDCb6KgTfbza6_EsJX0Dg17_wzUFQzNXQkGjtl6w> <xmx:NmAMX1VcRqP2LAGgDzQkZ6WxRKeF12NRj73moSXK1zBVSTNJCRX2bQ> <xmx:NmAMX1gaKdWttsjq-EdT_c2abZ4kP2R5BKO0ZjvydoPXttd50Vn6Pg> <xmx:NmAMX5wSzuKSI89GPqUVwllUIsAhP1mSJwaiou2SE-vQNdcsCaA_iw>
Received: by mailuser.nyi.internal (Postfix, from userid 501) id 1CF54180109; Mon, 13 Jul 2020 09:23:02 -0400 (EDT)
X-Mailer: MessagingEngine.com Webmail Interface
User-Agent: Cyrus-JMAP/3.3.0-dev0-637-g57f734b-fm-idx2020-20200709.002-g57f734bf
Mime-Version: 1.0
Message-Id: <100ecc03-66db-4ee0-b56c-be20f605ff8b@dogfood.fastmail.com>
Date: Mon, 13 Jul 2020 23:22:40 +1000
From: Bron Gondwana <brong@fastmailteam.com>
To: jmap@ietf.org
Content-Type: multipart/alternative; boundary="82d409702d944c0080f8438c428fd861"
Archived-At: <https://mailarchive.ietf.org/arch/msg/jmap/R5KoCB48Vpt_SeNp7DHIZnpGdm4>
Subject: [Jmap] Review: draft-ietf-jmap-calendars-03
X-BeenThere: jmap@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: JSON Message Access Protocol <jmap.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/jmap>, <mailto:jmap-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/jmap/>
List-Post: <mailto:jmap@ietf.org>
List-Help: <mailto:jmap-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/jmap>, <mailto:jmap-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 13 Jul 2020 13:23:05 -0000

Ok, so I haven't read this thing yet! Figured I'd have a read through and note down things as they come up. This'll just be all the clarifications or things that I don't like because otherwise it would be a long email!

*1.1: Data Model
*

A CalendarPrincipal has a 1:1
   correspondence with an Account (see [RFC8620], Section 1.6.2) that
   supports the "urn:ietf:params:jmap:calendars" capability.

And then later CalendarPrincipal/query is defined as a way to scan through CalendarPrincipals efficiently. *Why do this rather than defining properties on the Account object directly and then adding an Account/query mechanism *which allows you to filter to accounts which support "urn:ietf:params:jmap:calendars" as part of the query parameters? This would be easier to extend for other data types that may be available from many accounts in the future.

*2. Calendar Principals*

All the object properties appear to be required with no default value. Should they have default values given (generaly null) in the spec? Particularly where null is a valid value, it appears that would be a sensible default.

*3. Calendars**
*

Likewise, should color be optional (default #000000 or whatever).

Speaking of color - I believe that the CSS color specs should be normative references, since you can't build a compliant implementation without them.

Likewise isSubscribed should probably default to true if not specified, since a server which doesn't care about subscriptions would just return the calendars that you can see. And probably ditto for everything else that doesn't have a default.

   o  *timeZone*: "String|null" The time zone to use for events without
      a time zone when the server needs to resolve them into absolute
      time, e.g., for reminders, queries, or availability calculation.
      The value MUST be a time zone id from the IANA Time Zone Database.
      If "null", the timeZone of the account's associated
      CalendarPrincipal will be used.  Clients SHOULD use this as the
      default for new events in this calendar if set.

The IANA Time Zone Database should be in the references at the end of the document.

*3.1. Per-user properties**
*

We should address read-only accounts here, where users may not be able to store anything on the server.
*
*
*4.5.  CalendarShareNotification/set*

   This is a standard "/changes" method as described in [RFC8620],
   Section 5.3.

This looks like a copy-paste error from above.

It looks from the lack of create/update that "undo" will not work when dismissing notifications!

*5. Calendar Events*

You know my opinion on this! I think events should be able to be present in mutliple Calendars, so calendarIds becomes a map of { "id" : true, "id2": true } instead of a single value.

Of course that doesn't map well with copying stuff out of the "defaults" fields of the calendar into the event when it's created, but I also don't like that compared to the client reading the defaults off the calendar and applying them itself - good old "be explicit in what you ask of the server" which is a continual tradeoff, but which I really like as a pattern because it reduces magicalness and action at a distance.

*5.8.  CalendarEvent/set*

   o  *sendSchedulingMessages*: "Boolean" (default: true) If true then
      any changes to scheduled events will be sent to all the
      participants (if the user is an owner of the event) or back to the
      owners (otherwise).  If false, the changes only affect this
      calendar and no scheduling messages will be sent.

Speaking of which - I believe the default should be false here. Clients can easily be built to automatically add it, and the wording needs to say that it's not an error to set this even if none of the events are scheduling events... but things should default to less impactful and the client should ask for impacts - and sending scheduling messages is an impact. The ICALENDAR default is the wrong one, and we should fix that here.

*5.8.1.  Patching**
*

Yeah, I guess that's the only way to do it! I'm unhappy about the patching story here in general and would like to discuss the "patch the model" vs "patch the representation" a bit more, but there's definitely edge cases to review either way. It's not so bad with recurrences because you can treat them as fully expanded for patching purposes, but it does get very messy with localisation!

*9. IANA Considerations*

There are a few fields which have been specified as an enumeration, e.g. Calendar/role, and "Per User Properties" in JSEvent. Should there be registries created for these?

...

This may not be everything yet, but these are the main points I found reading through!

Cheers,

Bron.

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