Re: [Jmap] Draft messages - mutability

Neil Jenkins <neilj@fastmail.com> Wed, 26 April 2017 01:06 UTC

Return-Path: <neilj@fastmail.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 BC021126D05 for <jmap@ietfa.amsl.com>; Tue, 25 Apr 2017 18:06:18 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.719
X-Spam-Level:
X-Spam-Status: No, score=-2.719 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=fastmail.com header.b=U53BvetI; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=AQoDAf0T
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 KUuAp4tp3g64 for <jmap@ietfa.amsl.com>; Tue, 25 Apr 2017 18:06:17 -0700 (PDT)
Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 68AF61205D3 for <jmap@ietf.org>; Tue, 25 Apr 2017 18:06:17 -0700 (PDT)
Received: from betaweb1.internal (betaweb1.nyi.internal [10.202.2.10]) by mailout.nyi.internal (Postfix) with ESMTP id D5E4C21452 for <jmap@ietf.org>; Tue, 25 Apr 2017 21:06:16 -0400 (EDT)
Received: from betaweb1 ([::ffff:10.202.2.10]) by betaweb1.internal (MEProxy); Tue, 25 Apr 2017 21:06:16 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=R/1GRpduwM7sO7tYx0I6VQQNDAxtM U1qpnXz54mwaGc=; b=U53BvetIV1fbK0iOe0RZnxzyc0EVNMUws6DS5//OemAVu cp5XLVp4ljacNM3zXwgfhieo9qzgnrc5zIvxpD94j5aRVk9NjbRhSNoVxzERZn6X J5ZPrEnlZQr4jtDIa3CnKydFY1bzXPQVUOsHuqo34z8MEs9o2qCFEm2lj/yO1lJz IHhIiWKa1g/nrUOe0Fvorhj9LxRIiq8kEUq0oLHqVRDbLEzaDN5qBGZX+1fhKUgh n9du4L2p5cZ/WcxGG4EueI8S/g18peSbfLvi37/ZMP1m9ru157pGwMawNQKm/Vdu Pkp7ISb4UG4aTg5rQ8ZKu/2vMhwu/geG+uYXzxi0Q==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=R/1GRp duwM7sO7tYx0I6VQQNDAxtMU1qpnXz54mwaGc=; b=AQoDAf0TYj6UPhssEg+DJH ZnoNV8+kHPnpTqGVpRoAP4Kp6/PdSRR5ns1s5G20wZUwrDbeDL101u/NAE6wMx6f DbEs07e7uBzBoGuK8ZvzkfCPWAmPTdoYUD7KQ6O0IZu8gOq0XASzp04PlpFTjiYp U+tj07zCPt98VKzXIUgwexcXVaMLDSNugKbJo8qTQRyv9Es0Ll7nUYaHY36+8FCc oHGA919i4t5kEPO1Ol1T9vG07W6PsZBJHfd8/e72tE/lvOf3IYa/8CUWGl/rZMUi VmOWZgE36EiGZNjob7YivNHHux8uUqJUDxijbCGDzcW5L4E/k8rqTPcG4SlSwAAg ==
X-ME-Sender: <xms:iPL_WFhL13Rm7695nB5n6Bq9KQR4OHrhWnxazASw4z0fgwSW1EBlGw>
Received: by mailuser.nyi.internal (Postfix, from userid 99) id 97F0FE276C; Tue, 25 Apr 2017 21:06:16 -0400 (EDT)
Message-Id: <1493168776.24902.956297280.180E7202@webmail.messagingengine.com>
From: Neil Jenkins <neilj@fastmail.com>
To: jmap@ietf.org
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: multipart/alternative; boundary="_----------=_1493168776249020"
X-Mailer: MessagingEngine.com Webmail Interface - ajax-71880675
References: <1492998899.3316920.953769616.254C9CBD@webmail.messagingengine.com> <EDDD6045-ECAD-4EAB-AC11-842A9CB2E1CA@oracle.com> <1493084134.2830550.955039432.5403CAFB@webmail.messagingengine.com> <BFB51221-4FD4-4546-B628-595CF76B7F66@oracle.com> <1493087082.2882732.955078288.61343C16@webmail.messagingengine.com> <45E4DC37-A0FA-4573-83B1-3701E0FE2A69@oracle.com>
Date: Wed, 26 Apr 2017 11:06:16 +1000
In-Reply-To: <45E4DC37-A0FA-4573-83B1-3701E0FE2A69@oracle.com>
Archived-At: <https://mailarchive.ietf.org/arch/msg/jmap/64xt7OQq4rkPHUfm67Zsl_yf4fw>
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: Wed, 26 Apr 2017 01:06:19 -0000

Yeh, a persistent identifier can certainly do much of the same job (in
theory the RFC5322 Message-Id should do this if you generate it in a
sensible way). And I agree that it simplifies sync code if all messages
are the same in terms of mutability (although I don't think it would be
too hard to support).
As Bron points out, you do have more work in the client to find the
message by the draft id, but given the above, and that this is also more
easily compatible with IMAP, I think sticking with the current immutable
model is probably better.
As Chris mentioned earlier, an atomic "replace" *would* be very helpful
for handling drafts. I actually think we can model this as a standard
JMAP update, just it returns a new id. So you would have something like:
[
    [ "setMessages", {
        "update": {
            "${currentMessageId}": {
                "to": [{
                    "name": "Joe Bloggs",
                    "email": "joe@example.com"
                }],
                ... all the other properties you normally pass to
                create ...            }
        }
    }, "tag" ]
]

which returns

[
    [ "messagesSet", {
        "updated": {
            "${currentMessageId}": {
                "id": "${newMessageId}"
            }
        }
    }, "tag" ]
]

Neil.