Integration Server 10.3 | Developing Data Synchronization Solutions with webMethods Mobile Support | Overview | What Is webMethods Mobile Support? | Change Detection and Conflict Resolution
 
Change Detection and Conflict Resolution
When a mobile application user downloads data from the server, the data the server sends to the device is a copy of all or part of the backend application’s “master” data. Conflicts can arise when the backend master data is updated by multiple sources. Examples are as follows:
*Conflicts can arise if multiple mobile application users submit changes to the same backend data around the same time. When changes that a user submits are no longer based on current master data, the submitted data is referred to as stale data.
*Conflicts can arise if the backend application updates the backend data directly and a mobile application user has submitted changes to the same backend data.
When Mobile Support receives a synchronization request, the server must determine whether a conflict exists between the data the mobile application user sends and the backend application’s version of the data. If the backend data is updated solely through requests received from mobile devices through Mobile Support, Mobile Support will ensure that no conflicts exist between devices. If the backend data will also be updated by the backend application, Mobile Support will also consider the backend application’s updates when looking for conflicts.
If a conflict exists, Mobile Support resolves the conflict using the conflict resolution rule that the business application developer specifies during creation of the mobile sync component. Mobile Support offers the following conflict resolution rules:
*“Client wins” rule (accept stale updates): With this conflict resolution rule, Mobile Support accepts the data the mobile application sends, even if the corresponding backend record was changed since the device last synchronized with the server.
*“Server wins” rule (reject stale updates): With this conflict resolution rule, Mobile Support ignores the data the mobile application sends if the corresponding backend record was changed since the device last synchronized with the server.
For this rule, if the device’s data is stale, Mobile Support overwrites the device’s data with the latest data from the server. Mobile Support then returns a response to the calling application indicating that the conflict was resolved by using the server’s version of the data.
If the device’s data is more current than the server’s data, Mobile Support overwrites the backend data with the data from the mobile device.