A method for synchronizing data on a first device with data at a second
device, includes: determining a pre-image of the data on the first device
according to a filter after a previous synchronization with the data at
the second device; determining a current image of the data at the second
device according to the filter; determining a delta of the current image,
where the delta comprises data that exists in the current image and has
changed since the previous synchronization; instructing the first device
to delete data that exists in the pre-image but not in the current image;
and instructing the first device to UPSERT a union of the data that
exists in the delta and the data that exists in the current image but not
the pre-image. This is efficient in time and bandwidth resources while
also providing consistent data integrity.