Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Locking a table row while web form is open

by astroboy (Chaplain)
on Dec 23, 2005 at 19:13 UTC ( [id://518811]=note: print w/replies, xml ) Need Help??


in reply to Locking a table row while web form is open

Optimistic locking may work for your application, but for some apps it's not an acceptable solution:

  • When the user queries a row for editing generate a hash of said row
  • When the user requests that the row is saved, regenerate the hash of the existing row. If it matches the original hash, then complete the save - otherwise let the user now that the row was changed by someone else

The problem that I've encountered with locking web apps, is that rows get checked out/locked, and then the user gets distracted, called into a meeting etc and they never remember to unlock the record. Optimistic locking solves this problem, but it may not suit your business rules

  • Comment on Re: Locking a table row while web form is open

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://518811]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-04-25 23:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found