Re: [apps-discuss] New Version Notification for draft-hamnaberg-publish-link-relation-00.txt

Darrel Miller <darrel.miller@gmail.com> Wed, 15 January 2014 22:18 UTC

Return-Path: <darrel.miller@gmail.com>
X-Original-To: apps-discuss@ietfa.amsl.com
Delivered-To: apps-discuss@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 3BB8E1AE266 for <apps-discuss@ietfa.amsl.com>; Wed, 15 Jan 2014 14:18:38 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.4
X-Spam-Level:
X-Spam-Status: No, score=-1.4 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, J_CHICKENPOX_37=0.6, SPF_PASS=-0.001] autolearn=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 wUZvxBrZa7Uj for <apps-discuss@ietfa.amsl.com>; Wed, 15 Jan 2014 14:18:36 -0800 (PST)
Received: from mail-ig0-x22e.google.com (mail-ig0-x22e.google.com [IPv6:2607:f8b0:4001:c05::22e]) by ietfa.amsl.com (Postfix) with ESMTP id 5A9771AE42B for <apps-discuss@ietf.org>; Wed, 15 Jan 2014 14:18:36 -0800 (PST)
Received: by mail-ig0-f174.google.com with SMTP id hl1so9005779igb.1 for <apps-discuss@ietf.org>; Wed, 15 Jan 2014 14:18:24 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:content-type:content-transfer-encoding; bh=Jxn9ISONOQjKNzLfLE+SR5Fu1xvXS8gkZfdSSJOrOu8=; b=JNh2FHbRm/bZ976PGdaNUhNGOSd06LEIgghMdhzlJAB1TyaNpIjPq857tS5to9yAli +mLVNxeOW3X6ezcaxCQl/PjC3xOt8Crpz3IMxeyyRoziPEiATW1SqrnlxHPg63s+JfC7 OlAL7lcOS6i6Y7CdB4WCZmC9B95IHPh75CCukeawMj3UCR9WRQ5jKuMuJxda/N3DNuAL RIS4UDrdzH5WTUzgnboz6Lrkfoe1IP1Ayyr5R+xsptpyEzV7MZ5YEDW7F+BrV6rbbVmu 8fE+lM4HlmeI9N+ElajzPxIZX2QP2oPpea4Nce/d4PekE2Dehk2A9FtAqLL97WTaMqs8 VqHg==
MIME-Version: 1.0
X-Received: by 10.50.29.114 with SMTP id j18mr5645924igh.24.1389824304441; Wed, 15 Jan 2014 14:18:24 -0800 (PST)
Received: by 10.42.195.206 with HTTP; Wed, 15 Jan 2014 14:18:24 -0800 (PST)
In-Reply-To: <4ACFE05D-D204-4363-9A8B-AAC7F0695D66@nordsc.com>
References: <20140115140544.27701.78043.idtracker@ietfa.amsl.com> <CAGuwm8V+cFGE4aYP4rsZtGQR3_NPBOxf_t_BRgfxQbbTvOJTVQ@mail.gmail.com> <F1F4C81D-5106-46B9-9A4C-B3C2F696A07F@nordsc.com> <CAGuwm8Vh_bAKW9Lo3qLy5Usb5atM52BQ3cm_4WGc0X1--3QvKA@mail.gmail.com> <05628088-5731-4BEB-BD79-7C83896279FF@nordsc.com> <CAPW_8m66V2YJeGMK3zN_qnKpph8ujnrA85585FFwLoBtfWvfXA@mail.gmail.com> <CAKioOqt4-7tOoN66zth2vatLUFBXRSRaG4973trpEQRMP9dyYQ@mail.gmail.com> <4ACFE05D-D204-4363-9A8B-AAC7F0695D66@nordsc.com>
Date: Wed, 15 Jan 2014 17:18:24 -0500
Message-ID: <CAKioOquOW1Gogr5SR3E88=U31rvk8LEya62bJg++KbuXDXF+iA@mail.gmail.com>
From: Darrel Miller <darrel.miller@gmail.com>
To: IETF Apps Discuss <apps-discuss@ietf.org>
Content-Type: text/plain; charset="windows-1252"
Content-Transfer-Encoding: quoted-printable
Subject: Re: [apps-discuss] New Version Notification for draft-hamnaberg-publish-link-relation-00.txt
X-BeenThere: apps-discuss@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: darrel@tavis.ca
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, 15 Jan 2014 22:18:38 -0000

