Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Concurrency control in web applications

by perrin (Chancellor)
on Oct 24, 2003 at 17:39 UTC ( [id://301905]=note: print w/replies, xml ) Need Help??


in reply to Concurrency control in web applications

Most web apps don't bother trying to solve this problem because it doesn't matter to them. If a user opens two windows to edit his own phone number and saves in both of them, he probably expects the last save to win, and that's what happens. In the rare case where this does matter, people generally use a couple of standard approaches. The first is optomistic locking, which your version counter is an example of. (You can also use the previous state as a WHERE clause in your update, which accomplishes the same thing without needing the counter field.) The second is pessimistic locking, which your "in use" field is an example of. I've never heard of any other approach that didn't sound like overkill.
  • Comment on Re: Concurrency control in web applications

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2024-04-24 10:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found