Thanks for your suggestion.
I need your expert input to solve one problem. We have application in which data is updated from Web and App (IOS), So in our case data is updated from both side. From web data is directly updated in main bucket and from App(iOS) data is updated in shadow bucket using sync gateway, so in our scenario we have more chances of conflicts in documents during synchronization.
Regarding implementing conflict resolution on server-side at Sync Gateway, based on your input if I understood correctly we have to call _changes rest API from other source and then we have to add listener on this API to get continuous conflicts data. I have some confusion so if you can help me to understand the flow of execution inside Sync Gateway which helps me to implement the conflict resolution logic at right place.
Suppose if we add listener out side the sync gateway and sync function executes first than in that case document get updated twice. First sync gateway during normal sync and 2nd from our manual conflict resolution code/process.
So in this scenario if you give your expert view on how & where to implement conflict resolution logic thus we implement it right way. IF you know internal flow of Sync gateway than please let us know so it will help me to take right decision.
Please share your expert view and share all details regarding how to implement conflict resolution at server side using Sync Gateway.