<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: RESTful Web Services: Preventing Race Conditions</title>
	<atom:link href="http://blog.m.artins.net/restful-web-services-preventing-race-conditions/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.m.artins.net/restful-web-services-preventing-race-conditions/</link>
	<description>On Agile Software Development</description>
	<lastBuildDate>Wed, 18 Aug 2010 13:20:15 -0600</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Jose Muanis</title>
		<link>http://blog.m.artins.net/restful-web-services-preventing-race-conditions/comment-page-1/#comment-10389</link>
		<dc:creator>Jose Muanis</dc:creator>
		<pubDate>Mon, 15 Mar 2010 18:06:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.m.artins.net/?p=279#comment-10389</guid>
		<description>This thing is opened in my screen for the last 10 days, I finally got some time to read through, and it was worth.

This is one of these thing written that we never pay attention:

http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

Section 24: If-Match

The If-Match request-header field is used with a method to make it conditional. A client that has one or more entities previously obtained from the resource can verify that one of those entities is current by including a list of their associated entity tags in the If-Match header field. Entity tags are defined in section 3.11. The purpose of this feature is to allow efficient updates of cached information with a minimum amount of transaction overhead. It is also used, on updating requests, to prevent inadvertent modification of the wrong version of a resource. As a special case, the value &quot;*&quot; matches any current entity of the resource.

