How to support two-way Database Synchronization

Source: Internet
Author: User

The most typical application of Database Synchronization is Remote Disaster Tolerance and the query statistics of the primary database. This is generally a one-to-one application. However, the demand for multi-dimensional synchronization sometimes emerges, in general, this requirement is more practical and can be roughly divided into the following types:

1. N-> type 1: This requirement is mainly applied to the Division to upload production data to the headquarters, this allows the headquarters to perform centralized analysis and use in real time based on the production stock transfer situation and the completion of each division plan. Of course, the premise of synchronization is that the tables for business data synchronization of each division must be independent, or the primary keys of the data do not conflict, so that multiple groups of logs will not experience internal interference during execution. This method must be isolated from the application to ensure data independence.

2. 1-> N Type: this requirement is the inverse process of the first case. It is mainly applied to the applications where the headquarters publishes notifications to various segments. The purpose is to distribute important notifications and report data to segments when business data is not centralized. Of course, this requirement generally requires the synchronization software to configure which tables or fields of data need to be synchronized to which slave database, which requires the synchronization software to implement table filtering or field filtering.

3. N <-> N type: there are not many applications in this case, but it is characterized by complicated network structures and requires application cooperation. A simple example is a multinational joint production system. For example, country A is the headquarters, country B is the branch 1, Country C is the branch 2, and country D is the Branch 3. When a production plan is distributed from the headquarters to the BCD segment, each segment receives production data and develops its own production plan based on the master plan, after that, each branch can be produced for its own independent parts. At the same time, each branch will transfer the planned completion to the headquarters in real time, and then be differentiated by the headquarters, for example, to synchronize the production data generated by CD to B, to synchronize the production data generated by BC to D, and to synchronize the data generated by BD to C, This completes the distribution control of a production plan, at the same time, each branch can adjust its production tasks according to the execution of the production plan of the corresponding branch.

It can be said that the N <-> N mode is currently the most complex application, not only to maintain the consistency and non-conflict of Synchronized data from the application system, it is also necessary to ensure that data can be recorded at all breakpoints during multi-direction transmission, and there will be a series of requirements for filtering and Conversion Based on users, fields, and tables in the actual application process, it may even involve the conversion of character codes from different countries.

However, in any case, complex applications must also be based on the Database Synchronization Technology. Only the synchronization technology is used, and then the application system (mainly data primary key conflicts) is used ), and make full use of the relevant elements (date, table, OWNER, field) in the synchronization log for personalized configuration, in order to complete a multi-to-many synchronization application.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.