Table of Contents
No doubt there are other important things in life besides conflict, but there are not many other things so inevitably interesting. The very saints interest us most when we think of them as engaged in a conflict with the Devil.
In an ideal scenario, any entry would only be changed or deleted on one client and then immediately synchronized with the server and all other clients. Unfortunately this is rather rarely the case. In practical use, the time between synchronizations may be very long. In the mean time, the same item gets changed on different clients, or even deleted on other clients.
These possible inconsistencies are called conflicts. Usually it is up to the server to detect these conflicts and provide a resolution. We will now discuss which types of conflicts can occur and how they could be solved.
The easiest conflict is an item that has been changed on two different clients: Both clients have synchronized at some point in time. Then, the same entry has changed on both clients. When the first client connects to the server, a regular sync happens. Then, when the second client connects, the server detects that this entry has changed on both, the client and the server. It does this by comparing the date of the last sync with the date of the last change of the item. Now both entries have to be merged as explained in the next section: