On May 23, 6:44 pm, Michael Bayer <[EMAIL PROTECTED]> wrote:
> > add on top of this versioning/bitemporalism and things get tough...
>
> big words again...hold on...zero google hits for 'bitemporalism'...OK
> i guess that means "two things happening at once"

I think he means the distinction between actual time and record time
of temporal objects as nicely described by Fowler (http://
www.martinfowler.com/eaaDev/timeNarrative.html). I'm currently
developing an application that needs that distinction and I can say
that it can get pretty confusing at times.

> > Any ideas/patterns how to transfer this nesting-of-user-transactions
> > into DB / alchemy?
>
> I dont have a deep insight since i havent done persistent GUI stuff
> since the late 90s, but definitely dont use a real DB transaction for
> the dialog windows...you dont want any long-running DB transactions
> (but i think you knew that).

If you know really well what you're doing then it may be simpler to
offload all the lock management, transaction isolation and consistency
to the database. But as a rule of thumb, long-running transactions are
bad, mkay.

> the two options that come to mind, for the nested scenarios
> particularly, are using multiple Sessions / copies of the objects to
> keep their changes separate, and the other is to have a separate
> model configured for your GUI windows...probably a command pattern
> that encapsulates each click/state change in a distinct command
> instance (without modifying domain objects).  when youre ready to
> actually write to the database, you loop through your accumulated
> command objects and apply each change to the appropriate domain
> object and then flush() as approrpriate.

Actually unit of work can be regarded as a kind of command pattern. So
what could work here is nested units of work.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to