<?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"
	>
<channel>
	<title>Comments on: A CAL webapp with persistent data using GWT, STM and BDB</title>
	<atom:link href="http://diversions.nfshost.com/blog/2008/03/27/a-cal-webapp-with-persistent-data-using-gwt-stm-and-bdb/feed/" rel="self" type="application/rss+xml" />
	<link>http://diversions.nfshost.com/blog/2008/03/27/a-cal-webapp-with-persistent-data-using-gwt-stm-and-bdb/</link>
	<description>Notes on things I'm thinking and doing</description>
	<pubDate>Thu, 04 Dec 2008 00:14:52 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: Tom Davies</title>
		<link>http://diversions.nfshost.com/blog/2008/03/27/a-cal-webapp-with-persistent-data-using-gwt-stm-and-bdb/#comment-1414</link>
		<dc:creator>Tom Davies</dc:creator>
		<pubDate>Tue, 01 Apr 2008 20:20:05 +0000</pubDate>
		<guid isPermaLink="false">http://diversions.nfshost.com/blog/2008/03/27/a-cal-webapp-with-persistent-data-using-gwt-stm-and-bdb/#comment-1414</guid>
		<description>&lt;p&gt;Hi Raoul -- I believe that functional data structures don't suit STM, because while you can update, e.g. a tree without replacing many nodes, you are always going to replace the root node, so any concurrent transactions which have read or written the TVar which holds it will retry -- which means any transaction which is concurrent with an update, as everyone who accesses the tree will read the root node.&lt;/p&gt;

&lt;p&gt;There may be some non-STM approach which would work when concurrent updates are infrequent (e.g. all updates can be performed by one thread). Because purely functional data structures are 'persistent' (as defined by Okasaki) you could have &lt;em&gt;one&lt;/em&gt; mutable reference which is updated by the writing thread each time it performs an update, and is read by the other threads periodically -- they will always have a consistent view of your data structures.&lt;/p&gt;

&lt;p&gt;But that limitation to one writer makes this sound fundamentally non-scalable and unsound -- like Prevayler, for instance.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi Raoul &#8212; I believe that functional data structures don&#8217;t suit STM, because while you can update, e.g. a tree without replacing many nodes, you are always going to replace the root node, so any concurrent transactions which have read or written the TVar which holds it will retry &#8212; which means any transaction which is concurrent with an update, as everyone who accesses the tree will read the root node.</p>

<p>There may be some non-STM approach which would work when concurrent updates are infrequent (e.g. all updates can be performed by one thread). Because purely functional data structures are &#8216;persistent&#8217; (as defined by Okasaki) you could have <em>one</em> mutable reference which is updated by the writing thread each time it performs an update, and is read by the other threads periodically &#8212; they will always have a consistent view of your data structures.</p>

<p>But that limitation to one writer makes this sound fundamentally non-scalable and unsound &#8212; like Prevayler, for instance.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Raoul Duke</title>
		<link>http://diversions.nfshost.com/blog/2008/03/27/a-cal-webapp-with-persistent-data-using-gwt-stm-and-bdb/#comment-1413</link>
		<dc:creator>Raoul Duke</dc:creator>
		<pubDate>Tue, 01 Apr 2008 18:58:03 +0000</pubDate>
		<guid isPermaLink="false">http://diversions.nfshost.com/blog/2008/03/27/a-cal-webapp-with-persistent-data-using-gwt-stm-and-bdb/#comment-1413</guid>
		<description>&lt;p&gt;since i just got Okasaki's book for my birthday i have to ask what you think about taking a functional-data-structure approach? how would that play with STM etc.? thanks for any thoughts.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>since i just got Okasaki&#8217;s book for my birthday i have to ask what you think about taking a functional-data-structure approach? how would that play with STM etc.? thanks for any thoughts.</p>]]></content:encoded>
	</item>
</channel>
</rss>
