Configuration and Synchronization
y2ysync synchronization heavily relies on the y2ysync and the Data Hub extensions. For that reason, it requires proper configuration, both on the Platform side and the Data Hub side.
Configuration
|
Item |
Description |
|---|---|
|
Y2YColumnDefinition |
The most basic configuration item. It represents a single attribute (a column) that you can synchronize. The product's code is an example of such an attribute. |
|
Y2YStreamConfiguration |
Represents a single type that you can synchronize. It contains multiple Y2YColumnDefinition items that define attributes you want to synchronize. The product, as defined in Platform (contains multiple attributes), is an example of such a type. |
|
Y2YStreamConfigurationContainer |
Represents a single unit of synchronization that contains multiple Y2YStreamConfiguration items. When you initiate synchronization, you search for changes in all the items that belong to the types specified in Y2YStreamConfigurationContainer. These changes are then saved as medias for export. |
-
The data model that you feed into Data Hub from Platform
-
Transformations the data model should undergo during the composition phase
-
The target systems to which you want to push the data.
For more information, see Generating and Uploading Data Hub Configuration XML.
Synchronization
-
The source system detects items that you created, changed, or deleted since the last synchronization. It creates files that contain information about the changes - medias. It finally sends a request to Data Hub to start executing its part of the synchronization process.
-
Data Hub acts as a middleman between the source and the target systems. Data Hub imports data from the source system, composes it and publishes to the target system. Depending on configuration, you can trigger these steps automatically or manually. For more information, see Target System Definition and Auto Passthrough.
-
The target system receives the new or updated data via impex
You can initiate synchronization programmatically using the startSync method from SyncExecutionService, or by clicking the Perform Y2YSyncJob Action button available in Backoffice. To initiate synchronization, an instance of Y2YSyncJobwith a unique code is required. It must be also assigned to a specific Y2YStreamConfigurationContainer. As a result of initiation, Y2YSyncCronJob is created. Each Y2YSyncCronJob represents a single execution of a synchronization action at a given time. It also holds SyncImpExMedia objects that contain the data that have changed since the last synchronization.
You can make Data Hub import the y2ysync media files again if the previous attempt failed. To do it, click the Resend to datahub action button available in Backoffice.
The relation between Y2YSyncJob and Y2YStreamConfigurationContainer is somehow similar to Factory and objects that it produces. The second execution of synchronization would create another Y2YSyncCronJob object. The result doesn't overwrite the previous Y2YSyncCronJob. Thanks to such a design approach, you can keep the history of synchronization attempts.
Data Hub Processing Details
-
the synchronization execution id
-
the source Platform url
-
links to all medias created in the change detection process
-
a pool and a feed
-
the auto-publish target systems.