Types of Data Syncs
This page outlines the two different types of Data Syncs available in Cinchy.
Last updated
This page outlines the two different types of Data Syncs available in Cinchy.
Last updated
Batch syncs work by processing a group or a ‘batch’ of data all together rather than each piece of data individually. When the data sync is triggered it will compare the contents of the source to the target. The Cinchy Worker will decide if data needs to be added, deleted or updated. Batch sync can either be run as a one-time data load operation, or it can be scheduled to run periodically using an external Enterprise Scheduler
Batch Sync is ideally used in situations where the results and updates don’t need to occur immediately but they can occur periodically.
For example, a document that will only be reviewed once a month doesn’t necessarily need to be updated every single time a change is made
At a high level, running a batch data sync operation performs these steps (Image 1):
The sync connects to Cinchy and creates a log entry in the Execution Log table with a status of running.
It streams the source and target into the CLI. Any malformed records or duplicate sync keys are written to source and target errors csvs (based on the temp directory)
It compares the sync keys to match up source and target records
The sync checks if there are changes between the matched records
For the records where there are changes, groups them into insert, update, and delete batches.
It sends the batches to the target, records failures in sync errors csv and Execution Errors table.
Once complete, it updates Execution Log entry with final status and execution output.
In real-time syncs, the Cinchy Listener picks up changes in the source immediately as they occur. These syncs do not need to be manually triggered or scheduled using an external scheduler. Setting up a real-time sync does require an extra step of defining a listener configuration in order to execute properly.
Real-time sync is ideally used in situations where results and responses must be immediate.
For example, a document that is constantly checked and referred to should have the most up-to-date and recent information.
The following sources can be used in real-time syncs:
Cinchy Event Broker/CDC
MongoDB Collection (Event Triggered)
Polling Event
REST API (Event Triggered)
Salesforce Platform Event
At a high level, running a real-time data sync operation performs these steps (Image 2):
The Listener is successfully subscribed and waiting for events from streaming source
The Listener receives a message from a streaming source and pushes it to SQL Server Broker.
The Worker picks up message from SQL Server Broker
The Worker fetches the matching record from the target based on the sync key
If there are changes detected, the worker pushes them to the target system. Logs successes and failures in the worker's log file.