Jan,


On Wed, Jan 15, 2014 at 4:35 PM, Jan Algermissen
<jan.algermissen@nordsc.com> wrote:
>
> Uuuh - POST means POST ("process this"). A link rel cannot re-specify that.
>
> The rel conveys information about the nature of a target resource. This helps the client to form an expection about the resource and interact with it if it is programmed to do so. Maybe the resource does not even support a POST.
>

So, you agree that the rel "conveys the nature of a target resource".
And httpbis says

"The POST method requests that the target resource process the
representation enclosed in the request according to the resource's own
specific semantics."

So, if we put those two together then we can determine that the rel
defines the nature of the target resource and the resource defines the
semantics of POST for interactions with that resource.  Hence, I'm
going to conclude that it is not a huge stretch to say that you can
use link relations to define the semantics of a POST.

>>
>> If that concerns you then do you have suggestions on how the these
>> link relations should work:
>>
>> rel=payment        https://web-payments.org/specs/source/payment-links/
>
> You are loosing me here ... "payment" already exists in <http://tools.ietf.org/html/rfc5988#section-6.3>. And why is that spec not defining URI template variables and references the URI Template draft? <http://tools.ietf.org/html/rfc6570>
>

Yes rel="payment" does exist already and as far as I know no-one
defined what it really did, or how to use it, so no-one used it.
Someone now is actually trying to define some real semantics for it so
that it can actually be useful.


>
>> rel=hub
>> https://pubsubhubbub.googlecode.com/git/pubsubhubbub-core-0.4.html
>
> The target 'is a hub' - what else do I need to know?
>

Where in the HTTP spec does it tell me what are the consequences of
doing a POST to link with rel="hub"?  If that information shouldn't be
in the link relation specification, where should it be?


>> rel=oauth2-token http://tools.ietf.org/html/draft-wmills-oauth-lrdd-07#page-8
>
> target is a resource where I can obtain an oauth2 token
>

How do you get a token?  By doing a GET? a POST?  Where should this be
documented?


>>
>> As far as I understand it, all of these have an associated meaning to
>> a POST request.
>
> Which is simpl not possible - you cannot override HTTP and still be 'within the system'. If you associate meaning with POST, you are defining an application protocol on top of HTTP.
>

But we are not redefining the meaning of POST.  Httpbis _explicitly_
says the meaning of POST is defined by the target resource and the rel
tells me that kind of resource that target resource is.


>>  Curiously, that meaning is not described in the rel
>> relation registration, but in the specification that describes the
>> protocol that uses the link relation.
>
> Which you can, if you mark it as a 'hint' or 'example' - just do not trick the client into making assumptions that REST deliberately wants the client *not* to make.
>

Let me quote from Roy's famous "REST APIs must be hypertext driven" blog post.

"The only types that are significant to a client are the current
representation’s media type and standardized relation names."

Let me re-phrase that to make my point.  Standard relation names can
be significant to the client.  I.e. In the same way we know from the
content-Type text/html that a tag called <form> can cause the user
agent to generate a POST request with a body
application/x-www-form-urlencoded we can use "Standardized relation
names" to tell the client how to generate POST requests with specific
media types.   Or is your assertion web browsers are making a non
RESTful assumption?


> The most interesting thing about all this is, IMHO, that you frankly do not need to know, because the method to use is usually sraight forward given the context. I mean, what method would you use for obtaining an oauth2 token?

So, are you asserting is that it is straightforward to know that you
must do a POST with application/x-www-form-urlencoded and a subset of
the following parameters:
grant_type,code,redirect_uri,username,password,scope.  And don't
forget each of those parameters have certain constraints defined by
the OAuth framework.

I apologize if any of this comes across as aggressive, I have tried to
filter out how annoyed I am, but may have failed.  I completely
respect your opinion.  I don't agree with it, but I hope we can work
towards a common ground.


Darrel