users@jersey.java.net

Re: [Jersey] Re: Hypermedia clarification

From: Jan Algermissen <algermissen1971_at_mac.com>
Date: Tue, 16 Feb 2010 21:21:41 +0100

On Feb 16, 2010, at 8:54 PM, Markus Karg wrote:

> Yes, if you write a client for exactly that web service, but not if you are
> writing a generic client. Do you have a special browser for each web site?
> Not me.

One might create a generic HTTP user agent[1] with a plugin API to support media types, extension headers (e.g. Link as of now), extensions to extensions (e.g. support for certain link rels) but I'd certainly not expect a user agent to be generic and handle anything it does no know about.

We have one kind of such a setup (or configuration) which we call Web browsers Opera, Safari, Fire Fox,..). The reason they do not get more specific is that they are human driven user agents.

In a machine to machine system I'd have one of such setups for each kind of service (e.g. AtomPub or OpenSerch) each of which would be capale of handling all the hypermedia semantics (media types, link rels, headers,...) that are used by that *kind* of service.[2]


[1] to be strict on the terminology for the moment (client is just the connector)
[2] http://www.nordsc.com/blog/?p=24



>
>> And that is
>> what REST is particularly good at (and what should be leveraged inside
>> the enterprise, too. Although confusing to most CxOs in the beginning
>> :-)
>
> Didn't get that point, actually. Can you explain?

The uniform interface makes it possible to still *have* a conversation even if capabilities of client and server do not match. That is much, much better than just having the conversation fail. With REST I can allways follow my nose and figure things out. Inside the enterprise 'follow your nose' might be an ITSM process created as a last resort to update clients with insufficent capabilities.

Think of it as controlled failure with a well known path to recovery. Even if that is not automatic, it is far better to get a wake up emergency call at 4 AM that tells you "we got a 406 beause our client does not understand application/fancy-new-stuff (spec at http://...)" than it is to be handed a bunch of stack traces of an application you probably don;t even know.

(Me babbling? Yes. However, there has to be some vision towards what REST in the enterprise might actually mean).

Jan




-----------------------------------
 Jan Algermissen, Consultant
 NORD Software Consulting

 Mail: algermissen_at_acm.org
 Blog: http://www.nordsc.com/blog/
 Work: http://www.nordsc.com/
-----------------------------------