October 27, 2009

Hidden Contracts and Governance

In a RESTful system the contract between client and server is expressed solely in the form of hypermedia specifications[1]. On the Web this works fine, because there is usually always a human being involved that can act as the ultimate arbiter of semantics when things need to be decided that happen not to be covered by the involved hypermedia specifications.




Examples:




1. When I want to buy a book, what hypermedia is telling me that www.amazon.de is a place to go?




2. When the Amazon site is not reachable, how do I find out where else I could buy a book?




3.How do I know what 'buying a book' means and what the basic sequence of operations is that need to be executed in order to achieve the overall goal?




4. How do I figure out, what the new appropriate sequence of operations is should Amazon significantly change its understanding of the flow of a book purchase?




All of the above are ultimately solved by a human being in the case of the Web and usually don't cause any trouble.




3. is particularly interesting because the fact that no hypermedia specification even touches that question reveals that there is a very high level, common sense contract in operation between human clients and some Web applications.




4. is also interesting because economic sense will usually keep e.g. a book seller from changing the flow of operations in a way that causes the potential buyer to not being able to buy anymore.






How does all this relate to IT governance?




When one applies REST (HTTP that is in practice) in an enterprise IT context, these hidden contracts matter because they either need to be covered by hypermedia specifications (e.g. for the discovery/equivalence examples 1. and 2.) or at least need to be made explicit so they become manageable in an IT governance sense.




Example 3. relates to the general question of how types of services (e.g. 'procurement seller role' or 'repository') can be expressed to provide guidance to client developers regarding the intended sequence of operations.




Example 4 relates to the question of how change can be managed not of the pertaining hypermedia specifications (this is easy!) but of their composition (which is what effectively forms the service type).




Besides being able to frame the problem and ask the questions I do not yet have definitive answers - comments and thoughts are very welcome.









lass="Apple-style-span" style="font-size:medium;">[1] The term 'hypermedia specification' is meant as a general expression for specifications of media types, media type extensions, link relations and 'little' things like category definitions (used for example by Atom and NewsML2).




(Also posted in the XING REST Group)






1 comment:

  1. i guess one central point missing in [1] is the question of how to find links in resource representations. sometimes, they can be selected by XPath or similar structural mechanisms. sometimes, this needs some additional processing (adding prefixes/postfixes, for example), and sometimes, there is a more complex computation yielding the links. as long as the link is only a result of using as input the resource representation that's still fine, though.

    ReplyDelete