views:

33

answers:

1

http://rest.blueoxen.net/cgi-bin/wiki.pl?TwoPhaseCommit proposed implementing two-phase commits using a custom header value to identify the transaction associated with a request. Wouldn't this approach break caching proxies? For example, a proxy sees HTTP DELETE /foo against Transaction 123 but it's not smart enough to realize this transaction is subsequently rolled-back. The proxy then proceeds to cache the fact that /foo has been deleted.

Am I wrong? What do you recommend for implementing RESTful two-phase commits?

A: 

See my answer to this question

Darrel Miller
Why does Fielding assume that two-phased commits can only be implemented with the client coordinating server resources? I see nothing wrong with two-phased commits (or transactions in general) from a RESTful point of view. Please clarify what he means.
Gili
Note to self, interesting post: http://www.infoq.com/news/2009/06/rest-ts
Gili
@Gili Damn. I wrote you a big comment and power outage trashed it. Here's the condensed version. Seems I read Roy's quote wrong. I don't think he is saying you can't do dist-transactions, he is just saying that the client does not need to be aware of any dist-trans protocol. The client simply follows the links it has been given. If behind the scenes some kind of 2-phase commit is going on, maybe that is ok. Need to do some more thinking.
Darrel Miller
@Darrel, interesting! Let me know if you find any more documentation on this.
Gili