Re: [core] Review of draft-ietf-core-multipart-ct-02

"Fossati, Thomas (Nokia - GB/Cambridge)" <thomas.fossati@nokia.com> Tue, 06 November 2018 03:21 UTC

Return-Path: <thomas.fossati@nokia.com>
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 56EF31276D0 for <core@ietfa.amsl.com>; Mon, 5 Nov 2018 19:21:00 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.37
X-Spam-Level:
X-Spam-Status: No, score=-2.37 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.47, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=nokia.onmicrosoft.com
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 1BmfFIj3v4Ny for <core@ietfa.amsl.com>; Mon, 5 Nov 2018 19:20:57 -0800 (PST)
Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10101.outbound.protection.outlook.com [40.107.1.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id A2FC4127148 for <core@ietf.org>; Mon, 5 Nov 2018 19:20:56 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nokia.onmicrosoft.com; s=selector1-nokia-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=acFfy8QU8Ced8HBTTgjp24WWI1LO/wcy9+T24RSY4UI=; b=mZuSqfPNfwiZEgL2ZaCaq48yTeWfP8kK7E6JwkRnmNBbkq1nB/QxGqXBDdNqhFAlnAugXsHp6/SRS/TlsQnW7C5uwKaNH5CSo7JUp9iQBR38GmHGX7w1H5Zhg3isggND++qF08ksrXBqjqY8NMeg0yYxORjc028bdKnC+aviKXQ=
Received: from AM6PR07MB4930.eurprd07.prod.outlook.com (20.177.119.75) by AM6PR07MB5397.eurprd07.prod.outlook.com (20.178.88.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1294.30; Tue, 6 Nov 2018 03:20:53 +0000
Received: from AM6PR07MB4930.eurprd07.prod.outlook.com ([fe80::f95b:cf9a:b466:21d3]) by AM6PR07MB4930.eurprd07.prod.outlook.com ([fe80::f95b:cf9a:b466:21d3%3]) with mapi id 15.20.1294.032; Tue, 6 Nov 2018 03:20:53 +0000
From: "Fossati, Thomas (Nokia - GB/Cambridge)" <thomas.fossati@nokia.com>
To: Carsten Bormann <cabo@tzi.org>
CC: "hartke@projectcool.de" <hartke@projectcool.de>, "core@ietf.org" <core@ietf.org>
Thread-Topic: [core] Review of draft-ietf-core-multipart-ct-02
Thread-Index: AQHUcHf46zhgh8nfgU+ep4XF1bdRj6VAv1qAgAFeRu0=
Date: Tue, 06 Nov 2018 03:20:53 +0000
Message-ID: <AM6PR07MB493037CA2612A568C8E2E23D80CB0@AM6PR07MB4930.eurprd07.prod.outlook.com>
References: <20181030174246.GA6420@nokia.com>, <B1D60043-817C-49CA-94A2-87D3041009DE@tzi.org>
In-Reply-To: <B1D60043-817C-49CA-94A2-87D3041009DE@tzi.org>
Accept-Language: en-GB, en-US
Content-Language: en-GB
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: spf=none (sender IP is ) smtp.mailfrom=thomas.fossati@nokia.com;
x-originating-ip: [2001:67c:370:128:3203:16ce:64f4:5b37]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; AM6PR07MB5397; 6:/aGb/UYERJ0/u8ClJPoAodfL2aQe5K/QG3O1XCwqochBA1xk9ndmf+COb5VwR1T7spOM4OMwUcuJ3tlShOrX1dwQcubcqlWBwQJPJ/U1cQhXL5vA7nWdisYOGkRfxJJ5vLCdiZ7OHkIAqmpMRwpgcOPM7KFRFRErAP4vzAArAuZvCwFUFaei6jRsrTcsUl2L+wr6Ka8x+d6zfsRdGSePYlwU2MbaOo8EpQPc1XFuG3+VJY35d6avgWSSvyrkLt89dSi2ZO+7mKRr0DareIaS8WLuUo6aboDyb0KeGVtjkOi+9I/a8FKRl59i999esvkXhtDa1ayhtN2YyoF5/lbWNJ6Pf9E5FclujQ1GcIm6dSVym1jg2Bxy7CuLHD6hefbXSQ1jHbjH4T1TSFjQUdfh/TWwzRTm3jgPHauPCJDmHUQnD5XNobQlAedykWBQtOva7BjBQ5rbF4VghspxcWRO4g==; 5:JvFMnWYHVANk3OdQyrK0Xl9PenNpaELhMIS4geGEzkJpBV43H9PQQd5VXZvDHzswddw39Y8Kvf6dXyd3zTJbQ2QaUQ4VtrIGEBOBCiLcS4rwkyCC3XSbDJ5rPmD2iAZGqgA0iKl42VUSJfIb75npITNTgFLkfVgYzyV4jkOja1A=; 7:ipvv+2CQDbNGfxB0fFffA2GycQfP4Rap6FgYpR5wIr/y422eepF+ENIHK2X6G3P4ZkB7B5OivuTBdmt/PXiWQn3PuvAa0HMCRgs81IKYB6tW3iBRb0YMKVSjbukQLwFraBC5b0QMYGVxIuC5fzckcQ==
x-ms-exchange-antispam-srfa-diagnostics: SOS;
x-ms-office365-filtering-correlation-id: 1aef0f22-ca66-4f5e-3d04-08d64396dbec
x-ms-office365-filtering-ht: Tenant
x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7193020); SRVR:AM6PR07MB5397;
x-ms-traffictypediagnostic: AM6PR07MB5397:
x-microsoft-antispam-prvs: <AM6PR07MB53970F56A56F03E0CD0E5FB080CB0@AM6PR07MB5397.eurprd07.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:(278428928389397)(17755550239193)(131327999870524)(190756311086443)(82608151540597)(195916259791689)(109105607167333);
x-ms-exchange-senderadcheck: 1
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(3231382)(11241501184)(806099)(944501410)(52105095)(93006095)(93001095)(3002001)(6055026)(148016)(149066)(150057)(6041310)(20161123560045)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(201708071742011)(7699051)(76991095); SRVR:AM6PR07MB5397; BCL:0; PCL:0; RULEID:; SRVR:AM6PR07MB5397;
x-forefront-prvs: 0848C1A6AA
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(376002)(346002)(366004)(396003)(136003)(39860400002)(199004)(189003)(97736004)(478600001)(316002)(99286004)(55016002)(6916009)(446003)(229853002)(25786009)(7696005)(14454004)(9686003)(6436002)(68736007)(476003)(486006)(76176011)(2900100001)(54906003)(86362001)(11346002)(81156014)(53936002)(2906002)(5660300001)(81166006)(8676002)(4326008)(6116002)(186003)(8936002)(74316002)(46003)(4744004)(6506007)(6246003)(33656002)(71200400001)(53546011)(106356001)(71190400001)(305945005)(7736002)(105586002)(102836004)(256004)(14444005); DIR:OUT; SFP:1102; SCL:1; SRVR:AM6PR07MB5397; H:AM6PR07MB4930.eurprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1;
received-spf: None (protection.outlook.com: nokia.com does not designate permitted sender hosts)
x-microsoft-antispam-message-info: 7YFGPQGelLufcTnLtmRLuYM0JswksCAWhNW7sR1vl58alJItbM71xiTa2Hcf47bVeQQHcdSmDi6P+eCXiNBhesVjkJOA+m3y/+XccXovrT8Fr5EHgEz7fDniU7x8q0r52eIDD0Hz97VppBsME59gAi/kHP8dySmPd5MFaXa/PX0vc+h7tUqa5DUy1kimpcfGZdGp02T/YVZHznv1MmqKAk2iJdzuGBXxyQrs86ZcPPpYjnWCWdVDuhmSNsZk3tGCWhWAwGPpfOzCBbZvALmoWMR7r3xdMNZHipjKqg0NisxUpocmNM0PFVe4EGy1lnVNVVcSXI0NNSSxerWRsU73IoonF7nzOjFUontlGn7QJUw=
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: nokia.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 1aef0f22-ca66-4f5e-3d04-08d64396dbec
X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Nov 2018 03:20:53.2726 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 5d471751-9675-428d-917b-70f44f9630b0
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR07MB5397
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/lLqjEHIh2ShEt_3bC9v6suKK6nw>
Subject: Re: [core] Review of draft-ietf-core-multipart-ct-02
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: Tue, 06 Nov 2018 03:21:00 -0000

Hi Carsten,

> Here are my two cents…
> >> 1. "that can be used to combine representations of several different
> >> media types" -- Does it have to be several media types or is 2 media
> >> types enough? 1? 0?
> >
> > s/several/two or more/ ?
>
> “Several” was not intended to exclude 2, 1, or 0.
> I see that the dictionary does this.
> (It can be 0 or 1 in the case introduced by draft-bormann-core-maybe.)

It's "[...] used to combine zero or more media types" then?

> >> 1. "into a single CoAP message-body with minimal framing overhead,
> >> each along with a CoAP Content-Format identifier." -- Can it only be
> >> used in a CoAP message-body?
> >
> > s/CoAP message-body/message/ ?
>
> Well, this is a body, which might even be transmitted in block-wise
> fashion, so it is not tied to messages.  Maybe “CoAP request or
> response body” is the best way to fit this.

Works for me.

> (There is no implication that it can’t also be used to brush your
> teeth.)

:-)

