Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^3: Re: Implementing rowlocking (there's a better way)

by Anonymous Monk
on Jan 10, 2007 at 21:24 UTC ( [id://594018]=note: print w/replies, xml ) Need Help??


in reply to Re: Implementing rowlocking
in thread Implementing rowlocking

Most commercial systems I've worked with implement this in a much simpler manner: by simply adding a datestamp to the row in question. When you render the edit form, include the datestamp as a hidden field. When the user submits the update, compare the datestamp with the one in the row. If the row contains a newer one, there's a overwrite issue. Ask user to confirm they want to overwrite, maybe give them some idea what's changed. Bonus points for using ajax to notify open clients of the row change while they're editing the records. I think this is orders of magnitude simpler than your attempt to reinvent client/server locking behavior in the browser (which might just be a first - which should scare you), and it's backed up by lots of prior art, so you know it will work.
  • Comment on Re^3: Re: Implementing rowlocking (there's a better way)

Replies are listed 'Best First'.
Re: Re^3: Re: Implementing rowlocking (there's a better way)
by Anonymous Monk on Jan 11, 2007 at 01:42 UTC
    fwiw, nmerriweather and I are saying the same thing. I didn't see that post before I posted.

    KISS

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://594018]
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: (7)
As of 2024-04-19 08:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found