Re: [core] Benjamin Kaduk's Discuss on draft-ietf-core-multipart-ct-03: (with DISCUSS and COMMENT)

Carsten Bormann <cabo@tzi.org> Wed, 21 August 2019 19:37 UTC

Return-Path: <cabo@tzi.org>
X-Original-To: core@ietfa.amsl.com
Delivered-To: core@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 5D4F9120F35; Wed, 21 Aug 2019 12:37:15 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.197
X-Spam-Level:
X-Spam-Status: No, score=-4.197 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_NONE=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 rWZz1LWy8dwy; Wed, 21 Aug 2019 12:37:13 -0700 (PDT)
Received: from gabriel-vm-2.zfn.uni-bremen.de (gabriel-vm-2.zfn.uni-bremen.de [134.102.50.17]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id C100D120F2F; Wed, 21 Aug 2019 12:37:12 -0700 (PDT)
Received: from [192.168.217.120] (p548DCCB9.dip0.t-ipconnect.de [84.141.204.185]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gabriel-vm-2.zfn.uni-bremen.de (Postfix) with ESMTPSA id 46DHx25QWpz105P; Wed, 21 Aug 2019 21:37:10 +0200 (CEST)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <20190504232153.GA19805@kduck.mit.edu>
Date: Wed, 21 Aug 2019 21:37:10 +0200
Cc: Alexey Melnikov <aamelnikov@fastmail.fm>, The IESG <iesg@ietf.org>, draft-ietf-core-multipart-ct@ietf.org, Jaime Jiménez <jaime.jimenez@ericsson.com>, core-chairs@ietf.org, core@ietf.org
X-Mao-Original-Outgoing-Id: 588109028.221368-384de15fcf70e925166b98ca669ea198
Content-Transfer-Encoding: quoted-printable
Message-Id: <A6EE5F90-391C-487B-A3DD-2193027022C6@tzi.org>
References: <155675554069.2851.9351849772053196736.idtracker@ietfa.amsl.com> <459433ef-5cb5-4c3e-a32e-a5d063b1ccf0@www.fastmail.com> <BE1600FF-FBFB-44F4-A405-9C73ADA6E3FC@tzi.org> <20190504232153.GA19805@kduck.mit.edu>
To: Benjamin Kaduk <kaduk@MIT.EDU>
X-Mailer: Apple Mail (2.3445.9.1)
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/zi9UF0Wzs9dpBj7WmtxGKTr4Lbg>
Subject: Re: [core] Benjamin Kaduk's Discuss on draft-ietf-core-multipart-ct-03: (with DISCUSS and COMMENT)
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Constrained RESTful Environments \(CoRE\) Working Group list" <core.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/core>, <mailto:core-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/core/>
List-Post: <mailto:core@ietf.org>
List-Help: <mailto:core-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/core>, <mailto:core-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 21 Aug 2019 19:37:15 -0000

Hi Benjamin,

it took us a while to better understand the concern and come up with text.

We have now submitted -04:
https://tools.ietf.org/html/draft-ietf-core-multipart-ct-04
https://tools.ietf.org/rfcdiff?url2=draft-ietf-core-multipart-ct-04.txt

> On May 5, 2019, at 01:21, Benjamin Kaduk <kaduk@MIT.EDU> wrote:
> 
> On Thu, May 02, 2019 at 03:11:25PM +0200, Carsten Bormann wrote:
>> Hi Alexey,
>> 
>> On May 2, 2019, at 14:40, Alexey Melnikov <aamelnikov@fastmail.fm> wrote:
>>> 
>>> Hi Benjamin,
>>> 
>>> On Thu, May 2, 2019, at 1:05 AM, Benjamin Kaduk via Datatracker wrote:
>>> 
>>>> ----------------------------------------------------------------------
>>>> DISCUSS:
>>>> ----------------------------------------------------------------------
>>>> 
>>>> It's not clear to me that we're really specifying the semantics of a
>>>> single media-type.  The introduction discusses how we may want multiple
>>>> representations to appear in a sequence, potentially representing
>>>> different content.
>>> 
>>> I think this is similar to multipart/mixed.
>> 
>> We were indeed trying to follow the model of multipart/mixed.
>> This offers a number of embedded representations the sequence of which may or may not be important.
>> 
>>>> Or we may have a set of related representations that
>>>> conceptually are the same content (but are they literally the same
>>>> resource, or related content?).
>>> 
>>> My understanding is that they are related contents.
>> 
>> There is no promise that the related items are conceptually the same content.
>> The difference between the first situation and the second one mainly is that the sequence is not important in the second (i.e., we are using the sequence to describe a bag).
>> 
>>>> And there is yet a third option -- one
>>>> that I'm not sure I fully understand -- wherein the representation is
>>>> not important, but rather which format is chosen of the several
>>>> possibilities, to the extent that extreme compression of the
>>>> representation is possible, with the compression just outputting the
>>>> format indicator.
>>> 
>>> Hmm, I missed that. I think this is similar to multipart/alternative
>> 
>> That wasn’t the intention.
> 
> I think that analogies to multipart/mixed and/or multipart/alternative
> would help the reviewer assess whether the document text succeeds at
> describing the intended behavior (though it's not clear that using such a
> reference to attempt to define the behavior by reference is a useful plan).

Please have a look at what we did — we made it more explicit that the semantics are indeed refined by the request context, but that multipart/mixed is our model here and multipart/alternative is outside the range that this media type addresses.

>> The choice in the third situation mentioned in the introduction is made by the originator of the representation, not the receiver.  The selected representation is still packaged in an application/multipart-core envelope so the media type does not need to diverge — it is essentially used as the (type!) union (a.k.a. choice) of the media types that the application wants to be able to put in the envelope.
>> 
>> We may have painted ourselves into a corner in RFC 7641 with the mandate that the representations provided by an observable resource stay within the same media type (content-format) over time.  This makes it difficult in CoAP to observe a resource that alternates between a “pending” and a “ready” state that have different structures of their representation.  Multipart-core can be used to package either into the same media type.
> 
> So while this may not be quite multipart/alternative, there are still
> alternatives involved; they are just delievered in separate (streamed)
> responses, as opposed to together in the same one.  That is, the
> alternation is over time and not at the choice of the recipient.

Multipart/alternative is recipient choice; scenario 3 is originator choice.
The need for the “union type” alluded to in the introduction may be idiosyncratic to CoAP: We expect an observed resource to go through states that all can be described by representations of the same content type.  Maybe that was not such a smart expectation, but the union type mechanism allows us to paper over that.  In any case, there is no “order” or “choice” problem in this scenario.

>> I don’t think the third situation has semantics that differ from the first two.
>> You still get a bag with a representation in it (or maybe none).  You still need to look into the bag to see what form it takes this time.  Actually, the second situation might also apply, so you might indeed get a couple representations in certain instances because that’s what best describes the resource at this particular time.
> 
> I think it's important to be clear about whether the sequencing within a
> given content array is or is not semantically relevant,

This is very much a function of the semantics that the request had on the resource.  If you get a mail with multipart/mixed in it, is it semantically relevant that the service manual is first, then the user manual next among the attachments?
The ordering may simply be alphabetic by name (and that may actually be what the request originally said).

> and under what
> conditions a recipient might only consult a subset of the array
> (multipart/alternative) vs. assembling a conglomerate from components of
> different types (multipart/mixed).

That is now addressed.  

Grüße, Carsten