Re: [Jmap] Draft messages - mutability

"Chris Newman" <chris.newman@oracle.com> Tue, 25 April 2017 01:02 UTC

Return-Path: <chris.newman@oracle.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 31E34131987 for <jmap@ietfa.amsl.com>; Mon, 24 Apr 2017 18:02:31 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.222
X-Spam-Level:
X-Spam-Status: No, score=-4.222 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
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 s3PkYmgzrDZI for <jmap@ietfa.amsl.com>; Mon, 24 Apr 2017 18:02:30 -0700 (PDT)
Received: from userp1040.oracle.com (userp1040.oracle.com [156.151.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 2010713197B for <jmap@ietf.org>; Mon, 24 Apr 2017 18:02:30 -0700 (PDT)
Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v3P12QIo014359 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 25 Apr 2017 01:02:26 GMT
Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id v3P12QA9012463 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 25 Apr 2017 01:02:26 GMT
Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id v3P12Q3B015081; Tue, 25 Apr 2017 01:02:26 GMT
Received: from [10.145.239.181] (/10.145.239.181) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 24 Apr 2017 18:02:25 -0700
From: Chris Newman <chris.newman@oracle.com>
To: Bron Gondwana <brong@fastmail.fm>
Cc: jmap@ietf.org
Date: Mon, 24 Apr 2017 18:02:24 -0700
Message-ID: <EDDD6045-ECAD-4EAB-AC11-842A9CB2E1CA@oracle.com>
In-Reply-To: <1492998899.3316920.953769616.254C9CBD@webmail.messagingengine.com>
References: <1492998899.3316920.953769616.254C9CBD@webmail.messagingengine.com>
MIME-Version: 1.0
Content-Type: text/plain; format="flowed"
X-Mailer: MailMate (1.9.6r5347)
X-Source-IP: userv0021.oracle.com [156.151.31.71]
Archived-At: <https://mailarchive.ietf.org/arch/msg/jmap/xA3SRVUPQBh52Qc4dUlZSxqIQQI>
Subject: Re: [Jmap] Draft messages - mutability
X-BeenThere: jmap@ietf.org
X-Mailman-Version: 2.1.22
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: Tue, 25 Apr 2017 01:02:31 -0000

On 23 Apr 2017, at 18:54, Bron Gondwana wrote:
> I'm starting this thread to discuss the mutability of fields in 
> isDraft: true messages.
>
> In Cyrus IMAPd right now, we create the "MSGID" field as the sha1 of 
> the "RFC822" raw message content as would be delivered over IMAP.  
> That's lovely for non-draft messages (except that we'll probably 
> switch to using blake2 for new messages soon).
>
> But it sucks for drafts, because it means that every time you edit a 
> draft, you get a new MSGID.  Futhermore, you can't edit a draft via 
> JMAP with ['setMessages', {update:{}}] because the fields that you 
> want to edit are immutable, so instead you are doing ['setMessages', 
> {create:{all the fields}, destroy: ["the old id"]}] which is a 
> horrible way to edit drafts.
>
> A somewhat similar discussion is happening over in CalConnect around 
> the idea of saving draft ICALENDAR items on a server without sending 
> out scheduling messages about them until they have finished being 
> edited.
>
> So the question for JMAP becomes: is a "draft message" the same 
> datatype as a "message", or do you handle them completely differently? 
>  Clearly you want to show them in-thread with the message they are in 
> reply to in an interface, but how does that look over the protocol?

I see a lot of cost and no benefit to making a draft a different 
datatype from a message. Now adding a command with semantics like 
draft-brandt-imap-replace to JMAP may be quite reasonable.

		- Chris