Re: [apps-discuss] New Version Notification for draft-nottingham-link-hint-00.txt

Erik Wilde <dret@berkeley.edu> Fri, 05 July 2013 15:00 UTC

Return-Path: <dret@berkeley.edu>
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 1334B21F9E76 for <apps-discuss@ietfa.amsl.com>; Fri, 5 Jul 2013 08:00:35 -0700 (PDT)
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 jbqC58fhKbep for <apps-discuss@ietfa.amsl.com>; Fri, 5 Jul 2013 08:00:28 -0700 (PDT)
Received: from cm03fe.IST.Berkeley.EDU (cm03fe.IST.Berkeley.EDU [169.229.218.144]) by ietfa.amsl.com (Postfix) with ESMTP id 41B4821F9DDD for <apps-discuss@ietf.org>; Fri, 5 Jul 2013 08:00:28 -0700 (PDT)
Received: from 46-126-158-51.dynamic.hispeed.ch ([46.126.158.51] helo=dretpro.local) by cm03fe.ist.berkeley.edu with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.76) (auth plain:dret@berkeley.edu) (envelope-from <dret@berkeley.edu>) id 1Uv7Un-0000VC-CV; Fri, 05 Jul 2013 08:00:27 -0700
Message-ID: <51D6DF85.4060309@berkeley.edu>
Date: Fri, 05 Jul 2013 17:00:21 +0200
From: Erik Wilde <dret@berkeley.edu>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130307 Thunderbird/17.0.4
MIME-Version: 1.0
To: Mark Nottingham <mnot@mnot.net>
References: <20130610033804.19451.29465.idtracker@ietfa.amsl.com> <E6062DBC-CD7B-47CA-A6F0-5E7D64C0DB55@mnot.net> <51B7AEAF.20404@berkeley.edu> <4CD4652F-4EAF-4258-A6EB-577019018D2C@mnot.net> <1A136C4D-4F0C-446F-B307-D53FB9A40622@cs.tcd.ie> <8BE038EC-1580-4D27-ABBA-1890EEFD4853@mnot.net> <51C9C91D.90206@berkeley.edu> <4C2FD8A7-4F3E-433B-A7F6-F0BD751D31AD@mnot.net> <51CB240C.3060101@berkeley.edu> <F2662B38-CDD6-401D-85F8-438FF67AFAFF@mnot.net> <51CB8646.60101@berkeley.edu> <873F3899-2365-4F13-A485-8924E67294FA@mnot.net>
In-Reply-To: <873F3899-2365-4F13-A485-8924E67294FA@mnot.net>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 7bit
Cc: IETF Apps Discuss <apps-discuss@ietf.org>, REST-Discuss Discuss <rest-discuss@yahoogroups.com>
Subject: Re: [apps-discuss] New Version Notification for draft-nottingham-link-hint-00.txt
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: Fri, 05 Jul 2013 15:00:38 -0000

hello mark.

On 2013-07-04 3:30 , Mark Nottingham wrote:
>> none of these representations would be binding, they would just be one way of mapping the abstract link hint model into some concrete model. i guess the only exception for this would be how to represent links outside of media types, i.e. in HTTP. http://tools.ietf.org/html/draft-nottingham-link-hint-00#appendix-A could be changed then to map the abstract moden into a concrete JSON syntax (or whatever else looks like a good syntax choice to go into a Link header).
> I'm all for that, IF we can be reasonably sure that the current data can fit comfortably into that simplified model.
> The current hints that use "complex" objects are (keeping in mind that we've just started):
>   - formats
>   - links
>   - accept-post (same format as formats)
>   - auth-schemes
> Formats and accept-post COULD specify a list of strings, and state that it's either a media type OR a profile URI. This means we'd need a separate representation format for profiles, which would need to convey a media type.
> This is certainly possible, but the downsides I see are:
>    - It's baking in profiles in at a pretty high level. I like some aspects of profiles, but they certainly haven't taken off in mindshare yet.
>    - Parsing the string to check which it is is nasty.
> For auth-schemes, we'd need to specify a tuple, probably. Not great, but OK. Extensibility would be right out the window, though, which may be significant for some schemes.
> Links are fundamentally not possible without some really ugly mapping to a string, I think.

i guess that's true. but i have to admit that i am struggling a bit with 
that specific hint anyway. it can hint at links you might find at the 
target resource. it may contain hints, so it can also contain link 
hints. so in theory, you could build a multi-level structure of links to 
be expected several link traversals away, right?

more generally speaking, i am having troubles rationalizing hints that 
give me some "preview" of the target resource. my personal mental model 
of link hints is that they constrain interactions with the target 
resource, but really don't tell you what to expect.

is http://tools.ietf.org/html/draft-nottingham-json-home-03#section-9 
(the separation into "resource" and "representation" hints in the home 
draft, where the link hint idea started) what might make te difference 
between hints talking about interactions, and hints talking about the 
result of an interaction?

> My concern is that this is starting not to meet my use cases for json-home, which is where link-hints comes from.

that would be bad, but again, i am struggling a bit with the hints that 
tell you what to expect, and not just what to do. my thoughts were that 
hints should just be about what to do; do you have a different model in 
mind?

> While I could address this by making those things NOT link hints, but other "bumps" on json-home, it would make it significantly more complex. That seems like a poor tradeoff, considering that it's *possible* to map generic hints into XML, it's just not "pretty."
> To be brutally frank (and I'm sure this isn't going to surprise you too much, dret ;) I don't see a lot of value in catering to the XML API market; it's dying, and introducing constraints on the JSON APIs seems like a bad tradeoff.

yes, i am not overly surprised ;) but i am not really trying to optimize 
this for XML, i just try to make it more workable for non-JSON consumers 
in general. and i am still hoping that somebody will be able to point to 
prior decisions that were made in similar situations: are there IANA 
registries that are using JSON as a data model for their entries, and 
which other approaches were taken in cases where registries attempted to 
register structured entries? maybe we should just use ASN.1... ;-)

> I absolutely acknowledge that JSON will one day face its own demise, and will be in a similar situation, but planning for that seems like premature optimisation to me.

sure, and if the consensus is that it's ok to have JSON-based 
registries, then this is how it is. personally, i think i will then use 
serialized JSON in XML representations, which are a little less horrible 
to look at than generic JSON serialized in JSON.

>> but again, of course my option (c) means that link hints have a predefined and probably small set of structures that hints can use to expose whatever they want to expose, and if they want to go beyond that, that's not covered by the link hint framework anymore.
> Yes. That's what I'm struggling with. We're already seeing a number of places that chafe against these constraints, and we're just getting started.
> What do other folks think?

good point, so far it's just mark and me. anybody who faced similar 
design issues who could share their considerations and decisions?

thanks and cheers,

dret.

-- 
erik wilde | mailto:dret@berkeley.edu  -  tel:+1-510-2061079 |
            | UC Berkeley  -  School of Information (ISchool) |
            | http://dret.net/netdret http://twitter.com/dret |