> >> 1.  "Applications using the application/multipart-core
> >> Content-Format define the internal structure of the
> >> application/multipart-core representation." -- Isn't the internal
> >> structure of the format defined by figure 1? Or is this about
> >> assigning further meaning to positions in the array?
> >
> > Yes, it's the fact that the exact position of a type inside the
> > array is part of the structural definition - in fact, the position
> > is the unique name of the field inside the aggregate type.
>
> I think Klaus wants us to point out that the application needs to stay
> in the CDDL.

The CDDL describes the syntactic constraints but the applications still
need to define the shape and semantics of their multipart blobs.  Using
a programming metaphor, the CDDL says "it's a struct", while the
applications define the fields and associated types inside the struct.

> >> 1. "For example, one way to structure the sub-types specific to an
> >> application/multipart-core container is to always include them at
> >> the same fixed position." -- Ah, I see. Join this paragraph with
> >> the previous one.
> >
> > Makes sense.
> >
> >> 1. "This specification allows to indicate that an optional part is
> >> not present by substituting a null value for the representation of
> >> the part." -- Do we need this?
> >
> > How do you suggest we deal with optional values?
>
> You could leave them out entirely, but then the application cannot
> simply use a positional structure.

Optionality by omission doesn't work in all cases (e.g., two adjacent
optional fields of the same type) and I'd rather recommend using the
positional approach which works in all cases and is trivial to
implement.  But yes, we probably shouldn't preclude the ability of the
application designer to optimise for its case.

