« It's a Tool, Not a Religion! | Main | Coupling in a RESTful Way »

Tuesday, December 19, 2006

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a00d83456008969e200d8342c6f4253ef

Listed below are links to weblogs that reference You Call it Coupling, I Call It Reality:

» Coupling isn't so black and white from Middleware Matters
Dan Pritchett takes issue with Pete Lacey's characterization in his InfoQ interview of web services being too tightly coupled. Dan's issue seems to be that REST is more tightly coupled than its proponents would have you believe. He writes: The simple f... [Read More]

» Pete Lacey mistakenly asserts WS-* is tightly coupled because of SOAP and Dan Pritchett gets coupling from Dave Orchard's Blog
Pete Lacey, a smart and funny guy, makes a big mistake in his interview on innoq. He says that adding some content to an xml feed breaks the consumer because of SOAP. He says: "For similar reasons, the fact that... [Read More]

» Simplicity Serendipity from Simplicity Works Everytime
Going thru the archives of Dan's blog felt like meeting an old friend :-) Anyway, I went to the actual site to check out the comments to his post on "You Call it Coupling, I Call It Reality". That's when I noticed that the quote on his site header i... [Read More]

» Simplicity Serendipity from Simplicity Works Everytime
Going thru the archives of Dan's blog felt like meeting an old friend :-) Anyway, I went to the actual site to check out the comments to his post on "You Call it Coupling, I Call It Reality". That's when I noticed that the quote on his site header i... [Read More]

Comments

Joe

"Move your resource to a new URI and see what happens to the clients."

With a well-written HTTP client library nothing at all should happen as long as the server provides a 3xx response that points to the new location:

http://bitworking.org/projects/httplib2/ref/http-objects.html

Arnon Rotem-Gal-Oz

The minute you have two systems that talk to each other you have some coupling - you need some knowledge as to what the other system will do, react or publish
The trick, so to speak, is to minimize that coupling but it will always be there unless you have isolated systems (or components for that matter)

Mark Mc Keown

Resources are not located by URIs, they are identified by URIs.

What is the "location" of http://www.google.com/?

boo:~$ nslookup www.google.com
Server: 192.168.1.1
Address: 192.168.1.1#53

Non-authoritative answer:
www.google.com canonical name = www.l.google.com.
Name: www.l.google.com
Address: 216.239.59.147
Name: www.l.google.com
Address: 216.239.59.104
Name: www.l.google.com
Address: 216.239.59.99
Name: www.l.google.com
Address: 216.239.59.103

URIs are location independent.

What does it mean when a resource has two URIs, ie if we have URI aliases? Well this is considered a bad thing because the resource now has two identifiers which affects network effects, see http://www.w3.org/TR/2004/WD-webarch-20040705/#uri-benefits. However aliases can be resolved using HTTP re-directs.

The WS-* story on identification is not so clear, WS-Addressing can be used for the location of a Web Service but cannot be used to identify a Web Service - WS-Addressing provides no rules for comparing Endpoint References.

As to the question of contracts, in WS-* the contract is made early and is non negotiable: the WSDL. In REST part of the contract is made early: HTTP GET. But the rest is delayed for a late binding: content negotiation (clients says I understand these formats, with this set of preferences). This allows for independent evolution of client server, but of course cannot guarantuee interoperability.

WS-* cannot easily support independent evolution of client and server. The ultimate expression of loose coupling is mobile code.

Alex Bunardzic

Hi,

Some comments on contracts and coupling here:

http://jooto.com/blog/index.php/2006/12/25/contracts-and-coupling-in-resource-oriented-architecture/

Would love to hear your response! Thanks.

Alex

Roy T. Fielding

You speak of REST as if it were a synonym for HTTP. REST is an architectural style, not a protocol, and one constraint within that style is that hypermedia is the engine of application state.

That means a REST-based architecture must use the control information within the data exchanged between client and server to guide the client's application through a network of simple states (simple when considered individually). This is very similar to a finite state machine, except that a combination of user configuration and standard media types define the set of transitions from this state to the next.

Because each state is dynamic in nature, the coupling in REST-based architectures is limited to the deployment of shared media types. Yes, that still means that some coupling does exist, but it is a comparatively easy to understand coupling and can be largely eliminated by shared media types that are general in nature.

In addition, the constraint that application "session" state be limited to that held on the client means that each state can be analyzed independently and eliminates most partial failure conditions that plague distributed services. This vastly simplifies the overall application by removing the inter-state coupling that is common to other architectures.

There is a lot more to REST than HTTP messaging.

Zeb

Coupling is not just the fact that endpoint A talks to endpoint B, but how frequently A talks with B and how dependent A is with B. Cyclomatic Complexity to a degree. If A calls B, B calls C, C calls A, A calls B, etc. until the whole thing unwinds ... that's bad coupling. Coupling of interfaces on their own is not a risk, it's the nature of the business. And it doesn't just occur with web services, but binary interfaces as well.

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment