3 ms·
Ask HN: Bi-directional data sync, how did you do it?
Since Mulesoft's acquisition I've been thinking how I would build something similar. A couple of projects I'm involved in have mentioned "We need bi-directional sync between Salesforce and X, Y and Z", which has always been followed by "but MuleSoft and PieSync cost serious $$$$$".
I've used Zapier et al and scripted single-direction sync. Apart from the need for a decent change detection and conflict resolution, I'm at a loss for how you would reliably sync data between multiple sources.
Can anyone tell me how they've implemented bidirectional sync? I get the ESB-esque bit of mapping data to a standard format; when it comes to working out what's changed and writing the changes to each system I already have a handful of cases where data would be incorrectly overwritten. E.g.:
09:00:00 Data polled from systems A and B (for these are 'enterprise' systems without webhooks or notifications or changefeeds)
09:00:01 A record in the batch is updated in system A
09:00:07 The changes are written back to each system, OVERWRITING THE CHANGE IN SYSTEM A
Without the ability to lock system A while the sync is done, I don't see how this can be prevented?
References appreciated; I'm on holiday soon and up for a lot of reading. StackExchange has been very silent; 'ESB' and 'bi-directional sync' aren't the right keywords?
Finally, any open source implementations I should look at?