How to sync data between two detached systems using rest API?

by Dario Granich   Last Updated May 02, 2018 08:05 AM

I own system A, and other entity owns system B. I need to sync system B, based on changes that took place in system A. Data being synced would be spitted into different sets, so I dont have to sync entire system at once. I have to use rest API.

What are the options to sync data? I am aware of these two ways.

1. Full sync

First solution that comes to my mind is do a full sync, but despite the fact it would resolve any discrepancy between systems, it would obviously cause a high network usage and lengthy sync if a data on system A gets too big.

2. Event based sync

Other solution would be based on events. If a list 1 is updated, and after related event takes places, it would trigger an update of list 2. If I go with this solution I would use event based messaging, but what happens if a message gets lost in the process?

Would a combination of event based sync and full sync (less frequent) do the job? Are there any other methods to complete this task?

Related Questions

Combining asynchronous and synchronous programming

Updated August 07, 2018 23:05 PM

How to create new aggregate root in CQRS?

Updated February 21, 2017 13:05 PM