[Info-vax] OT: Record locking for web transactions

JF Mezei jfmezei.spamnot at vaxination.ca
Mon Feb 17 15:13:17 EST 2014


With RMS, things were simple. the process running the UI also had the
record locks. If process dies, any/all locks are released.

How does one handle this with web transactions ?

Say use pull up a record to update it. When you read the record, you put
a write lock on it to prevent others from modifying it while the first
user does. In normal circumstances, the user press "Submit" and the
record is updated and the lock is released.

However, there is no garantee the use will press Submit, and the user
could very well close that web page, turn off his PC etc.

So what sort of strategy is used to handle locks taken by a user who
disapears without warning and never completes the transaction ?

(this in a context of an app written in PHP accessing MySQL, but looking
for generic strategy to handle this).



More information about the Info-vax mailing list