A bug I see in nearly every web app: Last in wins


A bug I see in nearly every web app: Last in wins.

Bug: If two users are editing the same record, the user who clicks save last “wins”. The last save overwrites the previous save.

Two solutions to consider:
1. Notify. Notify me when another user starts editing the record I'm editing. “Warning: Bob is editing this record.” And notify me when I try to save a stale record. “Bob changed this record.” When this conflict occurs, I can copy my changes, reload, and integrate my changes into the latest version. Or, I can just paste my changes over the previous edit if mine should "win".

2. Lock the record. When someone starts an edit, disallow others from starting an edit. "Bob is editing this record." Time out the edit and remove the lock if it's not completed in x minutes.

Anyone have a different approach?

View original on X