On Mon, 5 Nov 2001, Jelle Ouwerkerk wrote:
> Problem: How are people dealing with data integrity issues such as stale
> data when writing web-based apps? For instance:
[...]
> In some scenarios, user B should be prevented from updating.
Maybe you can do something like this:
user A SELECTs the data, and the web app caches the fields.
user B does the same thing.
user B changes some fields and commits.
user A changes some fields and tries to commit. His webapp SELECTs the
data again and checks against its cache.
Since the data is different, the webapp presents him the three versions
and lets him choose.
The idea is to check every time you are going to commit the data to see
if it changed while you weren't looking. If it did, tell him so and let
him decide.
--
Alvaro Herrera (<alvherre[@]atentus.com>)
"Ni aun el genio muy grande llegaria muy lejos
si tuviera que sacarlo todo de su propio interior" (Goethe)