Re: ACIDity of Prevayler 2.6
Robert Friberg <[email protected]> Wed, 14 Nov 2012 21:07:25 +0000
| Newsgroups | gmane.comp.java.prevayler |
|---|---|
| Message-ID | <[email protected]> |
Interesting discussion! Klaus is right about the atomicity. But i would say system failure rather than system crash. Which conditions you choose to include in that category are arbitrary. For LiveDB, we chose the rigid approach. Any other exception than CommandAbortedException thrown by a command is considered a system failure and triggers a rollback (full restore) to the previous state. The command author is responsible for validating and failing gracefully unless preconditions are fulfilled. The royal food taster causes a severe performance hit for each well behaved command, better to take the hit only for the occassional rogue command. But why does prevayler write to the journal before execution? We do it the other way around. If the command fails, either gracefully or fatally, nothing is persisted. If it succeeds but the append fails we halt the system and report falure to the calling code. If this is bad, please explain why! Robert Friberg http://livedomain.codeplex.com Sent from my iPad On 14 nov 2012, at 20:06, "Klaus Wuestefeld" <[email protected]> wrote: > Atomicity is not about detecting human errors in the coding that leads > to the operations in a transaction. It is about cleanly surviving > system crashes. > > I would agree Prevayler provides less *Consistency* built in now, not > lack of Atomicity. Consistency, yes, is something that makes sense > from the point of view of a human being. > > Even your best RDBMS with your typical constraints will not detect all > possible buggy SQL(DML) statements sent to it. That doesnt invalidate > its atomicity. > > With the food taster we were consistent with regard to Java's strong > typing + RTEs. Now we are consistent only with regard to Java's strong > typing (which is already better than RDBMS constraints IMHO). > > It was a conscious trade-off to become less consistent, on the one > hand, but faster, more newb-friendly, simpler and use half the RAM, on > the other. > > It seems to be trivial to implement a Transaction base class that does > food tasting internally, orthogonal to Prevayler, if one so wishes. > > Klaus > > ------------------------------------------------------------------------------ > 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 > ------------------------------------------------------------------------------ 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