Sync Agent (API)

The Shop API

The Shop API is a JSON-based interface between Seller Center and the Shop system.

From the perspective of Seller Center, the Shop system is the master system that takes care of categories, brands, and attributes.

From the perspective of the Shop system, Seller Center is the master system that takes care of products, Sellers, and their related data (product images, Seller logos, promotions, etc.).

In order to connect Seller Center with the Shop system, API endpoints have to be implemented. They are defined here:

The Sync Agent

The Sync Agent is the module that provides the functionality in Seller Center to synchronize data from the Shop system.
The Sync Agent is also used to import the initial data when setting up Seller Center from the Shop System. Thus, the Sync Agent also contains other services (e.g., Seller migration).

DB to DB Synchronization

The first implementation of the Sync Agent is done by connecting and reading data from the Shop database and inserting or updating the records in the Seller Center database. The process is fast, but also creates a tight coupling to the Shop system. The reason of the coupling is because Seller Center needs to know the database schema of the Shop systems (which differ from Shop to Shop). Additionally, Seller Center servers need to have access to the Shop database.

SynchAgent

Synchronization by API

To get away from this tight coupling to the Shop systems database schema, Rocket Labs has started to implement the Sync Agent differently for Seller Center. The Sync Agent pulls the data from the Shop system by calling API methods of the Shop API.

SynchAgent - Kopie

Advantages

  • Decoupling the synchronization process between Seller Center and the Shop system
    • This allows Seller Center to make changes independent of the Shop business logic.
    • This allows the Shop System to make changes independent of the Seller Center logic.
  • Validates the synchronized data to avoid data inconsistency in the Seller Center database.

Disadvantages

The process takes longer and uses more memory to complete the synchronization (due to the validation process). See performance test results below.

How it Works

 In order to activate the API-based Sync Agent, please create a ticket TMLSD project in JIRA.

Please mention in the ticket that the following settings need to be configured:

  • agent/update_use_api  (in order to enable the path Sync Agent API)

If the setup of a web service connection from Seller Center to your Shop system is done for the first time, also specify in the ticket:

  • The Shop system’s API URL (including potential htaccess credentials)
  • The Shop system’s username
  • The Shop system’s password

Performance Check

Performance tests have shown only a small increase in time and memory usage when using the Sync Agent API changes and validations.

Low Data Test Results High Data Test Results

image (1)

image (4)

image (2)

image (5)
image (3) image (6)