Re: ACIDity of Prevayler 2.6

Karl Wettin <[email protected]> Thu, 15 Nov 2012 11:45:25 +0100
Newsgroups gmane.comp.java.prevayler
Message-ID <[email protected]>
15 nov 2012 kl. 01:58 skrev Klaus Wuestefeld:

> The FoodTaster does not protect us against infinite loops, deadlocks
> in the code, non-determinism, silent bugs, swallowed exceptions or
> exceptions in worker threads. How is adding protection against
> exceptions that leak suddenly atomic?

Because (of that I argue) an exception is the definition of a system error. I would categorize all the examples stated above as bad code and bad design and it would of course be very hard to take measures in order to protect against that. If those examples are to be considered system errors then they should also be throwing an exception due to timeouts, stack overflow or what not.  

There is a big difference between allowing for users to implement atomic transactions and having a framework that executes transactions atomically.

If one would implement a transaction that on execution first stores the state of all data points to be affected, and upon encountering an error revert the system to the original state using the data, then I would agree on calling  this an atomic transaction and I would also agree on it being executed atomically. I would however not say that *the framework* executed the transaction atomically since it was the ad hoc code in the transaction that supplied the atomicity.

If there was an AbstractRollbackableTransaction in Prevayler that passed down a decorated version of the prevalence base, that using instrumentation or something kept track of the changes made to it within the transaction in order to allow for reverting to the original state upon an exception, then I would once again say that the framework could supply atomicity. (Such a class would be a really nice contribution to Prevayler.)


> To me it is an argument along a scale of consistency, not a true/false
> argument of atomicity.

To me it's the latter.



			karl

------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov

_______________________________________________
To unsubscribe go to the end of this page: http://lists.sourceforge.net/lists/listinfo/prevayler-discussion
_______________________________________________
"Databases in Memoriam" -- http://www.prevayler.org