Boost logo

Boost :

Subject: Re: [boost] [transact] code in sandbox
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2010-02-10 12:20:40


Hi Stefan,
----- Original Message -----
From: <strasser_at_[hidden]>
To: "Bob Walters" <bob.s.walters_at_[hidden]>; "vicente.botet" <vicente.botet_at_[hidden]>
Cc: <boost_at_[hidden]>
Sent: Tuesday, February 09, 2010 2:54 PM
Subject: [transact] code in sandbox

>
> Hi,
>
> I haven't had much time lately, and that's not going to change to next
> couple of weeks, so I've uploaded what I have so far to the sandbox:
>
> https://svn.boost.org/svn/boost/sandbox/transaction/boost/transact/

I'm too in the same case. Too much work :(.
 
> what's new:
>
> *** basic_transaction_manager:
> - now supports all kinds of combinations of commits, like we've
> discussed, including one-phase/transient two-phase, persistent
> two-phase. no logging/recovery yet.
> - lazy and non-lazy transaction construction, user-configurable
>
> *** simple_transaction_manager:
> a transaction manager supporting only one resource.
> basic_tranaction_manager includes a lot of MPL/fusion and the logging
> infrastrucure, none of which is needed for only one resource.
> this is intended to be the default transaction manager when one of our
> libraries is used on its own.

Yes, at a first glance this could allow possible optimizations.
 
> *** logging infrastructure:
> to be used by basic_transaction_manager for its distributed
> transaction log, and optionally by resource managers that need logging
> (so it is part of the public interface!)
>
> - olog_files: maintaining log files without knowing its contents,
> manual log rolling
> - otransaction_log_files: same as olog_files, but automatic log
> rolling based on transactions
> - olog: writes to olog_files, aware of log entries
> - olog_buffer: same interface as olog, but buffers log entries
> locally and only accesses the log when the internal buffer overflows.
> - TODO: ilog_files/ilog to read/recover from logs. code is there,
> but not migrated to "transact".
> - TODO: interleaved_ologs/..., providing multiple olog interfaces so
> different resource managers can share a log, as we've discussed.
>
> *** new syntax for transaction scopes:
> syntax changed from:
> atomic{
> ...
> }retry;
>
> to
>
> do atomic{
>
> }commit();
>
> I prefer that syntax because it resembles the do{}while(...) syntax.
> downside is that it conflicts with transaction::commit() if the user
> chooses to define BOOST_TRANSACT_COMMIT to "commit" (as is done above).

Maybe we can preserv both and see how the user react. Take in account that as macros must be prefixed, the preceding will look like

BOOST_TRANSACT_ATOMIC {
   ...
} BOOST_TRANSACT_RETRY;

and
 
 do BOOST_TRANSACT_ATOMIC {
 
 }commit();

 
> *** TODO object_access
> not migrated to "transact" yet. utility functions for resource
> managers to serialize/clone/compare/... objects.
>
>
> regards,
>
> Stefan

Thanks for the work you have done. I'll come back when I'll have more available time.

Best,
Vicente


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk