Re: [apps-discuss] proposal: adding profile support to JSON

"Rushforth, Peter" <Peter.Rushforth@NRCan-RNCan.gc.ca> Wed, 06 November 2013 16:56 UTC

Return-Path: <Peter.Rushforth@NRCan-RNCan.gc.ca>
X-Original-To: apps-discuss@ietfa.amsl.com
Delivered-To: apps-discuss@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id C547B21F9F08 for <apps-discuss@ietfa.amsl.com>; Wed, 6 Nov 2013 08:56:44 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.599
X-Spam-Level:
X-Spam-Status: No, score=-6.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ilcks5Irp4lO for <apps-discuss@ietfa.amsl.com>; Wed, 6 Nov 2013 08:56:39 -0800 (PST)
Received: from nrcan.gc.ca (s-bsc-edge1.nrcan.gc.ca [132.156.238.13]) by ietfa.amsl.com (Postfix) with ESMTP id 822D421F8415 for <apps-discuss@ietf.org>; Wed, 6 Nov 2013 08:56:28 -0800 (PST)
Received: from S-BSC-CAS1.nrn.nrcan.gc.ca (132.156.238.11) by S-BSC-EDGE1.nrcan.gc.ca (132.156.238.13) with Microsoft SMTP Server (TLS) id 14.2.342.3; Wed, 6 Nov 2013 11:56:25 -0500
Received: from S-BSC-MBX1.nrn.nrcan.gc.ca ([169.254.1.186]) by S-BSC-CAS1.nrn.nrcan.gc.ca ([fe80::a1cd:5722:74ed:d1fd%21]) with mapi id 14.02.0342.003; Wed, 6 Nov 2013 11:56:25 -0500
From: "Rushforth, Peter" <Peter.Rushforth@NRCan-RNCan.gc.ca>
To: Mark Baker <distobj@acm.org>, Erik Wilde <dret@berkeley.edu>
Thread-Topic: [apps-discuss] proposal: adding profile support to JSON
Thread-Index: AQHO2LoGs7m3K3yZ+k2Edv+Q9dGPQpoWp+WAgAB6A4CAABEggIAAGoMAgAFLpQD//9JM8A==
Date: Wed, 06 Nov 2013 16:56:24 +0000
Message-ID: <1CD55F04538DEA4F85F3ADF7745464AF24A8A389@S-BSC-MBX1.nrn.nrcan.gc.ca>
References: <5276878A.6000802@berkeley.edu> <5278AF21.90605@it.aoyama.ac.jp> <CAHBU6iuAoNT1QYH3DKA_KFA4Ngm5Y2hyHm-2_8z5kv8fGKHY1Q@mail.gmail.com> <CALcoZiqL5ATz0nL4DDy+uadG2Q7iqUDvifGL+9v642-+nXAy7w@mail.gmail.com> <52793A16.8060301@berkeley.edu> <CALcoZirtYd-HQBZ8OTVc70g8j=ybULk5JHzSbe49J6g0Pg35nw@mail.gmail.com>
In-Reply-To: <CALcoZirtYd-HQBZ8OTVc70g8j=ybULk5JHzSbe49J6g0Pg35nw@mail.gmail.com>
Accept-Language: en-CA, en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [132.156.238.22]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Cc: "apps-discuss@ietf.org application-layer protocols" <apps-discuss@ietf.org>
Subject: Re: [apps-discuss] proposal: adding profile support to JSON
X-BeenThere: apps-discuss@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: General discussion of application-layer protocols <apps-discuss.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/apps-discuss>
List-Post: <mailto:apps-discuss@ietf.org>
List-Help: <mailto:apps-discuss-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 06 Nov 2013 16:56:44 -0000

Hey Mark,