Well done Nunes</description>
		<content:encoded><![CDATA[<p>This thing is opened in my screen for the last 10 days, I finally got some time to read through, and it was worth.</p>
<p>This is one of these thing written that we never pay attention:</p>
<p><a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html" rel="nofollow">http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html</a></p>
<p>Section 24: If-Match</p>
<p>The If-Match request-header field is used with a method to make it conditional. A client that has one or more entities previously obtained from the resource can verify that one of those entities is current by including a list of their associated entity tags in the If-Match header field. Entity tags are defined in section 3.11. The purpose of this feature is to allow efficient updates of cached information with a minimum amount of transaction overhead. It is also used, on updating requests, to prevent inadvertent modification of the wrong version of a resource. As a special case, the value &#8220;*&#8221; matches any current entity of the resource.</p>
<p>Well done Nunes</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: foo</title>
		<link>http://blog.m.artins.net/restful-web-services-preventing-race-conditions/comment-page-1/#comment-10298</link>
		<dc:creator>foo</dc:creator>
		<pubDate>Fri, 12 Mar 2010 23:12:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.m.artins.net/?p=279#comment-10298</guid>
		<description>Hooray, optimistic locking is re-invented yet again..</description>
		<content:encoded><![CDATA[<p>Hooray, optimistic locking is re-invented yet again..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alexandre Martins</title>
		<link>http://blog.m.artins.net/restful-web-services-preventing-race-conditions/comment-page-1/#comment-10174</link>
		<dc:creator>Alexandre Martins</dc:creator>
		<pubDate>Mon, 08 Mar 2010 14:58:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.m.artins.net/?p=279#comment-10174</guid>
		<description>@Igor Sobreira

The only thing to keep in mind when using timestamp-based checking is that it&#039;s only limited to the next second. So, if the resources in your application are likely to change more often than once a second, then timestamp-based conditional headers are not the right choice.</description>
		<content:encoded><![CDATA[<p>@Igor Sobreira</p>
<p>The only thing to keep in mind when using timestamp-based checking is that it&#8217;s only limited to the next second. So, if the resources in your application are likely to change more often than once a second, then timestamp-based conditional headers are not the right choice.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Guilherme Silveira</title>
		<link>http://blog.m.artins.net/restful-web-services-preventing-race-conditions/comment-page-1/#comment-10172</link>
		<dc:creator>Guilherme Silveira</dc:creator>
		<pubDate>Mon, 08 Mar 2010 14:20:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.m.artins.net/?p=279#comment-10172</guid>
		<description>Great example on 412 + ETag usage.

The only negative point is that when sharing unmodified-check responsibility with the client, a non conforming one might break your application.

The following code should use the received ETag as in the example:

product = entry.at(uri)
product.update new_representation

But most up-to-date rest-called client API&#039;s will simply ignore it, and execute it anyways, breaking our implementation. Thats why I still on a crusade against http apis, looking for REST client ones.

ETag and PUT is also a good solution when you are unsure your last request went through. Suppose the first PUT attempt got connected, you sent the request, but got no response back from the server.

Great post!</description>
		<content:encoded><![CDATA[<p>Great example on 412 + ETag usage.</p>
<p>The only negative point is that when sharing unmodified-check responsibility with the client, a non conforming one might break your application.</p>
<p>The following code should use the received ETag as in the example:</p>
<p>product = entry.at(uri)<br />
product.update new_representation</p>
<p>But most up-to-date rest-called client API&#8217;s will simply ignore it, and execute it anyways, breaking our implementation. Thats why I still on a crusade against http apis, looking for REST client ones.</p>
<p>ETag and PUT is also a good solution when you are unsure your last request went through. Suppose the first PUT attempt got connected, you sent the request, but got no response back from the server.</p>
<p>Great post!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Destillat #11 &#124; duetsch.info - Open Source, Wet-, Web-, Software</title>
		<link>http://blog.m.artins.net/restful-web-services-preventing-race-conditions/comment-page-1/#comment-10170</link>
		<dc:creator>Destillat #11 &#124; duetsch.info - Open Source, Wet-, Web-, Software</dc:creator>
		<pubDate>Mon, 08 Mar 2010 12:17:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.m.artins.net/?p=279#comment-10170</guid>
		<description>[...] RESTful Web Services: Preventing Race Conditions [...]</description>
		<content:encoded><![CDATA[<p>[...] RESTful Web Services: Preventing Race Conditions [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick Carroll</title>
		<link>http://blog.m.artins.net/restful-web-services-preventing-race-conditions/comment-page-1/#comment-10168</link>
		<dc:creator>Nick Carroll</dc:creator>
		<pubDate>Mon, 08 Mar 2010 10:56:10 +0000</pubDate>
		<guid isPermaLink="false">http://blog.m.artins.net/?p=279#comment-10168</guid>
		<description>Awesome man, front page of Proggit!</description>
		<content:encoded><![CDATA[<p>Awesome man, front page of Proggit!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MJ</title>
		<link>http://blog.m.artins.net/restful-web-services-preventing-race-conditions/comment-page-1/#comment-10113</link>
		<dc:creator>MJ</dc:creator>
		<pubDate>Sat, 06 Mar 2010 07:05:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.m.artins.net/?p=279#comment-10113</guid>
		<description>Great post.  Many CPUs implement the same mechanism at a low level, called compare-and-swap, or CAS ( http://en.wikipedia.org/wiki/Compare-and-swap ).</description>
		<content:encoded><![CDATA[<p>Great post.  Many CPUs implement the same mechanism at a low level, called compare-and-swap, or CAS ( <a href="http://en.wikipedia.org/wiki/Compare-and-swap" rel="nofollow">http://en.wikipedia.org/wiki/Compare-and-swap</a> ).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fabio Pereira</title>
		<link>http://blog.m.artins.net/restful-web-services-preventing-race-conditions/comment-page-1/#comment-10110</link>
		<dc:creator>Fabio Pereira</dc:creator>
		<pubDate>Sat, 06 Mar 2010 05:40:51 +0000</pubDate>
		<guid isPermaLink="false">http://blog.m.artins.net/?p=279#comment-10110</guid>
		<description>Hey Alex,
Very good post! I had never seen this ETag feature of HTTP before, very useful indeed!
Very good example, clear, simple and straight to the point! 
I&#039;ll definetely remember this post if I need to solve http race conditions one day.
Cheers ;)</description>
		<content:encoded><![CDATA[<p>Hey Alex,<br />
Very good post! I had never seen this ETag feature of HTTP before, very useful indeed!<br />
Very good example, clear, simple and straight to the point!<br />
I&#8217;ll definetely remember this post if I need to solve http race conditions one day.<br />
Cheers <img src='http://blog.m.artins.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tomas</title>
		<link>http://blog.m.artins.net/restful-web-services-preventing-race-conditions/comment-page-1/#comment-10103</link>
		<dc:creator>Tomas</dc:creator>
		<pubDate>Sat, 06 Mar 2010 03:45:28 +0000</pubDate>
		<guid isPermaLink="false">http://blog.m.artins.net/?p=279#comment-10103</guid>
		<description>Very nice design, nice written article. Thanks

Tomas</description>
		<content:encoded><![CDATA[<p>Very nice design, nice written article. Thanks</p>
<p>Tomas</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Reynolds</title>
		<link>http://blog.m.artins.net/restful-web-services-preventing-race-conditions/comment-page-1/#comment-10102</link>
		<dc:creator>David Reynolds</dc:creator>
		<pubDate>Sat, 06 Mar 2010 02:30:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.m.artins.net/?p=279#comment-10102</guid>
		<description>Very good writeup. I&#039;m used to doing etags with RSS feeds but this is one of those things that makes me wonder why I didn&#039;t realize it sooner. Such a simple solution to this problem, I love it.</description>
		<content:encoded><![CDATA[<p>Very good writeup. I&#8217;m used to doing etags with RSS feeds but this is one of those things that makes me wonder why I didn&#8217;t realize it sooner. Such a simple solution to this problem, I love it.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
