Re: [SQLObject] collision detection strategy
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Luke O. <lu...@me...> - 2003-05-20 23:12:38
|
Bud - Your example appears to me to be optimistic row-level locking, straight forward. At first glance it seems like a reasonable implementation, although the big question with optimistic/detection schemes is how do you recover? I generally think this needs to be at the programmer's discretion, both for recovery method (typically overwrite or exception in my experience) and for scope (for X transaction, is attribute-level reasonable?) The other thought I'm having right now is that SQLObject seems to simplify some of this if you're using cached objects, because now there is only one possible object, so it's all on the python side to deal with locking as the developer sees fit. but I haven't entirely thought this through. Also, transactions or otherwise, it would seem that with cached objects it would be possible to support setting and managing what level of locking is appropriate on a class(table) or instance(row) or attribute level basis. My brain is already fried, so i won't try to think this out anymore. - Luke |