> >> 1. "Optionally, an application might use the general format defined
> >> here, but also register a new media type and an associated
> >> Content-Format identifier -- typically one in the range 10000-64999
> >> -- instead of using application/multipart-core." -- What's an
> >> example where an application would do this? I can't imagine any
> >> where I'd recommend this.
> >
> > I don't see how that could harm (besides, if someone wants to do it,
> > we cannot prevent it); that said I'm not opposed to removing text
> > that is not strictly necessary.
>
> It was meant as an encouragement to define application-specific media
> types in a way that conforms with the structure of multipart-ct where
> that makes sense.

Either way I'm OK: I think is a good suggestion but it's not needed for
interop so we could also leave it out.

> >> 1. "typically one in the range 10000-64999" -- Better not to state
> >> the range explicitly as that locks the Content-Formats registry
> >> into providing this range for this purpose forever.
> >
> > If we remove the above, this will go together with that.
>
> Right.  We could explicitly say “First Come First Served” instead.

Works for me.

> >> 2. -- There should be a sub-section or paragraph specifying what a
> >> recipient of a application/multipart-core representation should do
> >> if it encounters something that doesn't match the grammar. Does the
> >> whole array become unusable when there is an unexpected element, or
> >> can a recipient use the array up to the unexpected element? Should
> >> a recipient try to do error recovery and skip to the next element?
> >> This has impact on how the format can be evolved in the future.
> >
> > Isn’t that application specific?
>
> Please see draft-iab-protocol-maintenance

Going back to Klaus' comment, which grammar are we talking about?  The
overarching CDDL or the application defined position-type-value?  If the
former I'm more than OK to say "fail hard and early" in this document.
If the latter, I wouldn't know how to deal with these kinds of
inconsistencies in a generally applicable way.  These things should be
left to the applications.

