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

Hans-Joerg Happel <happel@audriga.com> Fri, 05 November 2021 16:37 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 988D63A11D5 for <jmap@ietfa.amsl.com>; Fri, 5 Nov 2021 09:37:56 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.229
X-Spam-Level:
X-Spam-Status: No, score=-5.229 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] 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 MWnpOCV_u8UI for <jmap@ietfa.amsl.com>; Fri, 5 Nov 2021 09:37:54 -0700 (PDT)
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 E65323A11D1 for <jmap@ietf.org>; Fri, 5 Nov 2021 09:37:53 -0700 (PDT)
Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.audriga.com (Postfix) with ESMTP id 26E3CA149 for <jmap@ietf.org>; Fri, 5 Nov 2021 17:37:50 +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 srqmZgGin9ta for <jmap@ietf.org>; Fri, 5 Nov 2021 17:37:25 +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 96867A0D3 for <jmap@ietf.org>; Fri, 5 Nov 2021 17:37:25 +0100 (CET)
From: Hans-Joerg Happel <happel@audriga.com>
To: jmap@ietf.org
References: <a192b2f3-4b4c-1d94-7302-fab59749528a@audriga.com> <ea9ad429-df42-4c51-8345-542aa1624c8d@dogfood.fastmail.com>
Message-ID: <eda4a93c-2c53-54c2-7fd0-27c2407898bd@audriga.com>
Date: Fri, 05 Nov 2021 17:37: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: <ea9ad429-df42-4c51-8345-542aa1624c8d@dogfood.fastmail.com>
Content-Type: multipart/alternative; boundary="------------DFAF6276BE09E3199D3DD3F3"
Content-Language: en-US
Archived-At: <https://mailarchive.ietf.org/arch/msg/jmap/Ec2nttLdjFS27NlKaGZ8ZUsOWF4>
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: Fri, 05 Nov 2021 16:37:57 -0000

On 26.10.21 06:43, Neil Jenkins wrote:
> On Fri, 22 Oct 2021, at 03:41, Hans-Joerg Happel wrote:
>> => We'd argue that this process is both complex to implement plus it's
>> not particularly elegant to create a need for storing a temporary file.
>
> Depends how you look at it; it /is/ elegant to have a single 
> consistent method for referencing binary data. I think the answer here 
> if you are trying to add support on a legacy system where this is 
> difficult is to make the Sieve its own account. Then when you upload a 
> blob to that account you know it can only be a sieve script, which 
> should allow you to do something reasonable.

Thanks for elaboration - I missed to recognize that it is possible use 
the "Account-workaround" also for writing.

However, enforcing this process makes it still hard to implement in 
various imaginable cases. Take my initial Database storage example: You 
might force an implementer to store a temp Sieve script (from blob call) 
until the second call comes in to continue glue together that data and 
do the database INSERT.

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.

Some additional minor points, for the record:

* 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)
* It makes the JMAP Sieve workflow essentially different from the known 
and closely related ManageSieve workflows


>
>> It would therefore be good if it is possible to (alternatively?) submit
>> the script inline in the "SieveScript/set" command instead of a blobid.
>
> Using Bron's blob extension you can create a blob in-band and then 
> backreference it from the SieveScript/set command. But I wouldn't want 
> to say that was the only way you could do it; that breaks the 
> consistency of the blob handling.

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? Which would mean that a 
client still needs to deal with different cases (partial fail / complete 
fail ... ) of the chained calls?

Best,
Hans-Joerg