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

Hans-Joerg Happel <happel@audriga.com> Tue, 09 November 2021 11:09 UTC

Return-Path: <happel@audriga.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 20C633A0EB6 for <jmap@ietfa.amsl.com>; Tue, 9 Nov 2021 03:09:42 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.228
X-Spam-Level:
X-Spam-Status: No, score=-5.228 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, NICE_REPLY_A=-3.33, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=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 R5tY41eveZM5 for <jmap@ietfa.amsl.com>; Tue, 9 Nov 2021 03:09:37 -0800 (PST)
Received: from mail.audriga.com (mail.audriga.com [176.221.42.35]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 94ABE3A07F4 for <jmap@ietf.org>; Tue, 9 Nov 2021 03:09:37 -0800 (PST)
Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.audriga.com (Postfix) with ESMTP id D4CF1A137 for <jmap@ietf.org>; Tue, 9 Nov 2021 12:09:29 +0100 (CET)
X-Virus-Scanned: Debian amavisd-new at mail.audriga.com
Received: from mail.audriga.com ([127.0.0.1]) by localhost (mail.audriga.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5TWPtId_SHho for <jmap@ietf.org>; Tue, 9 Nov 2021 12:09:26 +0100 (CET)
Received: from [192.168.10.154] (b2b-109-90-161-242.unitymedia.biz [109.90.161.242]) (Authenticated sender: happel@audriga.com) by mail.audriga.com (Postfix) with ESMTPSA id 11B09A149 for <jmap@ietf.org>; Tue, 9 Nov 2021 12:09:26 +0100 (CET)
To: jmap@ietf.org
References: <a192b2f3-4b4c-1d94-7302-fab59749528a@audriga.com> <ea9ad429-df42-4c51-8345-542aa1624c8d@dogfood.fastmail.com> <eda4a93c-2c53-54c2-7fd0-27c2407898bd@audriga.com> <4502396e-b47e-49f1-8273-1fd1b7ed1258@dogfood.fastmail.com>
From: Hans-Joerg Happel <happel@audriga.com>
Message-ID: <be384b9d-b881-ff7c-2b79-62bb9b582930@audriga.com>
Date: Tue, 09 Nov 2021 12:09:25 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0
MIME-Version: 1.0
In-Reply-To: <4502396e-b47e-49f1-8273-1fd1b7ed1258@dogfood.fastmail.com>
Content-Type: multipart/alternative; boundary="------------E96E58EBBC3062FF70B33939"
Content-Language: en-US
Archived-At: <https://mailarchive.ietf.org/arch/msg/jmap/xaU2MZuvZNTQRPM1qI5y9BPf1iU>
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: Tue, 09 Nov 2021 11:09:42 -0000

Hi Neil,

I think we're mainly viewing JMAP from different perspectives:

* Yours seems like "a system will be built according to the (full) JMAP 
specs"
* Mine/ours is more like: JMAP can be quite useful to adapt also for 
existing systems, even if only partially implemented (Every piece of 
JMAP makes the world a little better ;-)

Both perspectives have their merits in my opinion. I am just trying to 
bring the standard(s) forward by providing some arguments to consider 
for that second perspective.

I do think this is a valid concern, given that there is a large set of 
existing systems in the area JMAP addresses. Also CardDAV/CalDAV as 
slighly related standards are mostly implemented on top of existing systems.

I agree with you that some of my points don't seem incredibly important, 
but I think we should also pay attention not to enforce JMAP-specific 
constraints if not strictly necessary.


On 08.11.21 05:47, Neil Jenkins wrote:
> 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.

I basically had in mind the additional errors cases (as described in 
your chained call response below), which a client would not need to deal 
with in an approach more similar to ManageSieve PUTSCRIPT.

>
>> * 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.

ok, fair point.


> 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.

I just found this thread 
(https://mailarchive.ietf.org/arch/msg/jmap/6u3p0fGs9cdDrBo8y6aU_8Hi2HU/) 
which does not discuss this too extensive. But I see the point Ken made, 
that both alternatives are viable, but that it would be better to go 
with one option only.

Thanks and best,
Hans-Joerg


>
>> 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
>
> _______________________________________________
> Jmap mailing list
> Jmap@ietf.org
> https://www.ietf.org/mailman/listinfo/jmap