> >> 2. "(Future extensions might want to include additional alternative
> >> ways of specifying the media type of a representation in such a
> >> position.)" -- This side note feels a bit out of place and isn't
> >> really helpful. What should a reader of the document do with this
> >> information?
> >
> > Yep, I agree this is out of scope and we should remove it.
>
> If we don’t want to do this, we should remove it.  (I still believe we
> should do this, now.)

I think it's safer if we leave any alternative future format to a
separate multipart-ct-2.

> >> 3. -- Is the "Observing Resources" example the prime usage example
> >> for -multipart-ct? If not, shouldn't there be an example for the
> >> prime use case?
> >
> > I don't think there are prime use cases in a "hierarchical" sense.
> > Anything that fits is good to go :-)
> >
> >> 3.1. -- I see that draft-ietf-core-coap-pubsub-05 is still
> >> proposing a new response code (2.07) for this scenario. Will
> >> -pubsub switch to -multipart-ct as described in this section? If
> >> not, better remove the example.
> >
> > This one is for Carsten, but I think the example in 3.1 is not
> > necessarily pubsub specific, though clearly it applies quite well to
> > pubsub.
>
> Let’s discuss this in the WG today.

Apologies I couldn't be there, I had a conflict with TLS :-(
I'll read the minutes.

> >> 3.2 "Implementation hints" -- This doesn't seem like a usage
> >> example.  Promote it to a top-level section.
> >
> > Agree
> >
> >> 3.2 "In effect, the serialization for a single object is done by
> >> prefixing the object with information about its content-format
> >> (here: 0x82 0x00) and its length (here: 0x4b)." -- What about the
> >> array containing the two elements?
> >
> > Sorry, I don’t understand this.
>
> Klaus points out that there is one more byte, something like 0x81.

OK

> >> 4.1 "Fragment identifier considerations: N/A" -- Change to same as
> >> CBOR?
>
> Should we also copy the text: “(At publication of this document, there
> is no fragment identification syntax defined for “application/cbor”.)"
> ?
>
> >>
> >> 6.1 "[RFC7252]" -- Just to confirm: This is a normative reference
> >> because of the use of CoAP Content-Format numbers, right?
> >
> > Yes
> >
> >> 6.1 "[RFC7641]" -- This should be an informative reference, as
> >> Observe seems to be referenced only in the usage examples section.
> >
> > Agree
> >
> > Thank you very much!
>
> Indeed!

and thank you,
cheers, t

________________________________________
From: Carsten Bormann <cabo@tzi.org>
Sent: 05 November 2018 07:24:03
To: Fossati, Thomas (Nokia - GB/Cambridge)
Cc: hartke@projectcool.de; core@ietf.org
Subject: Re: [core] Review of draft-ietf-core-multipart-ct-02

Here are my two cents…

> On Oct 31, 2018, at 00:42, Fossati, Thomas (Nokia - GB/Cambridge) <thomas.fossati@nokia.com> wrote:
>
> Hi Klaus,
>
>> 1. " This memo defines application/multipart-core, an
>> application-independent media-type" -- General purpose media-type?
>> (Why does it have "core" in the name if it's general-purpose?)
>
> It's got "core" because it specifies the use of CoAP content formats for
> constructing the aggregate, but that doesn't invalidate the general
> purpose-ness, I think.

Indeed.

>> 1. "that can be used to combine representations of several different
>> media types" -- Does it have to be several media types or is 2 media
>> types enough? 1? 0?
>
> s/several/two or more/ ?

“Several” was not intended to exclude 2, 1, or 0.
I see that the dictionary does this.
(It can be 0 or 1 in the case introduced by draft-bormann-core-maybe.)

>> 1. "into a single CoAP message-body with minimal framing overhead,
>> each along with a CoAP Content-Format identifier." -- Can it only be
>> used in a CoAP message-body?
>
> s/CoAP message-body/message/ ?

Well, this is a body, which might even be transmitted in block-wise fashion, so it is not tied to messages.
Maybe “CoAP request or response body” is the best way to fit this.
(There is no implication that it can’t also be used to brush your teeth.)

>> 1.  "Applications using the application/multipart-core Content-Format
>> define the internal structure of the application/multipart-core
>> representation." -- Isn't the internal structure of the format defined
>> by figure 1? Or is this about assigning further meaning to positions
>> in the array?
>
> Yes, it's the fact that the exact position of a type inside the array is
> part of the structural definition - in fact, the position is the unique
> name of the field inside the aggregate type.

I think Klaus wants us to point out that the application needs to stay in the CDDL.

>> 1. "For example, one way to structure the sub-types specific to an
>> application/multipart-core container is to always include them at the
>> same fixed position." -- Ah, I see. Join this paragraph with the
>> previous one.
>
> Makes sense.
>
>> 1. "This specification allows to indicate that an optional part is not
>> present by substituting a null value for the representation of the
>> part." -- Do we need this?
>
> How do you suggest we deal with optional values?

You could leave them out entirely, but then the application cannot simply use a positional structure.

>> 1. "Optionally, an application might use the general format defined
>> here, but also register a new media type and an associated
>> Content-Format identifier -- typically one in the range 10000-64999 --
>> instead of using application/multipart-core." -- What's an example
>> where an application would do this? I can't imagine any where I'd
>> recommend this.
>
> I don't see how that could harm (besides, if someone wants to do it, we
> cannot prevent it); that said I'm not opposed to removing text that is
> not strictly necessary.

