Example SituationTo set the scene, here's a typical situation in our web applications: - David pulls up data in his browser. Goes to lunch.
- Felicia pulls up same data, makes a change and saves. Changes Felicia's changes are committed to the DB.
- David comes back from lunch, changes the data on his screen and saves. Changes David's changes are committed, overwriting Felicia's changes.
Obviously this isn't good; when David finally submits changes, we need the app to detect that someone else has changed the data, and to handle the situation appropriately. Two aspects to doing this are: - Detection - how to detect a concurrent update
- Handling - what to do if we detect a concurrent update
We'll take these in reverse order: |