[design case sharing] data decoupling between systems based on Data Center



The company is mainly engaged in business scenario system based on flexible labor market. In order to grasp the market opportunity, enterprises usually take the business first, so they will first do the business system. With the increase of business system and transaction volume, the internal management system also increases.

System coupling

As follows, the above is the business system and the below is the support system. A common feature of these support systems is that they rely on business data, and transaction data is essential.

Obviously, each supporting system obtains data from each business system and integrates data. On the one hand, it may increase the pressure on each business system. On the other hand, each supporting system needs to develop repeated data integration work.

System deconstruction

So the data center was born.

The system structure is shown in the figure below. Through the data center, the support system is decoupled from the business system, which is also conducive to the horizontal expansion of the upper business system and the lower support system.

Taking transaction data as an example, the overall implementation scheme is as follows:

1. Create a unified transaction table in the MySQL database of the data center. The data transmission mode depends on the situation. Real time synchronization is not required for preferential travel transactions. After the transaction is completed, the message is produced through rabbitmq, and the data center consumer listens to the message for warehousing. Youfu data requires real-time synchronization. Considering that Youfu is Oracle, it can be realized through Alibaba heterogeneous database synchronization Yugong.

2. The data center provides a unified API for transaction data, which is provided to the support system through RPC call.