Comment on page
Custom Conflict Resolution
It's easy to build custom conflict resolution in your app. Typically, this would be implemented separately for each table where manual conflict resolution is required, since the UI to resolve the conflicts would be custom for each.
- Create a table to record write conflicts.
- When the server encounters a conflict, write it to this table, and use appropriate sync rules to sync the data back to the client.
- The client can then display these conflicts to the user, and provide an option to resolve the conflicts.
- Create a separate table that records individual changes to rows.
- The client updates the original table optimistically, in addition to creating a new change row.
- The server ignores updates to the original table, and only processes the change rows. Each can be marked as “pending” / “processed” / “failed”, with this status being synced back to the client. The client can then display this status for each change to the user if desired, with appropriate logic to manually resolve failed updates.