Re: ISSUE-31: Are Operations violating REST's uniform interface constraint?

>
> The HTTP methods are fixed and already have a very generic, but well defined semantics that cannot be changed until the HTTP spec changes them. They cannot be subclassed or extended. Once a message leaves the client, this is JSON-LD request sent over POST and that’s all anyone sees when it’s in flight. At present, Hydra suggests that we can subclass the HTTP methods with additional semantics. Take the following example:
>
> {
>    "@context": "http://www.w3.org/ns/hydra/context.jsonld",
>    "@id": "http://example.com/search",
>    "hyrda:operation":
>      {
>        "@type": "Search",
>        "method": "POST"
>        "expects" : "#SearchRequest"
>      }
> }
>
> To the uninitiated, this might suggest that we are subclassing POST and adding additional semantics to it, especially if we include return types and status codes.

I don't see any subclassing here. My mental model is rather a layered 
approach, like in the ISO/OSI model [1] model for interconnection:
On layer n we have HTTP with its well defined methods. On layer n + 1 we 
have an operation specified by the @type which is
in-turn defined in a vocab using the incredibly advanced semweb 
standards we have at our hands.
The operation is utilizing the capabilities of layer n - 1 (HTTP POST) 
but does not change its semantic.

Now we cannot expect that intermediaries like proxies are smart enough 
to resolve the meaning of operations
and adapt correspondingly (although theoretically they could). More 
likely they will go through the same evolution
as firewalls and load balancers did. When they became available, they 
started caring only about layer 3
but meanwhile they work on layer 7. With well established operations, 
they can be taught how to react on them.

Today's intermediaries which only understand HTTP are dump from that 
perspective and that's ok
because this is in accordance with the OSI-Model: Communication partners 
exclusively communicate with
their counterpart on the same layer.

I get the impression that some people desperately want to make those 
intermediaries smarter than they
are only because we use HTTP. But no matter how we format our messages 
and what concepts we introduce
in hydra they won't get any smarter.

[1] http://en.wikipedia.org/wiki/OSI_model


Thomas

Received on Saturday, 15 February 2014 18:26:57 UTC