Re: Hydra and the uniform interface

Just a quick chime in,

On Nov 26, 2013, at 11:11 AM, Mark Baker <distobj@acm.org> wrote:
> 	
>> Do you really think POST/PUT etc. are enough? Or do you shove those
>> semantics in to the media type? They need to be somewhere... currently they
>> are documented in prose out of band.
> 
> I feel that the uniform interface is  sufficient, yes (though that
> doesn't mean that the currently standardized set of HTTP methods are
> sufficient). And nothing need be shoved in to the media type for this
> to occur except for the usual links and predicates/relations.

This I think is the key.  

An operation outside of POST is, at best, a _programmatic label_ or alias for a particular state transfer's advertised semantics.    However, the surrounding predicates/relations (or human prose) are what describe what it does.

Put in programmatic terms, we're used to symbolic linking against method/function symbols, when I think a more natural approach to describing state transfer is with a Design-by-Contract approach, where the operation symbol matters less than the pre-conditions, post-conditions, and invariants that surround it to describe the affordance of the POST link in the representation.   Those might all be described in human prose in a link predicate specification or they might be described in media (like a JSON-LD document with JavaScript expressions, for example).  

Consider the latter case, where we could describe conditions in media.  The hyperlinked transitive closure of these representations together would describe a protocol state transition system that's independent from any specific implementation.   A programmatic user agent then uses this information to perform action selection towards its goal(s) and/or preferences.     Unfortunately that's all easier said than done, as action selection is an active topic of  automated planning literature (many practical approaches exist, thankfully).
 
So IMO the Hydra team will have to make a determination of how far it wants to go in terms of describing the semantics of POST-method based affordances.

Is it a Web hypermedia documentation vocabulary (i.e. tie together link relations, data types, etc. into a structure that can be parsed and rendered in HTML for a human to manipulate)?    This is what Hydra-as-specified looks like today, to me.

Or is it going to be a vocabulary for Hypermedia designers to express affordances for a protocol state transition system, where the machine agent itself does the processing of how to select the right sequence of actions towards a goal?   This is what Hydra-the-goal looks like though it doesn't quite match Hydra-as-specified.

I apologize if these questions have already been answered, as I have been in lurk mode.

Cheers
Stu

Received on Tuesday, 26 November 2013 23:48:22 UTC