If you choose to go down the journaling route, some things would be helpful:

1.  all of your functions (journalable actions) should have inverse
functions to reverse them.

If this is true, then from a particular state, you can simply record
the actions, checkpointing all user objects periodically.  A sequence
might be something like:

<save binary state of file>
cut(1:30, 1:40)
loop(a,13, sec=10)
....

Since you described an music editing app, doing this in clean way
(without losing precision and information) might require storing
actual binary states.   This sounds, to me, a little nightmarish.

I don't have any insights on the SA front, alas.


Gregg Lind


On Tue, Feb 24, 2009 at 2:41 PM, paniq303 <[email protected]> wrote:
>
> On Feb 24, 5:16 pm, [email protected] wrote:
>> these are two general patterns, observer/listener and undo/redo
>> (command-pattern), which have nothing to do with DB.
>> i dont know about 2) DB-observers which would react on somebody else
>> changing the DB, AFAIK that is possible on certain servers only, but
>> the rest should be done independly on higher level than DB-stuff.
>> read about Model-View-Controller.
>
> Your reply sounds a bit offended. I'm sorry if my request came over as
> kind of rude. I don't mean to upset anybody, and I don't want to take
> up your time, so please send me elsewhere if my inquiry does not fit
> the projects scope.
>
> I'm using a Model-View-Controller scheme at the moment. I also know of
> the command pattern and how it works.
>
> But I'm trying to write as little code on my own as I can. SQLAlchemy
> provides a high level model part for the application, and borders on
> the issues I presented above. I can see that the issues I presented
> are not neccessarily of importance in the scope of SQL.
>
> So let me rephrase my question: how could I solve above two issues in
> the most efficient manner, leveraging whatever SQL and SQLAlchemy have
> to offer? Is there any short cut I can take on the way to undo/redo
> functionality?
>
> If journaling DB changes would be a good way to track changes, how can
> I hook up on them best? Where would my plan fit in?
>
> I'm sorry if these questions swamp you. Maybe I am thinking too much.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected]
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