<?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: Optimistic Concurrency &#8211; A False Panacea</title>
	<atom:link href="http://www.goland.org/optimisticconcurrency/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.goland.org/optimisticconcurrency/</link>
	<description>Technology, Politics, Food, Finance, etc.</description>
	<lastBuildDate>Fri, 30 Jul 2010 16:51:19 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Stuff Yaron Finds Interesting</title>
		<link>http://www.goland.org/optimisticconcurrency/comment-page-1/#comment-337696</link>
		<dc:creator>Stuff Yaron Finds Interesting</dc:creator>
		<pubDate>Fri, 05 Feb 2010 22:33:48 +0000</pubDate>
		<guid isPermaLink="false">#comment-337696</guid>
		<description>[...] dealing with the potential problems are non-trivial. Much like the inappropriate optimism around optimistic concurrency I suspect that in practice most implementers would do well to stay away from eventual consistency [...]</description>
		<content:encoded><![CDATA[<p>[...] dealing with the potential problems are non-trivial. Much like the inappropriate optimism around optimistic concurrency I suspect that in practice most implementers would do well to stay away from eventual consistency [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Administrator</title>
		<link>http://www.goland.org/optimisticconcurrency/comment-page-1/#comment-19542</link>
		<dc:creator>Administrator</dc:creator>
		<pubDate>Wed, 30 Aug 2006 03:53:32 +0000</pubDate>
		<guid isPermaLink="false">#comment-19542</guid>
		<description>It depends on what you mean by freshness.

In the simplest optimistic concurrency scenario the client says &quot;If the resource is not in the state I expect it to be in, then fail.&quot; In that case all that is needed is an etag that describes the state the client is expecting (e.g. the etag returned on the last GET). If the etag the client submitted and the resource&#039;s current etag don&#039;t match then the request fails.

Nice and easy and no need for a timestamp.</description>
		<content:encoded><![CDATA[<p>It depends on what you mean by freshness.</p>
<p>In the simplest optimistic concurrency scenario the client says &#8220;If the resource is not in the state I expect it to be in, then fail.&#8221; In that case all that is needed is an etag that describes the state the client is expecting (e.g. the etag returned on the last GET). If the etag the client submitted and the resource&#8217;s current etag don&#8217;t match then the request fails.</p>
<p>Nice and easy and no need for a timestamp.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott Lamb</title>
		<link>http://www.goland.org/optimisticconcurrency/comment-page-1/#comment-19529</link>
		<dc:creator>Scott Lamb</dc:creator>
		<pubDate>Wed, 30 Aug 2006 00:24:23 +0000</pubDate>
		<guid isPermaLink="false">#comment-19529</guid>
		<description>Ahh, so by last write, you&#039;re talking about the last write to the server, not the last write by an actual user. I understand now. I wouldn&#039;t like using that system, but to each his own, I suppose. (Incidentally, I&#039;m familiar with the term &quot;last writer wins&quot;, but not applied it to offline synchronization, so this distinction has never come up.)

I disagree with your new description of what I thought you meant the first time. (Rechecking that sentence...yes, I think it&#039;s right.) It could indeed be considered OCC, but your details aren&#039;t quite right.

In OCC, the server gives the client a token (maybe the server&#039;s timestamp when the last write took place, a UUID, or the user-visible record itself) which the client is supposed to return unmodified along with the new record. Its conflict detection can just do an equality comparison.

In this algorithm, the clients would be keeping a &quot;last modified&quot; timestamp that they update with their current time whenever the user actually writes a record. It&#039;s not necessarily used by the server&#039;s conflict detection; as you say an etag is fine. But it is used in the merge; the freshest record wins. (And as we&#039;ve both said, it&#039;s comparing different machines&#039; timestamps, so if their clocks are out of sync, bad stuff happens.) You need the timestamp here; etags give you no way of determining freshness.</description>
		<content:encoded><![CDATA[<p>Ahh, so by last write, you&#8217;re talking about the last write to the server, not the last write by an actual user. I understand now. I wouldn&#8217;t like using that system, but to each his own, I suppose. (Incidentally, I&#8217;m familiar with the term &#8220;last writer wins&#8221;, but not applied it to offline synchronization, so this distinction has never come up.)</p>
<p>I disagree with your new description of what I thought you meant the first time. (Rechecking that sentence&#8230;yes, I think it&#8217;s right.) It could indeed be considered OCC, but your details aren&#8217;t quite right.</p>
<p>In OCC, the server gives the client a token (maybe the server&#8217;s timestamp when the last write took place, a UUID, or the user-visible record itself) which the client is supposed to return unmodified along with the new record. Its conflict detection can just do an equality comparison.</p>
<p>In this algorithm, the clients would be keeping a &#8220;last modified&#8221; timestamp that they update with their current time whenever the user actually writes a record. It&#8217;s not necessarily used by the server&#8217;s conflict detection; as you say an etag is fine. But it is used in the merge; the freshest record wins. (And as we&#8217;ve both said, it&#8217;s comparing different machines&#8217; timestamps, so if their clocks are out of sync, bad stuff happens.) You need the timestamp here; etags give you no way of determining freshness.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Administrator</title>
		<link>http://www.goland.org/optimisticconcurrency/comment-page-1/#comment-19175</link>
		<dc:creator>Administrator</dc:creator>
		<pubDate>Sat, 26 Aug 2006 05:58:52 +0000</pubDate>
		<guid isPermaLink="false">#comment-19175</guid>
		<description>The term &#039;last write wins&#039; typically means that all writes are submitted whenever they are submitted and who ever does the last update wins. But I understand your confusion as the term isn&#039;t clear enough. There is no actual checking of dates.

What you implied in your comments is a more traditional optimistic concurrency scenario where a writer checks the last modified date to see the server state has changed more recently than the client&#039;s last update. In that case the PDA&#039;s clock would matter but since the PDA has to be on the net to make the update one assumes it can avail itself of NTP to make sure it&#039;s clock is reasonably accurate. An alternative strategy are etags which don&#039;t require a clock but that&#039;s another story.</description>
		<content:encoded><![CDATA[<p>The term &#8216;last write wins&#8217; typically means that all writes are submitted whenever they are submitted and who ever does the last update wins. But I understand your confusion as the term isn&#8217;t clear enough. There is no actual checking of dates.</p>
<p>What you implied in your comments is a more traditional optimistic concurrency scenario where a writer checks the last modified date to see the server state has changed more recently than the client&#8217;s last update. In that case the PDA&#8217;s clock would matter but since the PDA has to be on the net to make the update one assumes it can avail itself of NTP to make sure it&#8217;s clock is reasonably accurate. An alternative strategy are etags which don&#8217;t require a clock but that&#8217;s another story.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott Lamb</title>
		<link>http://www.goland.org/optimisticconcurrency/comment-page-1/#comment-19137</link>
		<dc:creator>Scott Lamb</dc:creator>
		<pubDate>Fri, 25 Aug 2006 23:24:27 +0000</pubDate>
		<guid isPermaLink="false">#comment-19137</guid>
		<description>I&#039;m not sure I agree with your address book example. You&#039;re talking about disconnected operation like a PDA, right? What if the clock&#039;s off? It&#039;s not necessarily trivial to determine the last writer in an offline situation.

But yes, I agree with your general statement that it&#039;s important to choose your merge strategy with care.</description>
		<content:encoded><![CDATA[<p>I&#8217;m not sure I agree with your address book example. You&#8217;re talking about disconnected operation like a PDA, right? What if the clock&#8217;s off? It&#8217;s not necessarily trivial to determine the last writer in an offline situation.</p>
<p>But yes, I agree with your general statement that it&#8217;s important to choose your merge strategy with care.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Administrator</title>
		<link>http://www.goland.org/optimisticconcurrency/comment-page-1/#comment-19053</link>
		<dc:creator>Administrator</dc:creator>
		<pubDate>Fri, 25 Aug 2006 05:13:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-19053</guid>
		<description>There are many cases where last update wins is actually the best choices (say, for example, updating your own address book) as well as when it&#039;s the worst choice (say, updating a Wiki page). 

And, mentioning wikis, I&#039;d also suggest that conflicts tend to be rare enough in practice that most folks won&#039;t run into the conflict message all that often (hence the &#039;optimistic&#039; in optimistic concurrency) and when they do the other person&#039;s changes are more likely than not in a different part of the article then they are working on. But even then I&#039;d point out that the kind of people who can handle merges on wikis are a tiny percentage of the computer using public.

But as I say in the article the point isn&#039;t that optimistic concurrency is bad. There are many wonderful uses for optimistic concurrency but implementers need to keep in mind the inherent difficulties normal people have in dealing with merging and make sure they are prepared to handle the consequences.</description>
		<content:encoded><![CDATA[<p>There are many cases where last update wins is actually the best choices (say, for example, updating your own address book) as well as when it&#8217;s the worst choice (say, updating a Wiki page). </p>
<p>And, mentioning wikis, I&#8217;d also suggest that conflicts tend to be rare enough in practice that most folks won&#8217;t run into the conflict message all that often (hence the &#8216;optimistic&#8217; in optimistic concurrency) and when they do the other person&#8217;s changes are more likely than not in a different part of the article then they are working on. But even then I&#8217;d point out that the kind of people who can handle merges on wikis are a tiny percentage of the computer using public.</p>
<p>But as I say in the article the point isn&#8217;t that optimistic concurrency is bad. There are many wonderful uses for optimistic concurrency but implementers need to keep in mind the inherent difficulties normal people have in dealing with merging and make sure they are prepared to handle the consequences.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott Lamb</title>
		<link>http://www.goland.org/optimisticconcurrency/comment-page-1/#comment-19016</link>
		<dc:creator>Scott Lamb</dc:creator>
		<pubDate>Thu, 24 Aug 2006 21:43:01 +0000</pubDate>
		<guid isPermaLink="false">#comment-19016</guid>
		<description>It&#039;s funny that you mention wikis, since they use optimistic concurrency control well. Do you really think that people would be so conscious of not trampling other people&#039;s changes if they didn&#039;t even _know_ (by the dreaded &quot;Edit Conflict&quot; screen) that they were doing so? Optimistic concurrency control is much, MUCH better than locking or last writer wins. Making someone wait for no reason is awful, and so is throwing away work without ever telling anyone about it.

By the way, pcal, there will be many, many more occasionally-connected clients in 20 years than there are today. There are already many places in the world where computers run off generators, occasionally connected over phone or satellite. The lack of stable power won&#039;t be solved soon, but that hasn&#039;t stopped people from being excited about the Internet. And the OLPC project will introduce millions of occasionally-connected laptops. And even in the developed world, there are places without line-of-sight where wires are hard to run.</description>
		<content:encoded><![CDATA[<p>It&#8217;s funny that you mention wikis, since they use optimistic concurrency control well. Do you really think that people would be so conscious of not trampling other people&#8217;s changes if they didn&#8217;t even _know_ (by the dreaded &#8220;Edit Conflict&#8221; screen) that they were doing so? Optimistic concurrency control is much, MUCH better than locking or last writer wins. Making someone wait for no reason is awful, and so is throwing away work without ever telling anyone about it.</p>
<p>By the way, pcal, there will be many, many more occasionally-connected clients in 20 years than there are today. There are already many places in the world where computers run off generators, occasionally connected over phone or satellite. The lack of stable power won&#8217;t be solved soon, but that hasn&#8217;t stopped people from being excited about the Internet. And the OLPC project will introduce millions of occasionally-connected laptops. And even in the developed world, there are places without line-of-sight where wires are hard to run.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Administrator</title>
		<link>http://www.goland.org/optimisticconcurrency/comment-page-1/#comment-17713</link>
		<dc:creator>Administrator</dc:creator>
		<pubDate>Thu, 03 Aug 2006 20:42:40 +0000</pubDate>
		<guid isPermaLink="false">#comment-17713</guid>
		<description>I agree, OC isn&#039;t a silver bullet but unfortunately I have run into many instances where server side folk think &quot;Oh look, I provided OC, everything is fine&quot; without considering for even a second the burden this places on clients. In many cases OC is the wrong choice because it&#039;s just too damn hard to make work in practice.

OC will actually still be necessary even in a completely connected world. The issue isn&#039;t so much connectivity as the operational and functional limitations of locking.</description>
		<content:encoded><![CDATA[<p>I agree, OC isn&#8217;t a silver bullet but unfortunately I have run into many instances where server side folk think &#8220;Oh look, I provided OC, everything is fine&#8221; without considering for even a second the burden this places on clients. In many cases OC is the wrong choice because it&#8217;s just too damn hard to make work in practice.</p>
<p>OC will actually still be necessary even in a completely connected world. The issue isn&#8217;t so much connectivity as the operational and functional limitations of locking.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pcal</title>
		<link>http://www.goland.org/optimisticconcurrency/comment-page-1/#comment-17710</link>
		<dc:creator>pcal</dc:creator>
		<pubDate>Thu, 03 Aug 2006 18:48:29 +0000</pubDate>
		<guid isPermaLink="false">#comment-17710</guid>
		<description>Not sure I follow your point.  Yes, it sucks when optimism betrays you.  That&#039;s always true.   No one ever said OC was a silver bullet AFAIK.  It&#039;s all tradeoffs, depends on the app.

But as for occasionionally-connected clients: 10-20 years from now, the whole notion will be very quaint.  Why waste energy worrying about them?  :)</description>
		<content:encoded><![CDATA[<p>Not sure I follow your point.  Yes, it sucks when optimism betrays you.  That&#8217;s always true.   No one ever said OC was a silver bullet AFAIK.  It&#8217;s all tradeoffs, depends on the app.</p>
<p>But as for occasionionally-connected clients: 10-20 years from now, the whole notion will be very quaint.  Why waste energy worrying about them?  :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Administrator</title>
		<link>http://www.goland.org/optimisticconcurrency/comment-page-1/#comment-16347</link>
		<dc:creator>Administrator</dc:creator>
		<pubDate>Wed, 12 Jul 2006 13:41:15 +0000</pubDate>
		<guid isPermaLink="false">#comment-16347</guid>
		<description>Indeed and there&#039;s another article I need to write on &#039;off line friendly data&#039;. 

Take comments on this blog, comments are posted using append rather than replace (E.g. this isn&#039;t a comment wiki page). Append designs make it possible for multiple people to add data without conflict. 

I mentioned in the article that when groups need to work on common data they will try to partition the data to make conflicts less likely. Good services will support this directly. 

So, for example, rather than having one big comment field to provide customer information it would be better to have some kind of multiple record structure (possibly in a hierarchy but that&#039;s probably overkill) that can be updated individually. You can think of this as &#039;free form&#039; information about a client showing up as a series of cards where different members of the team can take ownership of their own card and update it at will. 

But eventually you will run into data that simply can&#039;t be easily made conflict resistant, for example, the name of the company may change or their primary address. But in general such data changes very infrequently and if there is a conflict that almost certainly means that something bad really has happened and the people involved should talk to each other (E.g. if 3 sales people think there are 3 different primary addresses for an account that probably means they need to talk). 

There are no miracles but there are things service designers can do to make their services more off-line friendly but first they have to realize there is a problem. In too many cases I&#039;ve run into service folks who think that once they sprinkle the optimistic concurrency pixie dust on their system they are done and all off-line/conflict issues are resolved. It a&#039;int necessarily so.</description>
		<content:encoded><![CDATA[<p>Indeed and there&#8217;s another article I need to write on &#8216;off line friendly data&#8217;. </p>
<p>Take comments on this blog, comments are posted using append rather than replace (E.g. this isn&#8217;t a comment wiki page). Append designs make it possible for multiple people to add data without conflict. </p>
<p>I mentioned in the article that when groups need to work on common data they will try to partition the data to make conflicts less likely. Good services will support this directly. </p>
<p>So, for example, rather than having one big comment field to provide customer information it would be better to have some kind of multiple record structure (possibly in a hierarchy but that&#8217;s probably overkill) that can be updated individually. You can think of this as &#8216;free form&#8217; information about a client showing up as a series of cards where different members of the team can take ownership of their own card and update it at will. </p>
<p>But eventually you will run into data that simply can&#8217;t be easily made conflict resistant, for example, the name of the company may change or their primary address. But in general such data changes very infrequently and if there is a conflict that almost certainly means that something bad really has happened and the people involved should talk to each other (E.g. if 3 sales people think there are 3 different primary addresses for an account that probably means they need to talk). </p>
<p>There are no miracles but there are things service designers can do to make their services more off-line friendly but first they have to realize there is a problem. In too many cases I&#8217;ve run into service folks who think that once they sprinkle the optimistic concurrency pixie dust on their system they are done and all off-line/conflict issues are resolved. It a&#8217;int necessarily so.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
