<?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: Copy-On-Write 101 &#8211; Part 3: The Sum of Its Parts</title> <atom:link href="http://hackerboss.com/copy-on-write-101-part-3-the-sum-of-its-parts/feed/" rel="self" type="application/rss+xml" /><link>http://hackerboss.com/copy-on-write-101-part-3-the-sum-of-its-parts/</link> <description>Developing software and managing development teams.</description> <lastBuildDate>Sun, 08 Aug 2010 20:15:47 +0000</lastBuildDate> <generator>http://wordpress.org/?v=</generator> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>By: Ville Laurikari</title><link>http://hackerboss.com/copy-on-write-101-part-3-the-sum-of-its-parts/comment-page-1/#comment-212</link> <dc:creator>Ville Laurikari</dc:creator> <pubDate>Tue, 11 Aug 2009 14:12:21 +0000</pubDate> <guid
isPermaLink="false">http://hackerboss.com/?p=533#comment-212</guid> <description>@axltoth, thanks. You&#039;re not the only one to mention Clojure (see &lt;a href=&quot;http://hackerboss.com/i-have-seen-the-future-and-it-is-copy-on-write/#comment-109&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;).  Clojure doesn&#039;t have automatically disk-backed data structures, Shark does.  On the other hand, Shark doesn&#039;t exist... so I guess Clojure wins, eh?</description> <content:encoded><![CDATA[<p>@axltoth, thanks. You&#8217;re not the only one to mention Clojure (see <a
href="http://hackerboss.com/i-have-seen-the-future-and-it-is-copy-on-write/#comment-109" rel="nofollow">here</a>).  Clojure doesn&#8217;t have automatically disk-backed data structures, Shark does.  On the other hand, Shark doesn&#8217;t exist&#8230; so I guess Clojure wins, eh?</p> ]]></content:encoded> </item> <item><title>By: alxtoth</title><link>http://hackerboss.com/copy-on-write-101-part-3-the-sum-of-its-parts/comment-page-1/#comment-194</link> <dc:creator>alxtoth</dc:creator> <pubDate>Mon, 10 Aug 2009 20:07:54 +0000</pubDate> <guid
isPermaLink="false">http://hackerboss.com/?p=533#comment-194</guid> <description>Hi,Apparently you like LISP-like languages . Check out Clojure (&lt;a href=&quot;http://www.clojure.org/&quot; rel=&quot;nofollow&quot;&gt;www.clojure.org&lt;/a&gt;), it has &quot;transactional memory&quot;-Alex</description> <content:encoded><![CDATA[<p>Hi,</p><p>Apparently you like LISP-like languages . Check out Clojure (<a
href="http://www.clojure.org/" rel="nofollow">http://www.clojure.org</a>), it has &#8220;transactional memory&#8221;</p><p>-Alex</p> ]]></content:encoded> </item> <item><title>By: Ville Laurikari</title><link>http://hackerboss.com/copy-on-write-101-part-3-the-sum-of-its-parts/comment-page-1/#comment-128</link> <dc:creator>Ville Laurikari</dc:creator> <pubDate>Thu, 23 Jul 2009 11:31:18 +0000</pubDate> <guid
isPermaLink="false">http://hackerboss.com/?p=533#comment-128</guid> <description>All data structures in Shark are copy-on-write.  Because existing data structures are never modified in-place, everything is automatically thread safe.  So yes, the data structure for the STM database is thread safe, like all other data structures in Shark.Conflict detection only happens when replaying the log.  The worker threads are oblivious to the fact that other worker threads may be concurrently using the same database.  They&#039;ll find out later if there was a conflict.</description> <content:encoded><![CDATA[<p>All data structures in Shark are copy-on-write.  Because existing data structures are never modified in-place, everything is automatically thread safe.  So yes, the data structure for the STM database is thread safe, like all other data structures in Shark.</p><p>Conflict detection only happens when replaying the log.  The worker threads are oblivious to the fact that other worker threads may be concurrently using the same database.  They&#8217;ll find out later if there was a conflict.</p> ]]></content:encoded> </item> <item><title>By: Vagn Johansen</title><link>http://hackerboss.com/copy-on-write-101-part-3-the-sum-of-its-parts/comment-page-1/#comment-125</link> <dc:creator>Vagn Johansen</dc:creator> <pubDate>Thu, 23 Jul 2009 08:04:32 +0000</pubDate> <guid
isPermaLink="false">http://hackerboss.com/?p=533#comment-125</guid> <description>Yes, almost. The explanation of the replay log explains why you call
it an STM database. It is like a small program that can be
replayed/re-run when a conlict is detected.The way you describe it, the owner thread can update the database and
at the same time a worker thread can traverse the database (via a
different snapshot). Being a copy-on-write data structure the owner
thread can delete a node that the worker thread is trying to traverse
due to the node sharing (assuming something like the tree in part1).I assume this means that the data structure for the STM database has
some form of thread-safety built-in? And regarding the conflict detection
does it happens both during replays on the owner thread and during
traversals in the worker thread?</description> <content:encoded><![CDATA[<p>Yes, almost. The explanation of the replay log explains why you call<br
/> it an STM database. It is like a small program that can be<br
/> replayed/re-run when a conlict is detected.</p><p>The way you describe it, the owner thread can update the database and<br
/> at the same time a worker thread can traverse the database (via a<br
/> different snapshot). Being a copy-on-write data structure the owner<br
/> thread can delete a node that the worker thread is trying to traverse<br
/> due to the node sharing (assuming something like the tree in part1).</p><p>I assume this means that the data structure for the STM database has<br
/> some form of thread-safety built-in? And regarding the conflict detection<br
/> does it happens both during replays on the owner thread and during<br
/> traversals in the worker thread?</p> ]]></content:encoded> </item> <item><title>By: Ville Laurikari</title><link>http://hackerboss.com/copy-on-write-101-part-3-the-sum-of-its-parts/comment-page-1/#comment-122</link> <dc:creator>Ville Laurikari</dc:creator> <pubDate>Wed, 22 Jul 2009 19:05:01 +0000</pubDate> <guid
isPermaLink="false">http://hackerboss.com/?p=533#comment-122</guid> <description>Vagn, that paragraph could have been more clear, for sure.  I&#039;ll try
to clarify how STM works with copy-on-write data structures.For an STM database there is one &quot;owner&quot; thread which keeps the
latest snapshot of the database.  Other &quot;worker&quot; threads can request
the latest snapshot to work on.  They do this by sending a message to
the owner which then replies back with the snapshot.The worker thread then goes off an does whatever it wants to with the
database, possibly updating it.  When it has finished with the
transaction, the worker sends its modified database back to the owner,
along with a log of all reads and writes it performed.The owner thread will then replay the log with the &lt;i&gt;actual&lt;/i&gt; latest
database snapshot.  If there are no conflicts, the owner replaces
the latest snapshot with the one resulting from replaying the log.  If
there are conflicts, the owner keeps the old snapshot and thus
discards all updates from the worker.  The worker thread can then
retry the transaction again with the new latest snapshot.The owner thread can take some shortcuts.  If there were no other
concurrent updates, it can directly accept the new database snapshot
received from the worker.  If the worker did not do any writes there is no need for conflict resolution.Does this answer your question?</description> <content:encoded><![CDATA[<p>Vagn, that paragraph could have been more clear, for sure.  I&#8217;ll try<br
/> to clarify how STM works with copy-on-write data structures.</p><p>For an STM database there is one &#8220;owner&#8221; thread which keeps the<br
/> latest snapshot of the database.  Other &#8220;worker&#8221; threads can request<br
/> the latest snapshot to work on.  They do this by sending a message to<br
/> the owner which then replies back with the snapshot.</p><p>The worker thread then goes off an does whatever it wants to with the<br
/> database, possibly updating it.  When it has finished with the<br
/> transaction, the worker sends its modified database back to the owner,<br
/> along with a log of all reads and writes it performed.</p><p>The owner thread will then replay the log with the <i>actual</i> latest<br
/> database snapshot.  If there are no conflicts, the owner replaces<br
/> the latest snapshot with the one resulting from replaying the log.  If<br
/> there are conflicts, the owner keeps the old snapshot and thus<br
/> discards all updates from the worker.  The worker thread can then<br
/> retry the transaction again with the new latest snapshot.</p><p>The owner thread can take some shortcuts.  If there were no other<br
/> concurrent updates, it can directly accept the new database snapshot<br
/> received from the worker.  If the worker did not do any writes there is no need for conflict resolution.</p><p>Does this answer your question?</p> ]]></content:encoded> </item> <item><title>By: Vagn Johansen</title><link>http://hackerboss.com/copy-on-write-101-part-3-the-sum-of-its-parts/comment-page-1/#comment-120</link> <dc:creator>Vagn Johansen</dc:creator> <pubDate>Wed, 22 Jul 2009 15:56:51 +0000</pubDate> <guid
isPermaLink="false">http://hackerboss.com/?p=533#comment-120</guid> <description>I don&#039;t understand the paragraph with &quot;The natural model..&quot;. How does this happen &quot;concurrently&quot;? Via messages to the owner thread?</description> <content:encoded><![CDATA[<p>I don&#8217;t understand the paragraph with &#8220;The natural model..&#8221;. How does this happen &#8220;concurrently&#8221;? Via messages to the owner thread?</p> ]]></content:encoded> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced) (user agent is rejected)
Database Caching 1/12 queries in 0.038 seconds using disk

Served from: hackerboss.com @ 2010-09-05 20:57:25 -->