« You Call it Coupling, I Call It Reality | Main | Avoiding Two Phase Commit, Redux »

Tuesday, December 19, 2006

TrackBack

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

Listed below are links to weblogs that reference Coupling in a RESTful Way:

Comments

Pete Lacey

Cool. We're narrowing the window of dependencies a client has on a particular service. I fully admit that the content negotiation aspect of web services is highly idealized (I hinted at as much in my post) and that in the real world we will frequently need to introduce resource specific, non-stanard message types. And this will introduce a tighter coupling than desired. But, again, it's a matter of degree. RESTafarians may need to relax this constraint in practice, but at least we can still leverage the others.

Question for you: I don't understand this statement: "Idempotent updates can be particularly tricky when accurate tracking of state transitions is one of the business requirements." Can you elaborate?

As for the following sentence: "Stating whether your operation is or isn't idempotent is necessary and if you were to change in either direction, you could very well break clients that depended upon the other behavior." Actually, this option doesn't exist. The HTTP spec is very clear: GET is safe and idempotent, PUT and DELETE are idempotent, POST is neither. A client should not assume otherwise.

Dan Pritchett

Idempotent updates in general are problematic. Tracking the actual transitions add to the problem though. Here is the scenario to consider:

Client 1 does GET at T1 on revision 1
Client 1 does PUT at T2, fails to detect success, now at rev 2
Client 2 does GET at T3 on rev 2
Client 2 does PUT at T4, now rev 3
Client 1 retries PUT at T5 for rev 1 to rev 2

It isn't enough to simply track that Client 1's update is on an older revision and therefore superseded. You need to insure that the state transition log has captured this update. Had the first attempt by client 1 failed above, you now have a conflict to resolve at T5.

Safe idempotent updates are tricky in general if you need to move beyond the last-in-wins semantic across the whole resource. (I try to avoid moving beyond that if possible!)

vadim

The mysterious "user" mentioned in the W3C spec is showing signs of possessing omniscient inference capability.

Don Park

Isn't it ironic that much of the Web 2.0 businesses depend on the GET method being non-idempotent? Otherwise, PPC won't generate any revenue.

Chris Stiles

The position that every interface REST/WS or otherwise will have to be accompanied by a certain amount of documentation to remove ambiguity is not one I would argue with. I wouldn't even argue with the notion that some of this documentation will be in machine readable form.

The problem is that there are people - out on the various standards lists - who fully believe that it is possible and desirable to have WS-* standards that would enable contract and flow to be described completely in a machine readable format.

vadim

The thing is, once you come up with a format with well-understood and unambiguous, it's not that hard to make it machine-readable.

To me, the problem with WS-* description languages is not that they are readable by machines, it's that they are unreadable by humans.

Just-a-speck

I'd like to state my position again in the whole SOA vs REST debate.
Not sure if this is what you intended. Missing P in SOAP?

IMO - SOA can be implemented SOAPy or RESTful.

Chris Stiles


The thing is, once you come up with a format with well-understood and unambiguous


For real systems, and for the sorts of things (contracts etc) described this is never realistic. Either the description is so complex that it exceeds our ability to reduce it to a simple specification or it's so complex that it's ambiguities cannot be detected before time.

There's a reason for 'rough consensus and running code' - or 'interoperability testing' in a more formal world.

rony


This article is quite remarkable
Thank you for this information

ــــ ــــ ــــ ـــ
http://engineering-sciences.blogspot.com
engineering article, engineering books, engineering news and engineering

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