We have a scenario where we need to update an inventory. In this scenario, our inventory data is synchronized with Couchbase Mobile.
If we were to update the same balance of an item in our inventory, would this result in a merge conflict?
Let’s say a coworker takes 5 items of an item category, and another coworker takes 2. We would like to have the balance adjusted to the now 7 fewer items inventory, but fear a merge conflict that will cause only one inventory withdrawal to be registered.
Do you have any recommended solution for this scenario? In our case, the inventory balance is stored as an integer.
A similar scenario would be an airlines company with their seat selection. How do we deal with such cases in an offline synchronization environment?