Re: [T2TRG] [core] New CoAP Options on the horizon - Accept-Content-Format-Version and Content-Format-Version

"Kovatsch Matthias" <kovatsch@inf.ethz.ch> Thu, 13 April 2017 14:52 UTC

Return-Path: <kovatsch@inf.ethz.ch>
X-Original-To: t2trg@ietfa.amsl.com
Delivered-To: t2trg@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 96815129AA1 for <t2trg@ietfa.amsl.com>; Thu, 13 Apr 2017 07:52:46 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.9
X-Spam-Level:
X-Spam-Status: No, score=-6.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RP_MATCHES_RCVD=-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 nmgccwkkR7nI for <t2trg@ietfa.amsl.com>; Thu, 13 Apr 2017 07:52:43 -0700 (PDT)
Received: from edge20.ethz.ch (edge20.ethz.ch [82.130.99.26]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 39DAE129544 for <t2trg@irtf.org>; Thu, 13 Apr 2017 07:52:43 -0700 (PDT)
Received: from CAS11.d.ethz.ch (172.31.38.211) by edge20.ethz.ch (82.130.99.26) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 13 Apr 2017 16:52:40 +0200
Received: from MBX210.d.ethz.ch ([fe80::ed77:7d47:9467:69a9]) by CAS11.d.ethz.ch ([fe80::ecc9:4e2d:b26b:1614%10]) with mapi id 14.03.0319.002; Thu, 13 Apr 2017 16:52:41 +0200
From: Kovatsch Matthias <kovatsch@inf.ethz.ch>
To: Alexander Pelov <alexander@ackl.io>, Klaus Hartke <hartke@tzi.org>
CC: Core <core@ietf.org>, "t2trg@irtf.org" <t2trg@irtf.org>
Thread-Topic: [core] New CoAP Options on the horizon - Accept-Content-Format-Version and Content-Format-Version
Thread-Index: AQHSsTtrL6aNZ+doiUmoAcAVC3mrcaG8/m6AgABVhQCABhJz0A==
Date: Thu, 13 Apr 2017 14:52:40 +0000
Message-ID: <55877B3AFB359744BA0F2140E36F52B558B2C574@MBX210.d.ethz.ch>
References: <AD3582C3-F4E8-4439-A30B-6F4C89131E50@ackl.io> <CAAzbHvYyn2DfM6udPmNTw=G5OxhCd5KraCpcKEDDzpEPLrX+Ow@mail.gmail.com> <EB274CB7-2EDD-43AE-BEFC-54E42E5C419E@ackl.io>
In-Reply-To: <EB274CB7-2EDD-43AE-BEFC-54E42E5C419E@ackl.io>
Accept-Language: en-US, de-CH
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [188.195.112.97]
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
Archived-At: <https://mailarchive.ietf.org/arch/msg/t2trg/46wdrz47hMuY966Eb0HtAvoE8Bw>
Subject: Re: [T2TRG] [core] New CoAP Options on the horizon - Accept-Content-Format-Version and Content-Format-Version
X-BeenThere: t2trg@irtf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: "IRTF Thing-to-Thing \(T2T\) Research-Group-in-creation" <t2trg.irtf.org>
List-Unsubscribe: <https://www.irtf.org/mailman/options/t2trg>, <mailto:t2trg-request@irtf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/t2trg/>
List-Post: <mailto:t2trg@irtf.org>
List-Help: <mailto:t2trg-request@irtf.org?subject=help>
List-Subscribe: <https://www.irtf.org/mailman/listinfo/t2trg>, <mailto:t2trg-request@irtf.org?subject=subscribe>
X-List-Received-Date: Thu, 13 Apr 2017 14:52:47 -0000

Hi all

I want to point out that this is related to the parameter option discussion we had for a long time: https://tools.ietf.org/html/draft-doi-core-parameter-option-03
The work was dropped because there was too much resistance to include this feature (it least in my understanding).

Coming from the design guidelines discussed in T2TRG, it is expected that versioning is handled within the representation format (while a good design also ensures backward and forward compatibility). If a representation format is not compatible with previous versions, it is a different format that needs a new media type, and hence CoAP identifier.
(Note that these guidelines have not reached consensus, and hence cannot be referenced. Please add other views; it might be a valuable T2TRG discussion.)

Ciao
Matthias

> -----Original Message-----
> From: core [mailto:core-bounces@ietf.org] On Behalf Of Alexander Pelov
> Sent: Sunday, 9 April 2017 22:01
> To: Klaus Hartke <hartke@tzi.org>
> Cc: Core <core@ietf.org>
> Subject: Re: [core] New CoAP Options on the horizon - Accept-Content-Format-
> Version and Content-Format-Version
> 
> Hi Klaus,
> 
> 
> > Le 9 avr. 2017 à 16:54, Klaus Hartke <hartke@tzi.org> a écrit :
> >
> > Alexander Pelov wrote:
> >> IANA has received a request from Michael Koster to register two new
> >> CoAP
> >> options:
> >> - Accept-Content-Format-Version
> >> - Content-Format-Version
> >
> > Spec?
> >
> >> One of the major questions that needs to be discussed is the following:
> >
> > What are the other questions?
> 
> The other questions are mostly details that we can (easily) figure out once the
> major one is answered. For example, should the Accept-Content-Format-Version
> be Repeatable or Not? (I don’t want to get to more details on this for the
> moment - and they will surely come up if necessary).
> 
> >
> >> What are the reasons *NOT* to allocate a new Content-Format number
> >> (RFC
> >> 7252) for each new version? (in the HTTP world, "version" is a simple
> >> parameter to the Content-Type, so why not treat it as such?)
> >
> > None?
> >
> >> The question is not trivial, as it touches upon content format
> >> negotiation, e.g. how  should the Server use the
> >> Accept-Content-Format-Version in order to indicate that it is willing
> >> to accept both application/vnd.ocf+cbor AND
> >> application/application/vnd.ocf+cbor;version=2.0, with a preference
> >> for the latter? In the semantics of the version parameter, the two should be
> considered completely independent/incompatible types.
> >
> > CoAP currently has no features for content format negotiation, only
> > for the selection of an available content format. If a server wishes
> > to indicate available content formats, it needs to do so in the
> > (hypermedia) representation. (The CoAP Accept option can only be used
> > in requests, not in responses.)
> >
> > Are the two options a proposal to change that?
> >
> > Need spec.
> 
> Yes, you are right indeed. The *Client* indicates in its CoAP Accept option the
> Content-Format it is willing to accept. Now, if you have the same Content-
> Format, but with different versions, then you could imagine having something
> like:
> Accept: 10000 (which maps to application/application/vnd.ocf+cbor)
> Accept-Content-Format-Version: 2.0
> 
> Instead of:
> Accept: 10001 (application/application/vnd.ocf+cbor;version=2.0 which would
> need to be registered to 10001 for example)
> 
> The intent here is to always indicate "10000" in your hypermedia links, and
> without changing them to be able to upgrade/downgrade the version of the
> content-format (e.g. I like to think of this as changing APIs - you upgrade a Client,
> and then it is on ver2 - but still using the original Content-Format, but this may
> not be the only reason Michael proposes these options).
> 
> >
> >> The current way of doing this would be to allocate separate
> >> Content-Format numbers to "application/application/vnd.ocf+cbor"
> >> (10000 as it stands now) and
> >> "application/application/vnd.ocf+cbor;version=2.0" (e.g. 10001).. and then
> use some form of content negotiation.
> >
> > Yes.
> >
> >> This however can have its disadvantages, .. and the way industry does
> >> use versioning in some cases (e.g. people DO use the version
> >> parameter to version their RESTful APIs.. which means, that NOT
> >> having such mechanism in CoAP could theoretically drive them to
> >> re-register blocks of Content-Format numbers, just to differentiate between
> their APIs).
> >
> > Working as intended.
> >
> >> In any case, we need to have this discussion documented on the
> >> mailing list (as previously discussed with Michael), so here we go..
> >
> > I'm sure Michael has analyzed the problem, evaluated different options
> > to solve the problem, and contacted the experts with the best solution
> > he could find. However, since the identifier spaces in CoAP are so
> > small and the unrestricted addition of new CoAP features can lead to
> > fragmentation, every addition must be carefully considered. For that,
> > it is really helpful to establish an understanding of the problem
> > before pushing a particular solution.
> 
> I agree with you on this. Having this understanding - and documented on the
> mailing list - is the intent of this discussion.
> 
> Alexander
> 
> 
> >
> > Klaus
> >
> > _______________________________________________
> > core mailing list
> > core@ietf.org
> > https://www.ietf.org/mailman/listinfo/core
> 
> _______________________________________________
> core mailing list
> core@ietf.org
> https://www.ietf.org/mailman/listinfo/core