<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Paul Fallon's WebLog : - Enterprise Services</title><link>http://blogs.msdn.com/paul_fallon/archive/tags/-+Enterprise+Services/default.aspx</link><description>Tags: - Enterprise Services</description><dc:language>en-IE</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Volatile Transactions &amp; In-Memory Transactions - do they have ACID, ACId or ACI properties?</title><link>http://blogs.msdn.com/paul_fallon/archive/2004/12/12/280207.aspx</link><pubDate>Mon, 13 Dec 2004 01:07:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:280207</guid><dc:creator>no1138</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/paul_fallon/comments/280207.aspx</comments><wfw:commentRss>http://blogs.msdn.com/paul_fallon/commentrss.aspx?PostID=280207</wfw:commentRss><description>&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;In my last blog posting, &lt;a id="viewpost" href="/paul_fallon/archive/2004/12/08/278563.aspx"&gt;How should we think of Transactions ?&lt;/a&gt; I mentioned Volatile transactions and how I&amp;nbsp;currently think&amp;nbsp;they can be perceived in different ways! Do they have ACID, ACId or ACI properties?&lt;?xml:namespace prefix ="" o /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;In case you do not know what Volatile Transactions (aka&amp;nbsp;In-Memory Transactions) are, they&amp;nbsp;are transactions that do not&amp;nbsp;persist&amp;nbsp;to a durable store such as a hard disk (ouch! we have multiple definitions of durable to content with &lt;img src="http://www.paulfallon.com/BlogImages/smile12.gif"&gt;). They are transactions that are done completely in memory and do not incur the I/O cost of writing to a hard disk&amp;nbsp;a Transaction log or the actual known data/state.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;What is interesting about Volatile transactions is that they are sometimes perceived as not being Transactional, because they are viewed&amp;nbsp;as not&amp;nbsp;meeting the ACID properties, especially the "D" property. I suspect the main reason for this view is because there are no Transaction logs and/or no data stored to hard disk.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;So when you look at a typical definition of the ACID properties (like what I have listed below), some of the reasons why this view maybe held become apparent:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;(NB. this is an amalgamation/synopsis of many definitions I have seen)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;A&lt;/span&gt;&lt;/em&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt; - Atomicity - Transactions are atomic (all or nothing) &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;C&lt;/span&gt;&lt;/em&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt; - Consistency - The transaction is a correct transformation of state. Consistency constraints that are defined on the underlying data servers are preserved by a transaction.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;I&lt;/span&gt;&lt;/em&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt; -&amp;nbsp;Isolation - Each transaction should appear to execute independently of other transactions that may be executing concurrently in the same environment.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;D&lt;/span&gt;&lt;/em&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt; - Durability&amp;nbsp;- Once a transaction commits, it’s updates survive even, if the system goes down &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;ok, so a Volatile Transaction meets the ACI of the ACID properties, but not the D as defined above. But is this ("Once a transaction commits, it’s updates survive even, if the system goes down") a true reflection of what Durability means? Many similar variants of this definition gets used on a frequent based and they bring specifics to the definiton that are not about the failure of meeting the ACI properties or making the "Commited" value available/public but focus on the failure of media or a system. In my opinion the failure of media or a system is not an aspect of the paradigm or indeed part of the ACID properties, but an aspect of how the paradigm can be implemented and/or a requirement of the longevity of the state being persisted/determined. It is perhaps the fact that the best known implementation of the data server feature of the transactional paradigm is a database&amp;nbsp;that has led us to shape the ACID properties to the specifics of databases. But perhaps the Transactional paradigm has more to offer than the correctness of data/state transformations on a database.&amp;nbsp;The transaction paradigm has a core focus on simpilifing how we can achieve the correctness of data/state transformations where we may have to deal with concurrency management and recovery control and this can be applied to any transformation of state.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;Perhaps a different way to look at the durability of ACID is where the definition of ACID as an acronym came from and how some of the leading experts in the industry define them. As far as I know the ACID acronym was first coined by Haerder and Reuter (1983). The definition I like to use is that&amp;nbsp;by Gray and Reuter (1993). It is the following:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;A&lt;/span&gt;&lt;/em&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt; - Atomicity - A transaction's changes to state are atomic: either all happens or none happen. These changes include database changes, messages, and all actions on transducers.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;C&lt;/span&gt;&lt;/em&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt; - Consistency -&amp;nbsp;A transaction is a correct transformation of the state. The actions taken as a group do not violate any of the integrity constraints associated with the state. This requires that the transaction be a correct program.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;I&lt;/span&gt;&lt;/em&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt; -&amp;nbsp;Isolation - Even though transactions execute concurrently, it appears to each transaction, T, that others executed either before T or after T, but not both&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;D&lt;/span&gt;&lt;/em&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt; - Durability&amp;nbsp;- Once a transaction completes successfully (commits), its changes to the state survive failures.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;When you read this definition of Durability (and the ACID properties overall), it in my option explains the feature richness of transactions and how it can be applied to the persistence of the transformation of state and also how it applies to the other properties such as A, C and I. The state survives failures by the data server ensuring that when the transaction commits a new durable state is persisted/stable/available/public and if something goes wrong (such as not be able to ensure Consistency) that&amp;nbsp;the data server returns to&amp;nbsp;the previous known state. In essence,&amp;nbsp;this is a contract that guarantees the persistence and stability of the state and that the outcome of a transaction is known/public and usable in subsequent transactions, as a known/correct state. A good definition I have seen is that once a transaction is committed, it cannot be abrogated.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;With Durability being about the persistence, stability and making public of “commited”/known state as we&amp;nbsp;transform from one known/correct state&amp;nbsp;to another, it allows us to&amp;nbsp;leverage the&amp;nbsp;transaction paradigm in many scenarios. For example&amp;nbsp;when using Volatile Transactions, we are leveraging data servers that store data on Volatile media, such as RAM and providing the transaction paradigm in-memory. With the common misunderstanding that Transactions are exclusively for databases, the question arises about the “D” property.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;For me the Durability aspect of a transaction is present in a Volatile transaction. The question is whether its “D” or “d”. Since most transactions are based on the X/Open Transaction processing model, the requirement for log managers or lock managers in resource managers (data servers) are not central or core to implementing the transactional paradigm at a base level. In relation to the usage of Volatile media for Transactions? in my opinion the requirement of the media used by the data server is that it is able to present a stable/persistent/public state once "Commit" has occured.&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;&amp;nbsp;So I believe that Volatile Transactions meet all of the ACID properties and that its ACID with a "D" &lt;img src="http://www.paulfallon.com/BlogImages/smile3.gif"&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;&lt;o:p&gt;phew! long post. &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana"&gt;I guess the crux of the issue is the 2 uses of "durable" when talking about Transactions. One is&amp;nbsp;the "D" in the ACID properties and the other is the property of the data/state/media being used&amp;nbsp;(and&amp;nbsp;how it is&amp;nbsp;stored). The "D" in the ACID properties is more about making a "commited" value available and the other is about an implementation requirement of how long (and/or resilient) a known/committed state must be. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;o:p&gt;&lt;font face="Times New Roman" size="3"&gt;&lt;/font&gt;&lt;/o:p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=280207" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/paul_fallon/archive/tags/-+Enterprise+Services/default.aspx">- Enterprise Services</category><category domain="http://blogs.msdn.com/paul_fallon/archive/tags/-+Web+Services/default.aspx">- Web Services</category><category domain="http://blogs.msdn.com/paul_fallon/archive/tags/-+.NET/default.aspx">- .NET</category><category domain="http://blogs.msdn.com/paul_fallon/archive/tags/-+Whidbey/default.aspx">- Whidbey</category><category domain="http://blogs.msdn.com/paul_fallon/archive/tags/-+Indigo/default.aspx">- Indigo</category><category domain="http://blogs.msdn.com/paul_fallon/archive/tags/-+SQL+Server/default.aspx">- SQL Server</category><category domain="http://blogs.msdn.com/paul_fallon/archive/tags/-+COM/default.aspx">- COM</category><category domain="http://blogs.msdn.com/paul_fallon/archive/tags/-+SO+and+SOA/default.aspx">- SO and SOA</category><category domain="http://blogs.msdn.com/paul_fallon/archive/tags/-+Transactions/default.aspx">- Transactions</category></item></channel></rss>