Re: [Jmap] [Jmap for Sieve] Binary/blob vs. Inline

Neil Jenkins <neilj@fastmailteam.com> Mon, 08 November 2021 04:47 UTC

Return-Path: <neilj@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 AF77C3A08B0 for <jmap@ietfa.amsl.com>; Sun, 7 Nov 2021 20:47:51 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.1
X-Spam-Level:
X-Spam-Status: No, score=-2.1 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_H2=-0.001, 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=Zla0w0HB; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=CNJvVASs
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 s2uhxfTtCpju for <jmap@ietfa.amsl.com>; Sun, 7 Nov 2021 20:47:46 -0800 (PST)
Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 8D4EE3A08AE for <jmap@ietf.org>; Sun, 7 Nov 2021 20:47:46 -0800 (PST)
Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 47BCC5C00A9 for <jmap@ietf.org>; Sun, 7 Nov 2021 23:47:45 -0500 (EST)
Received: from imap43 ([10.202.2.93]) by compute5.internal (MEProxy); Sun, 07 Nov 2021 23:47:45 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= fastmailteam.com; h=mime-version:message-id:in-reply-to :references:date:from:to:subject:content-type; s=fm1; bh=LjPm05P /tU/R4/ngyhxlR+8xtfHDK0t2nXZzxAagIg4=; b=Zla0w0HBuisNSM8VuzHGYVH E6HSMXnghGkmhXqPnf8rYaSkIYgNlhCUtdPdW8ufj67dHfbfEpHeM8YQ4AMKebrG B3Epqz7i9sna34VC7o4Ej8GfVZ8O+kBfUFtvG0LX2dZbFlA8gDXwf73YFeOrT9/1 zZLqA46t8n1xnOGnjzuSwnFJ8I3nXwEaxodmdNIfg+75PkS/yeeRK4tv6xUNIdlt jLTYhBAReW4fEi9NK/WCrSxuPtOgxL5KOT2aWsOQY6eRPjn1E485WKxd1nt0ZfzL 48I4/TLOgMOS+70/eczirfTzuRHb/XPfMFEULdQcbnZozpirqThIfhSWAlXtIsg= =
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=LjPm05 P/tU/R4/ngyhxlR+8xtfHDK0t2nXZzxAagIg4=; b=CNJvVASs25cPoQC+qlMGU/ jftvSJC3vpv9ykho/5dMZIOMB8cMhJsyYr98bbufAtNCN3/AwF+FK7Sj77yaISY2 FF8GgJ41OzI0kevVpPPxkv83oj3IKnb1+qx5vEpYXC8TGD6yPGWAGB/c0JmErS7j l38XQ3s2DpJuBYHM8G9y75jShVQzSyRzmYsijBeSNtIMBM5fHRPOkeGW4LuPA7Ei Q2Z3JZhPxAZITOP/min4DSnJP8II6gsGkHu8+TjF3bsyS/n3Jq58qvm4ZWvYwoEh aiKPC91bbDPEYIy6HYT3T+whmWmNarzcvmMO5tylqkiYoT7SvrbJCN3XjFS1gdvA ==
X-ME-Sender: <xms:76uIYa5pSGaARupMDeaK1tae1H8cgmng8RB4E68XmYpnNPSM92x_1Q> <xme:76uIYT5vJTQu57FUtgogP2HYbi-Q9K5WizHOPxmJncK6ByW0b_UxZe0E-TO-yjr6j YvgE4PoFuVnWw>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddruddugdejtdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvufgtsegrtderreerreejnecuhfhrohhmpedfpfgvihhl ucflvghnkhhinhhsfdcuoehnvghilhhjsehfrghsthhmrghilhhtvggrmhdrtghomheqne cuggftrfgrthhtvghrnhepheeuhfdujedtieevkedvhfffgfelfeelhfefkeehhfekleek hfefueefveffjeeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomhepnhgvihhljhesfhgrshhtmhgrihhlthgvrghmrdgtohhm
X-ME-Proxy: <xmx:76uIYZdpah4gOavaJzDnKxdP2vWdi9tCgkNH3INDILF59krtVasHoA> <xmx:76uIYXILRBzYtNgA6Pui6TIFniT7QgRNGnxbFAUcev_h7BGFjy4bfQ> <xmx:76uIYeIPndBQNFjQdZLtMItIjccnuZz8s-6mzAcY429uxHuxFERN0A> <xmx:8auIYTUcbw3Gl61V8WzLS7wdvpFJcBmGpFC1s_aE-R6TagBgaqLfrw>
Received: by mailuser.nyi.internal (Postfix, from userid 501) id 64738AC0E8C; Sun, 7 Nov 2021 23:47:43 -0500 (EST)
X-Mailer: MessagingEngine.com Webmail Interface
User-Agent: Cyrus-JMAP/3.5.0-alpha0-1420-gdf09e8761c-fm-20211101.001-gdf09e876
Mime-Version: 1.0
Message-Id: <4502396e-b47e-49f1-8273-1fd1b7ed1258@dogfood.fastmail.com>
In-Reply-To: <eda4a93c-2c53-54c2-7fd0-27c2407898bd@audriga.com>
References: <a192b2f3-4b4c-1d94-7302-fab59749528a@audriga.com> <ea9ad429-df42-4c51-8345-542aa1624c8d@dogfood.fastmail.com> <eda4a93c-2c53-54c2-7fd0-27c2407898bd@audriga.com>
Date: Mon, 08 Nov 2021 15:47:42 +1100
From: Neil Jenkins <neilj@fastmailteam.com>
To: IETF JMAP Mailing List <jmap@ietf.org>
Content-Type: multipart/alternative; boundary="3e2a2a6e0b7f4b4b9b4749d83019e0b4"
Archived-At: <https://mailarchive.ietf.org/arch/msg/jmap/KSEVSmPGLIMxVlJeyTHGntA6AoA>
Subject: Re: [Jmap] [Jmap for Sieve] Binary/blob vs. Inline
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, 08 Nov 2021 04:47:52 -0000

On Sat, 6 Nov 2021, at 03:37, Hans-Joerg Happel wrote:
> While this is no strict blocker, I think enforcing a blob storage concept so widely is in conflict with the goal of making it easy for as many people as possible to adopt JMAP.
> 

Blob support is a part of JMAP core, so if you want to implement JMAP you're probably going to need it.

> * The blobId approach opens up many potential error cases, which server+client implementers need to have in mind (e.g, think about the script validation workflow)

Not sure I follow. You validate it just the same, it's just where you get the bytes from.

> * It makes the JMAP Sieve workflow essentially different from the known and closely related ManageSieve workflows 

Making it work the same as ManagedSieve is secondary to making it work consistently with other JMAP APIs in my view.

I personally don't particularly mind whether the API is blob based or just inline code, but I know this was discussed earlier and I believe there were good reasons to go with blob.

> If I understand it correctly, while it is atomic from a HTTP call perspective, the chained processing of commands on server-side is not necessarily atomic from a logical point of view?
> 

That's right.

> Which would mean that a client still needs to deal with different cases (partial fail / complete fail ... ) of the chained calls?

Well, it can probably just look at the response of the second call; if the blob creation succeeded but the sieve update failed, you can just ignore the blob bit; it should get cleaned up at some point automatically. And if the blob failed, then the sieve update will fail as the result ref won't resolve, so you can still just look at the second error.

—Neil