Re: Rollback?
Sébastien Bigaret <[email protected]> Mon, 09 Oct 2006 18:17:28 +0200
| Newsgroups | gmane.comp.python.modeling |
|---|---|
| Message-ID | <[email protected]> |
Sorry for the very late answer, for an unknown reason I did not see your po= st. > Well, I can forbid that for the main database of my application. > = >> - optimistic locking: you'll get notifications when saving changes, > = > How does this work? I was thinking of a delegate method being called by saveChanges() when it n= otices that changes have happened in the database since the last time the D= B was queried (meaning that someone else has modified the db). The delegate will receive a full view of observed modifications: the proper= ties that have changed (attributes+relationships), objects that have been d= eleted. With this information any possible processing is possible: custom = fusion of local+db modifications, notifying the user of a conflict and aski= ng him how to solve it, ignoring changes and overriding the db changes, any= combination of the previous solutions... In any case, the delegate will de= cide whether the transaction opened by saveChanges() should be cancelled fo= r real or re-submitted after conflicts have been solved. -- S=E9bastien. Wolfgang Keller wrote: >> But, given that pessimistic locking locks any data that is going to be = >> updated, if your application is transaction-intensive updating the same = data, = > = >> you'll get a lot of processes waiting at the same time. > = > "Waiting for Godot" > = > Or, as users of SAP call it in German; "Sanduhr-Anzeige-Programm" - = > Hourglass-Display-Program. >:-> > = >> it won't even help if the framework had something like a central server = on = >> top of the db & shared among different processes since the data still ca= n = >> be updated directly at the database level by any other process. = > = > Well, I can forbid that for the main database of my application. > = >> - optimistic locking: you'll get notifications when saving changes, > = > How does this work? > = >> giving you the opportunity to examine the change and, e.g., automaticall= y = >> handle them or provide feedback to the user. = > = > That would be what I am looking for. > = > Sincerely, > = > Wolfgang Keller > = ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3DDE= VDEV