Be aware to the Crush antipattern

Another fancy name pointing to a very simple notion.  - Crush antipattern woah...

Example: You have 2 administrators that play with administration UI, not all operations are in a single transaction, an admin might view data, go to drink coffee then update this data based on what he viewed 30 minutes ago.  Obviously he is not aware if someone else made changes to this data, so he might update it with non relevant data.  That is the crush situation.

The way to workaround it, use version mechanism (optimistic locking on database) or in application level.

Don't know what versioning mechanism of optimistic locking is? google it...

Comments