It was meant as an encouragement to define application-specific media types in a way that conforms with the structure of multipart-ct where that makes sense.

>
>> 1. "typically one in the range 10000-64999" -- Better not to state the
>> range explicitly as that locks the Content-Formats registry into
>> providing this range for this purpose forever.
>
> If we remove the above, this will go together with that.

Right.  We could explicitly say “First Come First Served” instead.

>> 2. -- There should be a sub-section or paragraph specifying what a
>> recipient of a application/multipart-core representation should do if
>> it encounters something that doesn't match the grammar. Does the whole
>> array become unusable when there is an unexpected element, or can a
>> recipient use the array up to the unexpected element? Should a
>> recipient try to do error recovery and skip to the next element? This
>> has impact on how the format can be evolved in the future.
>
> Isn’t that application specific?

Please see draft-iab-protocol-maintenance

>> 2. "(Future extensions might want to include additional alternative
>> ways of specifying the media type of a representation in such a
>> position.)" -- This side note feels a bit out of place and isn't
>> really helpful. What should a reader of the document do with this
>> information?
>
> Yep, I agree this is out of scope and we should remove it.

If we don’t want to do this, we should remove it.
(I still believe we should do this, now.)

>> 3. -- Is the "Observing Resources" example the prime usage example for
>> -multipart-ct? If not, shouldn't there be an example for the prime use
>> case?
>
> I don't think there are prime use cases in a "hierarchical" sense.
> Anything that fits is good to go :-)
>
>> 3.1. -- I see that draft-ietf-core-coap-pubsub-05 is still proposing a
>> new response code (2.07) for this scenario. Will -pubsub switch to
>> -multipart-ct as described in this section? If not, better remove the
>> example.
>
> This one is for Carsten, but I think the example in 3.1 is not
> necessarily pubsub specific, though clearly it applies quite well to
> pubsub.

Let’s discuss this in the WG today.

>> 3.2 "Implementation hints" -- This doesn't seem like a usage example.
>> Promote it to a top-level section.
>
> Agree
>
>> 3.2 "In effect, the serialization for a single object is done by
>> prefixing the object with information about its content-format (here:
>> 0x82 0x00) and its length (here: 0x4b)." -- What about the array
>> containing the two elements?
>
> Sorry, I don’t understand this.

Klaus points out that there is one more byte, something like 0x81.

>> 4.1 "Fragment identifier considerations: N/A" -- Change to same as
>> CBOR?

Should we also copy the text: “(At
      publication of this document, there is no fragment identification
      syntax defined for “application/cbor”.)"
?

>>
>> 6.1 "[RFC7252]" -- Just to confirm: This is a normative reference
>> because of the use of CoAP Content-Format numbers, right?
>
> Yes
>
>> 6.1 "[RFC7641]" -- This should be an informative reference, as Observe
>> seems to be referenced only in the usage examples section.
>
> Agree
>
> Thank you very much!

Indeed!

Grüße, Carsten