From: "M. Edward (Ed) Borasky" Date: 2006-10-18T00:39:20+09:00 Subject: Re: Rails q: Two-Phase Commit/Updatable View/Roles Ken Bloom wrote: > On Tue, 17 Oct 2006 08:46:42 -0400, Paul wrote: > >> I'm exploring learning RoR, then using it for a new start project. Been >> reading allot of RoR comparisons to Java.... I'm not formally educated in >> enterprise client/server and have some Q's regarding some of what I've read. >> >> 1. Two-phase commit: The general tone I read was "if you need a two-phase >> commit, use Java." What is a two-phase commit? When/Why/Where would I want >> it? Since I lived without it so far, I think I'm OK now, but I like to plan >> projects with potential for future growth. If someday I did have a business >> case for 2-phase commit, could I do something in RoR to meet that need? > > Two phase commit is a protocol for commiting a single transaction that > spans multiple databases. It's supposedly difficult to do in Java too, but > if you need it you can look into database middleware that can coordinate > distributed transactions so that it appears to your rails app as > though you're only working with one database. > > --Ken Bloom > Two-phase commit is what makes transactions have the ACID properties! Lack of two-phase commit is a show-stopper for many database-backed applications, and if Rails doesn't support it somehow, I'd be extremely surprised. In any event, any reasonable DBMS that supports transactions should have two-phase commit built in somehow. I'd recommend asking this question to DHH and the Rails team -- surely they can't have ruled out Rails applicability for transaction processing!