
In the mobile solution landscape, multiple systems can share a single instance of data. Consider a data object is shared between two systems. This data object could be referenced and also modified on both systems simultaneously. Conflicts can occur when a single data object is modified by two different users and both upload the modified data object to the Data Orchestration Engine (DOE). Conflicts are detected during the synchronization process between the DOE and mobile client. If the DOE detects a conflict, a rejection message is sent to the mobile device.
The participating systems in the above scenario could be two mobile clients or it could be a mobile client and a back-end system.
Consider a service order example involving two mobile devices A and B and a back-end system. The total number of equipments available in the back-end database is 10. Device A places an order request for 10 equipments and synchronizes with the DOE. On synchronizing with the DOE the database is updated with the latest information. DOE sends an acknowledgement to Device A indicating that the order has been created. Hence the total number of equipments now available is 0.
Device B at the same time places an order request for 5 equipments. On synchronization, the DOE identifies that there are no equipments available in the database. This scenario is referred to as Conflict. Since the DOE detects a conflict, a rejection message is sent to Device B indicating that the service order has not been created.
The DOE resolves these conflicts using any one of the following schemes.
Last One Wins
A data object instance can be modified by multiple mobile application users. When all the modified instances are submitted simultaneously to the DOE, the DOE updates the database with the modified data object instance that is received last.
First One Wins-Object Level
When all the modified data object instances are submitted simultaneously to the DOE, the DOE updates the database with modified data object instance that is received first. As a result, the DOE rejects the modified data object instances submitted by other application users.
First One Wins-Row Level
Within a data object instance, multiple application users may update the same record or different records. Consider the scenario where multiple application users update the same record and simultaneously submit the modified data object instances to the DOE. In this case, the DOE updates the database with the changes to the record in the modified data object instance that is received first. As a result, the DOE rejects the other data object instances that update the same record.
However, in a scenario where multiple application users update different records simultaneously, the DOE updates the database with the changes to the records at once.
You configure the conflict detection mechanisms at the data object level.
More information: Creating a New Data Object