I have a web application and a REST API server (Microsoft Dynamics CRM 2016) that I don't have access to it's code, but I have access to the available resources. I need to create a data sync between both servers, some of the tables are one way and the others two way data sync has to be done, I haven't found any good solution to solve the problem.
I can handle the one way data sync by creating a log table of each SQL statement executed in my web application, and after a period of time I can use the REST API endpoints to sync data from my web application into the REST API server, but how to do the inverse (i.e sync data from REST API application into my web application)?
The naive solution are to get all table records from REST API server and then start syncing by comparing records from both sources, given that I currently don't have timestamp on the records, and I have no way to get the resources that are modified/inserted from the REST Server, because of that I should get all the resources from REST server and not the changed records which will increase the network traffic during every sync operation.
Insertion are not a problem, the problem is with update and delete operations.