[Info-vax] OT: Record locking for web transactions
Richard Maher
maher_rjSPAMLESS at hotmail.com
Tue Feb 18 17:57:06 EST 2014
On 2/18/2014 4:13 AM, JF Mezei wrote:
>
> 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).
>
Web is no different to say ACMS. Server affinity can never be relied
upon so you use some form of row version control to see if something's
changed.
If you want to see how the ACID properties of a true 2PC can be
preserved over multiple web-servers then give me somewher to display my
source and I'll show you.
Cheers Richard MAher
More information about the Info-vax
mailing list