develooper Front page | perl.perl6.language | Postings from July 2005

Re: Database Transactions and STM [was: Re: STM semantics,the Transactional role]

Thread Previous | Thread Next
From:
Yuval Kogman
Date:
July 20, 2005 05:23
Subject:
Re: Database Transactions and STM [was: Re: STM semantics,the Transactional role]
Message ID:
20050719100459.GB9807@woobling.org
On Mon, Jul 18, 2005 at 15:16:16 +1200, Sam Vilain wrote:
> Yuval Kogman wrote:
> >everyone gets to choose, and another thing I have in mind is the
> >Transactional role...
> >	DBI::Handle does Transactional;
> >To the STM rollbacker and type checker thingy this means that any IO
> >performed by DBI::Handle invoked code is OK - it can be reversed
> >using the Transactional interface it proposes.
> 
> Is this needed, when you can just;
> 
>    atomic {
>       unsafeIO { $dbh.begin_work };
> 
>       unsafeIO { $dbh.do(...) };
> 
>       unsafeIO { $dbh.commit };
>    } CATCH {
>       $dbh.rollback;
>    };

Why have STM like constructs if that's what you're going to do
anyway?

The point is to be able to compose unrelated atomic block into one
atomic action.

If we don't get some separation of concerns from STM we might as
well be using locks.

-- 
 ()  Yuval Kogman <nothingmuch@woobling.org> 0xEBD27418  perl hacker &
 /\  kung foo master: /me wields bonsai kittens: neeyah!!!!!!!!!!!!!!!!


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About