> -----Original Message-----
> From: apps-discuss-bounces@ietf.org 
> [mailto:apps-discuss-bounces@ietf.org] On Behalf Of Mark Baker
> Sent: November 6, 2013 09:21
> To: Erik Wilde
> Cc: apps-discuss@ietf.org application-layer protocols
> Subject: Re: [apps-discuss] proposal: adding profile support to JSON
> 
> Hi Erik,
> 
> On Tue, Nov 5, 2013 at 1:33 PM, Erik Wilde <dret@berkeley.edu> wrote:
> > hello mark.
> >
> >
> > On 2013-11-05, 08:59 , Mark Baker wrote:
> >>
> >> On Tue, Nov 5, 2013 at 10:57 AM, Tim Bray 
> <tbray@textuality.com> wrote:
> >>>
> >>> Well, for example, 
> >>> http://www.tbray.org/tmp/draft-bray-i-json-01.html
> >>
> >> I'm with Martin. What that spec is trying to do with 
> profiles is to 
> >> supplant the typical role of a media type. If it's 
> representative of 
> >> what Erik has in mind for the use of a profile parameter with Atom 
> >> (or anywhere), then I think that needs to be reconsidered too.
> >
> >
> > i understand your concerns, but profiles do not attempt to "replace 
> > media types", even though they could be (mis-)used to try 
> to do just 
> > that. [1] tries to explain the goal: they are for 
> specializing and/or 
> > constraining existing media types; representing both the 
> nature of the 
> > underlying type ("this is an atom feed and can be processed as a 
> > generic feed") as well as the specialized/constrained 
> profile ("this 
> > feed carries podcast data, and can be processed as a podcast feed").
> 
> I've read your RFC, and both referenced blog posts, but still 
> find myself asking the same question; what problem does it 
> solve? Yes, media types have their issues, but in my many 
> years in Web development and standardization, I've yet to 
> encounter a problem that didn't have a workable solution 
> through the correct use of link relations and media types. 
> This includes my time advising on the development of a 
> compound document editor at Justsystem, and representing them 
> on the W3C Compound Document Formats WG.
> 
> We agree that a document containing some OPDS extensions is 
> still an Atom document that can be delivered as 
> application/atom+xml, I believe. You appear to suggest that 
> there's value in exposing the existence of those OPDS 
> extensions using an additional external metadata protocol 

> element. I believe that this is at best an optimization, 
> since the consumer can easily detect the existence of the 
> extension by inspecting the content 

How can the consumer *request* the extended semantics, if not through the media type?
Lots of stuff gets transmitted under guise of text/html, application/xml, application/json
that should be encouraged to register.

> But at worst, it's a 
> recipe for interop problems; does the meaning of the document 
> change if the profile is declared vs not? 

According to RFC 2045, it falls back to the base media type/subtype without 
that parameter.

"   Parameters are modifiers of the media subtype, and as such do not
   fundamentally affect the nature of the content. 
...
   MIME implementations must ignore any parameters whose names they do not
   recognize."

> What if the v2 
> profile URI is declared and the document contains a v1 
> extension? .

That would be an error, unless v1 is wholly included in v2.

Furthermore, media type parameters are meant to help the
client interpret the meaning of the message.  An optional parameter should not
be not a 'slot', it should be a recommendation to future registrations to define
values of it.  I think the recommended use of a URI perhaps
leads one to think it can be assigned ad hoc.  I think values 
should be registered, like what Tim is doing.

> > james snell blogged about the bigger problem [2] that media 
> types as 
> > they are today are not a terribly well-designed concept.
> 
> I strongly disagree with that post (blog commenting seems 
> broken, but I won't respond in detail here except to say 
> "rel=icon" :). I believe media types are far better designed 
> than is commonly appreciated; a single label for a compatible 
> evolution of a document format is a simple yet extremely 
> powerful protocol that promotes compatibility in extensions 
> and penalizes incompatible deviations... but still permits 
> them when required.

+1


> 
> And FWIW, this is coming from the guy who, AFAIK, started the 
> whole profile parameter ball rolling in RFC 3236. That went 
> in there only as a compromise with the WAPforum, but was 
> never/rarely used in practice.

Interesting, thanks for pointing that out.

Regards,
Peter Rushforth