Conflict Strategies, Explained with a Quiz App

April 3, 2025 (1y ago)

Conflict Strategies, Explained with a Quiz App

Conflicts are common in software development, especially when several people edit the same data at the same time. This post explains the most common conflict strategies using a practical example: a quiz app we built during the Ionic workshop in the first semester.

The scenario

Two users edit the same quiz question at the same time. One adds a time reference, the other rephrases it completely. Which version wins?

The strategies

  • Last Write Wins (LWW): the last save wins. Simple, but can lose data.
  • Optimistic Concurrency Control (OCC): versions or timestamps detect conflicts, and the user merges manually. Good when conflicts are rare.
  • Pessimistic Concurrency Control (PCC): a lock prevents parallel edits. Maximum integrity, but potential waiting times. Typical for banking or e-commerce.
  • Automated merge strategies: algorithms combine changes automatically, as Git does. Unreliable for semantic conflicts.
  • User-guided merge: the user picks a version or merges by hand. Common in CMSs and collaborative editors.

Conclusion

There’s no one-size-fits-all solution. The right strategy depends on how likely conflicts are, how critical the data is and how much effort you can ask of users.

Read the full post on the MFG Blog of USTP → (in German)