[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: madeleine + transaction::simple

Austin Ziegler

9/18/2003 9:44:00 PM

On Fri, 19 Sep 2003 02:55:12 +0900, ahoward wrote:
> would i be the first to consider this? has it been done? any ideas on
> the fastest way - one could up with alot of marshaling...

I don't really know Madeleine, but I don't think that there'd be much
conflict between the two frameworks. Transaction::Simple takes a snapshot of
the object at a point in time and keeps it in memory. It doesn't concern
itself with repeatability of a transaction (as Madeleine does), but it uses
that snapshot to rebuild the object if rewound. It does not reuse the same
object identifiers (unless the object responds to #replace), so anything
that depends on #__id__ will break on a rewind or abort.

Transaction::Simple is used in PDF::Writer to make "test changes" to a PDF
document; if something protected would cross a page boundary, we undo it,
create the page boundary, and then restart the object. So it's really meant
for "test changes", not for persistence.

Maybe Madeleine can use Transaction::Simple to gain the ability to rewind
transactions.

-austin
--
austin ziegler * austin@halostatue.ca * Toronto, ON, Canada
software designer * pragmatic programmer * 2003.09.18
* 17.30.56



1 Answer

Gavin Sinclair

9/19/2003 1:37:00 AM

0

On Friday, September 19, 2003, 7:44:07 AM, Austin wrote (in part):

> [Transaction::Simple] does not reuse the same object identifiers
> (unless the object responds to #replace), so anything that depends
> on #__id__ will break on a rewind or abort.

Austin,

Does it concern you at all that an object might implement #replace but
with entirely different semantics? I know it''s not that likely, but
it''s worth considering.

Gavin