WO2021037015A1 - Full data synchronization device suitable for a/b network double clusters - Google Patents

Full data synchronization device suitable for a/b network double clusters Download PDF

Info

Publication number
WO2021037015A1
WO2021037015A1 PCT/CN2020/111011 CN2020111011W WO2021037015A1 WO 2021037015 A1 WO2021037015 A1 WO 2021037015A1 CN 2020111011 W CN2020111011 W CN 2020111011W WO 2021037015 A1 WO2021037015 A1 WO 2021037015A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
distributed service
service cluster
cluster
synchronization device
Prior art date
Application number
PCT/CN2020/111011
Other languages
French (fr)
Chinese (zh)
Inventor
王民安
顾信安
黎邓根
Original Assignee
湖南中车时代通信信号有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 湖南中车时代通信信号有限公司 filed Critical 湖南中车时代通信信号有限公司
Publication of WO2021037015A1 publication Critical patent/WO2021037015A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Systems or methods specially adapted for specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/26Government or public services
    • G06Q50/40
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the invention relates to the technical field of clusters, and more specifically, to a full data synchronization device suitable for A/B network double clusters.
  • A/B network architecture requirements refer to the redundant deployment strategy of OCC (operating control center) dual hosts (active and standby).
  • OCC (single line) operation control center, is a management model with one line and one center.
  • the so-called dual-system redundancy strategy refers to the existence of application server A and application server B in the system, one of which is the host and the other is the standby.
  • the host synchronizes data to the standby in real time. When the host fails or is shut down, the standby The machine is automatically upgraded to the main machine. When the original main machine is repaired and restarted, it will be automatically upgraded to the standby machine.
  • This classic redundancy strategy can ensure that the ATS function will not cause the main function of the ATS to fail due to the downtime of one of the servers.
  • the data synchronization function as the bottom layer is more important, and the data synchronization between application server A and application server B must be real-time.
  • a cluster is a group of independent computers interconnected through a high-speed network. They form a group and are managed as a single system. When a client interacts with the cluster, the cluster is like an independent server. The cluster configuration is used to improve availability and scalability.
  • ZooKeeper is a software that provides consistent services for distributed applications.
  • the functions provided include configuration maintenance, domain name services, distributed synchronization, group services, etc.
  • the ZooKeeper cluster can be used in the ATS system to work as an application server. Due to ZooKeeper itself, the ZooKeeper cluster only supports single network (A network or B network) work. In order to meet the A/B network redundancy architectural requirements in the rail transit industry, two independent ZooKeeper clusters must be established, A network is one Clusters (or network B is a cluster), the clusters do not communicate with each other due to the isolation of the A/B network, and the cluster client reads/writes the data of the two clusters in real time. If due to network or other reasons, one cluster writes successfully and another cluster fails to write, then there will be inconsistencies in the data of the two clusters, which will affect the function of the entire system.
  • a network is one Clusters (or network B is a cluster)
  • the clusters do not communicate with each other due to the isolation of the A/B network
  • the cluster client reads/writes the data of the two clusters in real time. If due to network or other reasons, one cluster writes successfully and another cluster fails to write
  • ZooKeeper In the existing technical solutions, the underlying protocol of ZooKeeper can be modified to support the architectural requirements of the A/B network, and data consistency can be achieved within the protocol itself.
  • the open source feature of ZooKeeper will result in poor version maintenance and a relatively large amount of modification.
  • the purpose of the present invention is to provide a dual-cluster full data synchronization device, which solves the problem of data synchronization between two independent ZooKeeper clusters and improves the data reliability of the ZooKeeper cluster.
  • the present invention provides a full data synchronization device, one end is connected to a first distributed service cluster, and one end is connected to a second distributed service cluster:
  • the full data synchronization device reads the data in the first distributed service cluster and compares it with the corresponding data in the second distributed service cluster. If the data does not exist in the second distributed service cluster or is not the latest data , Then write the data to the second distributed service cluster;
  • the full data synchronization device reads the data in the second distributed service cluster and compares it with the corresponding data in the first distributed service cluster. If the data does not exist in the first distributed service cluster or is not the latest data , The data is written into the first distributed service cluster.
  • the data has the largest time stamp as the latest data.
  • the data is stored in units of distributed service nodes, and each distributed service node has a uniquely identifiable name.
  • the full data synchronization device periodically traverses reading data from the first distributed service cluster and the second distributed service cluster, and performs data comparison, and the read data is based on each distributed service cluster.
  • the storage is performed in units of service nodes.
  • the distributed service node includes: a node name, a data value, and a timestamp, where the timestamp is a timestamp corresponding to the data value of the node.
  • the full data synchronization device performs data comparison on the data of the same node name in the first distributed service cluster and the second distributed service cluster:
  • the timestamp of the first distributed service cluster is greater than the timestamp of the second distributed service cluster, the data value of the second distributed service cluster is overwritten with the data value of the first distributed service cluster;
  • the timestamp of the second distributed service cluster is greater than the timestamp of the first distributed service cluster, the data value of the first distributed service cluster is overwritten with the data value of the second distributed service cluster.
  • a prompt is output and the operation is waited for input instructions.
  • the data includes configuration files, memory data, and database data.
  • the first distributed service cluster and/or the second distributed service cluster are composed of a leader server and several follower servers, and the user communicates with the first distributed service through the distributed service client.
  • the cluster and/or the second distributed service cluster interact,
  • the follower server provides all read operations and returns the results to the distributed service client;
  • the leader server provides all write operations and replicates the written data to other follower servers in the cluster to update the state of the system.
  • the first distributed service cluster and/or the second distributed service cluster stores all data in memory and files.
  • the present invention solves the problem of data inconsistency between two independent ZooKeeper clusters and improves the data reliability of ZooKeeper clusters.
  • one of the clusters is inaccessible, the same data can be obtained through the other cluster, which satisfies the requirements of the traditional rail transit industry.
  • the reliability requirements for dual clusters under the A/B redundant network architecture.
  • Fig. 1 discloses a schematic diagram of the connection of a full data synchronization device according to an embodiment of the present invention
  • FIG. 2 shows a schematic diagram of the working process of a full data synchronization device according to an embodiment of the present invention.
  • the purpose of the present invention is to solve the problem of data inconsistency in two independent distributed service clusters in a dual-network environment by adopting a full data synchronization device, and to improve data reliability.
  • a distributed service cluster refers to a ZooKeeper cluster that uses ZooKeeper software.
  • the ZooKeeper cluster in the dual-network environment refers to the use of two independent ZooKeeper clusters to realize the ATS system functions in the A network and the B network.
  • the dual network environment is the redundant architecture of the A/B network.
  • Fig. 1 shows a schematic diagram of the connection of a full data synchronization device according to an embodiment of the present invention.
  • the ZooKeeper cluster that implements the ATS system function of the A network is ZK cluster 1
  • the ZooKeeper cluster that implements the ATS system function of the B network is ZK cluster 2.
  • the ZooKeeper cluster is composed of a leader server and several follower servers. After users establish a session with the ZooKeeper cluster through the ZooKeeper client, they can interact with the ZooKeeper cluster through the client.
  • the follower server provides all read operations and returns the results to the client;
  • the leader server provides all write operations and copies the written data to other follower servers in the ZooKeeper cluster to update the state of the system.
  • the leader server When a ZooKeeper client in the ZooKeeper cluster modifies data, the leader server will synchronize the modified data to all servers in the ZooKeeper cluster, so that all clients on the ZooKeeper cluster can see The revised data.
  • leader server cannot be accessed due to a failure
  • all remaining follower servers begin to elect the leader.
  • a server that was originally a follower is finally upgraded to a leader. Once the original leader server is restored, it can only act as a follower server and compete for the leader's position in the next election.
  • the ZooKeeper cluster can synchronize data between the internal leader server and follower server. However, for two independent ZooKeeper clusters, the ZooKeeper underlying protocol does not support data synchronization between two independent ZooKeeper clusters.
  • the technical scheme adopted by the present invention is to establish a full data synchronization device between two independent ZooKeeper clusters to solve the data inconsistency of the two independent clusters and improve the reliability of the data.
  • the full data synchronization device 3 is designed for data consistency between ZK cluster 1 and ZK cluster 2 in a dual-network environment.
  • One end of the full data synchronization device 3 is connected to ZK cluster 1, and the other end is connected to ZK cluster 2, to synchronize data between two ZooKeeper clusters in a dual-network environment.
  • the full data synchronization device 3 is a data comparison component, which implements the data synchronization function through the following steps:
  • the data in ZK cluster 1 includes configuration files, memory data, database data and other data, and compare it with the corresponding data in ZK cluster 2. If the data does not exist in ZK cluster 2 or is not the latest data , The data is written into ZK cluster 2, and the data corresponding to ZK cluster 2 is overwritten.
  • the data includes configuration files, memory data, database data and other data, and compare it with the corresponding data in ZK cluster 1. If the data does not exist in ZK cluster 1, it is not the latest data, Write data to ZK cluster 1, and the data corresponding to ZK cluster 1 is overwritten.
  • the data with the largest timestamp is the latest data, otherwise it will not be overwritten.
  • the full data synchronization device is implemented in the form of hardware or software programs.
  • Both ZK cluster 1 and ZK cluster 2 are ZooKeeper clusters.
  • the ZooKeeper cluster is a distributed small file system, and a single point of failure can be avoided through election algorithms and cluster replication.
  • the data of the distributed service cluster is stored in units of each distributed service node.
  • the distributed service node includes: a node name, a data value, and a timestamp, where the timestamp is the timestamp corresponding to the data value of the node.
  • the distributed service node refers to a ZooKeeper node.
  • the ZooKeeper cluster provides users with data storage services.
  • the data storage is based on ZooKeeper nodes (znodes, data nodes). Each node has a name and can store data. These nodes form a file system-like namespace according to a hierarchical structure. .
  • the full data synchronization device 3 reads data from ZK cluster 1 and ZK cluster 2, and the data is compared with each ZooKeeper node as a unit.
  • the data structure adopts the form of Key+Value.
  • the full data synchronization device 3 periodically reads the data of all ZooKeeper nodes in the ZK cluster 1 and ZK cluster 2 in the dual-network environment, and compares the data value of each node.
  • Figure 2 discloses a schematic diagram of the working process of a full data synchronization device according to an embodiment of the present invention. The following takes the data of the same node of the two clusters ZK cluster 1 and ZK cluster 2 as an example. With reference to Figure 2, the full data synchronization device is further explained 3 data synchronization work process.
  • the key must be the same, which is guaranteed by the application layer.
  • Value1! Value2, that is, Value1 and Value2 are different, and the latest data of the time stamp needs to be rewritten;
  • the Value1 data of ZK cluster 1 is the latest reliable data
  • the full data synchronization device starts the write function, and rewrites the data value of ZK cluster 2, and Value2 is overwritten with the value of Value1;
  • the Value2 data of ZK cluster 2 is the latest reliable data, and the full data synchronization device starts the write function, rewrites the data value of ZK cluster 1, and Value1 is overwritten with the value of Value2.
  • the instruction input operation is a manual intervention operation.
  • the present invention solves the problem of data inconsistency between two independent ZooKeeper clusters and improves the data reliability of ZooKeeper clusters.
  • one of the clusters is inaccessible, the same data can be obtained through the other cluster, which satisfies the requirements of the traditional rail transit industry.
  • Reliability requirements for dual clusters under A/B network redundancy architecture are described in detail below.
  • DSP digital signal processors
  • ASIC application-specific integrated circuits
  • FPGA field programmable gate arrays
  • a programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described herein are implemented or executed.
  • a general-purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine.
  • the processor may also be implemented as a combination of computing devices, such as a combination of a DSP and a microprocessor, multiple microprocessors, one or more microprocessors cooperating with a DSP core, or any other such configuration.

Abstract

Provided is a full data synchronization device suitable for A/B network double clusters. According to the full data synchronization device, one end is connected with a first distributed service cluster, and the other end is connected with a second distributed service cluster; the data in the first distributed service cluster is read, and is compared with the corresponding data in the second distributed service cluster, and if the data does not exist in the second distributed service cluster or is not the latest data, the data is written into the second distributed service cluster; the data in the second distributed service cluster is read, and is compared with the corresponding data in the first distributed service cluster, and if the data does not exist in the first distributed service cluster or is not the latest data, the data is written into the first distributed service cluster. The present invention solves the problem of data inconsistency between two independent distributed service clusters, and meets the reliability requirement of the traditional rail transit industry for double clusters under the A/B network redundancy architecture.

Description

一种适用于A/B网双集群的全量数据同步装置A full data synchronization device suitable for A/B network double clusters
本申请要求于2019年08月26日提交中国专利局、申请号为201910790758.2、发明名称为“一种适用于A/B网双集群的全量数据同步装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on August 26, 2019, the application number is 201910790758.2. The invention title is "A full data synchronization device suitable for A/B network dual clusters", all of which The content is incorporated in this application by reference.
技术领域Technical field
本发明涉及集群技术领域,更具体的说,涉及一种适用于A/B网双集群的全量数据同步装置。The invention relates to the technical field of clusters, and more specifically, to a full data synchronization device suitable for A/B network double clusters.
背景技术Background technique
目前轨道交通运行过程中,对列车的监视和控制至关重要,所以在轨道交通信号系统的开发过程中进行了诸多可靠性设计。在城市轨道交通信号系统中,ATS系统(Automatic Train Supervision,列车自动监控系统)作为信号的监督和控制端,是调度员最为直接和方便的操作工具,其重要性不言而喻。At present, during the operation of rail transit, the monitoring and control of trains are very important. Therefore, many reliability designs have been carried out during the development of rail transit signal systems. In the urban rail transit signal system, the ATS system (Automatic Train Supervision), as the signal supervision and control end, is the most direct and convenient operation tool for dispatchers, and its importance is self-evident.
目前国内绝大部分ATS系统采用了A/B网的架构要求。所谓A/B网的架构要求是指OCC(operating control center,运行控制中心)双主机(主备)的冗余部署策略。OCC,(单条线路)运行控制中心,是一线一中心的管理模式。所谓双机冗余策略,是指系统中存在有应用服务器A和应用服务器B,其中一个为主机一个为备机,由主机实时同步数据给备机,当主机故障或者被关闭的情况下,备机自动升级为主机,当原主机修复并重新启动后将自动升级为备用机,这套经典的冗余策略能保证ATS功能不会因为其中某一台服务器宕机而使主要功能失效。At present, most ATS systems in China have adopted the architectural requirements of A/B network. The so-called A/B network architecture requirements refer to the redundant deployment strategy of OCC (operating control center) dual hosts (active and standby). OCC, (single line) operation control center, is a management model with one line and one center. The so-called dual-system redundancy strategy refers to the existence of application server A and application server B in the system, one of which is the host and the other is the standby. The host synchronizes data to the standby in real time. When the host fails or is shut down, the standby The machine is automatically upgraded to the main machine. When the original main machine is repaired and restarted, it will be automatically upgraded to the standby machine. This classic redundancy strategy can ensure that the ATS function will not cause the main function of the ATS to fail due to the downtime of one of the servers.
上述方案中,作为底层的数据同步功能显得更为重要,应用服务器A和应用服务器B之间的数据同步必须做到实时性。In the above scheme, the data synchronization function as the bottom layer is more important, and the data synchronization between application server A and application server B must be real-time.
集群是一组相互独立的、通过高速网络互联的计算机,它们构成了一个组,并以单一系统的模式加以管理。一个客户与集群相互作用时,集群像是一个独立的服务器。集群配置是用于提高可用性和可缩放性。A cluster is a group of independent computers interconnected through a high-speed network. They form a group and are managed as a single system. When a client interacts with the cluster, the cluster is like an independent server. The cluster configuration is used to improve availability and scalability.
ZooKeeper是一个为分布式应用提供一致性服务的软件,提供的功能包 括:配置维护、域名服务、分布式同步、组服务等。ZooKeeper is a software that provides consistent services for distributed applications. The functions provided include configuration maintenance, domain name services, distributed synchronization, group services, etc.
ZooKeeper集群可以应用于ATS系统中,作为应用服务器工作。由于ZooKeeper本身原因,ZooKeeper集群仅支持单网(A网或B网)工作,为了满足在轨道交通行业对A/B网冗余的架构要求,必须建立两个独立的ZooKeeper集群,A网为一个集群(或者B网为一个集群),集群之间由于A/B网隔离互不通信,集群客户端实时读/写两个集群的数据。若由于网络或者其它原因导致一个集群写入成功另一个集群写入失败,那么就会出现两个集群数据的不一致性,进而影响整个系统的功能。The ZooKeeper cluster can be used in the ATS system to work as an application server. Due to ZooKeeper itself, the ZooKeeper cluster only supports single network (A network or B network) work. In order to meet the A/B network redundancy architectural requirements in the rail transit industry, two independent ZooKeeper clusters must be established, A network is one Clusters (or network B is a cluster), the clusters do not communicate with each other due to the isolation of the A/B network, and the cluster client reads/writes the data of the two clusters in real time. If due to network or other reasons, one cluster writes successfully and another cluster fails to write, then there will be inconsistencies in the data of the two clusters, which will affect the function of the entire system.
为了满足传统A/B网的冗余架构,必须在两个独立ZooKeeper集群进行数据同步。In order to meet the redundant architecture of the traditional A/B network, data must be synchronized in two independent ZooKeeper clusters.
现有的技术方案中,可以通过改造ZooKeeper底层协议支持A/B网的架构要求,通过协议自身内部实现数据的一致性,但ZooKeeper开源特性将导致版本的维护性差,且改造量也比较大。In the existing technical solutions, the underlying protocol of ZooKeeper can be modified to support the architectural requirements of the A/B network, and data consistency can be achieved within the protocol itself. However, the open source feature of ZooKeeper will result in poor version maintenance and a relatively large amount of modification.
因此,目前并没有一种装置能解决两个独立ZooKeeper集群之间的数据同步问题。Therefore, there is currently no device that can solve the data synchronization problem between two independent ZooKeeper clusters.
发明内容Summary of the invention
本发明的目的在于提供一种双集群全量数据同步装置,解决两个独立ZooKeeper集群之间的数据同步问题,提高ZooKeeper集群的数据可靠性。The purpose of the present invention is to provide a dual-cluster full data synchronization device, which solves the problem of data synchronization between two independent ZooKeeper clusters and improves the data reliability of the ZooKeeper cluster.
为了实现上述目的,本发明提供了一种全量数据同步装置,一端连接第一分布式服务集群,一端连接第二分布式服务集群:In order to achieve the above objective, the present invention provides a full data synchronization device, one end is connected to a first distributed service cluster, and one end is connected to a second distributed service cluster:
所述全量数据同步装置读取第一分布式服务集群中的数据,与第二分布式服务集群中对应的数据进行比对,若该数据在第二分布式服务集群中不存在或不是最新数据,则将该数据写入第二分布式服务集群;The full data synchronization device reads the data in the first distributed service cluster and compares it with the corresponding data in the second distributed service cluster. If the data does not exist in the second distributed service cluster or is not the latest data , Then write the data to the second distributed service cluster;
所述全量数据同步装置读取第二分布式服务集群中的数据,与第一分布式服务集群中对应的数据进行比对,若该数据在第一分布式服务集群中不存在或不是最新数据,则将该数据写入第一分布式服务集群。The full data synchronization device reads the data in the second distributed service cluster and compares it with the corresponding data in the first distributed service cluster. If the data does not exist in the first distributed service cluster or is not the latest data , The data is written into the first distributed service cluster.
在一实施例中,所述数据以时间戳最大为最新数据。In an embodiment, the data has the largest time stamp as the latest data.
在一实施例中,所述第一分布式服务集群和/或第二分布式服务集群,数据存储以分布式服务节点为单位,每个分布式服务节点具有唯一可识别的名称。In an embodiment, for the first distributed service cluster and/or the second distributed service cluster, the data is stored in units of distributed service nodes, and each distributed service node has a uniquely identifiable name.
在一实施例中,所述全量数据同步装置周期遍历的从第一分布式服务集群和第二分布式服务集群中读取数据,并进行数据比对,所读取的数据以每个分布式服务节点为单位进行存储。In one embodiment, the full data synchronization device periodically traverses reading data from the first distributed service cluster and the second distributed service cluster, and performs data comparison, and the read data is based on each distributed service cluster. The storage is performed in units of service nodes.
在一实施例中,所述分布式服务节点包括:节点名称,数据值和时间戳,其中时间戳为该节点的数据值对应的时间戳。In an embodiment, the distributed service node includes: a node name, a data value, and a timestamp, where the timestamp is a timestamp corresponding to the data value of the node.
在一实施例中,所述全量数据同步装置,对第一分布式服务集群和第二分布式服务集群中相同节点名称的数据进行数据比对:In an embodiment, the full data synchronization device performs data comparison on the data of the same node name in the first distributed service cluster and the second distributed service cluster:
判断该节点对应的第一分布式服务集群和第二分布式服务集群的数据值是否相同;Determine whether the data values of the first distributed service cluster and the second distributed service cluster corresponding to the node are the same;
如果相同则不做任何处理,如果不同,则进一步比对时间戳;If they are the same, do nothing, if they are different, then further compare the timestamps;
判断该节点对应的第一分布式服务集群和第二分布式服务集群的时间戳的大小;Determine the size of the timestamp of the first distributed service cluster and the second distributed service cluster corresponding to the node;
如果第一分布式服务集群的时间戳大于第二分布式服务集群的时间戳,则第二分布式服务集群的数据值被覆盖为第一分布式服务集群的数据值;If the timestamp of the first distributed service cluster is greater than the timestamp of the second distributed service cluster, the data value of the second distributed service cluster is overwritten with the data value of the first distributed service cluster;
如果第二分布式服务集群的时间戳大于第一分布式服务集群的时间戳,则第一分布式服务集群的数据值被覆盖为第二分布式服务集群的数据值。If the timestamp of the second distributed service cluster is greater than the timestamp of the first distributed service cluster, the data value of the first distributed service cluster is overwritten with the data value of the second distributed service cluster.
在一实施例中,在比对时间戳步骤中,如果第一分布式服务集群的时间戳等于第二分布式服务集群的时间戳,则输出提示,等待输入指令进行操作。In an embodiment, in the step of comparing the timestamps, if the timestamp of the first distributed service cluster is equal to the timestamp of the second distributed service cluster, a prompt is output and the operation is waited for input instructions.
在一实施例中,所述数据包括配置文件、内存数据、数据库数据。In an embodiment, the data includes configuration files, memory data, and database data.
在一实施例中,所述第一分布式服务集群和/或第二分布式服务集群由一台领导者服务器和若干台跟随者服务器组成,用户通过分布式服务客户端与第一分布式服务集群和/或第二分布式服务集群进行交互,In an embodiment, the first distributed service cluster and/or the second distributed service cluster are composed of a leader server and several follower servers, and the user communicates with the first distributed service through the distributed service client. The cluster and/or the second distributed service cluster interact,
所述跟随者服务器,提供所有的读操作,并且将结果返回分布式服务客户端;The follower server provides all read operations and returns the results to the distributed service client;
所述领导者服务器,提供所有的写操作,并且将写入的数据复制到集群中其他的跟随者服务器中,更新系统的状态。The leader server provides all write operations and replicates the written data to other follower servers in the cluster to update the state of the system.
在一实施例中,所述第一分布式服务集群和/或第二分布式服务集群将全量数据存储在内存和文件中。In an embodiment, the first distributed service cluster and/or the second distributed service cluster stores all data in memory and files.
本发明解决了两个独立ZooKeeper集群之间的数据不一致问题,提高了ZooKeeper集群的数据可靠性,当其中一个集群不可访问时,可通过另一个集群获取相同的数据,同时满足了传统轨道交通行业对A/B冗余网架构下对双集群的可靠性要求。The present invention solves the problem of data inconsistency between two independent ZooKeeper clusters and improves the data reliability of ZooKeeper clusters. When one of the clusters is inaccessible, the same data can be obtained through the other cluster, which satisfies the requirements of the traditional rail transit industry. The reliability requirements for dual clusters under the A/B redundant network architecture.
附图说明Description of the drawings
本发明上述的以及其他的特征、性质和优势将通过下面结合附图和实施例的描述而变的更加明显,在附图中相同的附图标记始终表示相同的特征,其中:The above and other features, properties and advantages of the present invention will become more apparent through the following description in conjunction with the drawings and embodiments. In the drawings, the same reference numerals always indicate the same features, among which:
图1揭示了根据本发明一实施例的全量数据同步装置连接示意图;Fig. 1 discloses a schematic diagram of the connection of a full data synchronization device according to an embodiment of the present invention;
图2揭示了根据本发明一实施例的全量数据同步装置工作流程示意图。FIG. 2 shows a schematic diagram of the working process of a full data synchronization device according to an embodiment of the present invention.
具体实施方式detailed description
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释发明,并不用于限定发明。In order to make the objectives, technical solutions, and advantages of the present invention clearer, the following further describes the present invention in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the invention and not to limit the invention.
本发明的目的在于通过采用一种全量数据同步装置解决双网环境下两个独立的分布式服务集群数据不一致性的问题,提高数据的可靠性。The purpose of the present invention is to solve the problem of data inconsistency in two independent distributed service clusters in a dual-network environment by adopting a full data synchronization device, and to improve data reliability.
分布式服务集群是指使用ZooKeeper软件的ZooKeeper集群。双网环境下的ZooKeeper集群是指采用两个独立的ZooKeeper集群来实现A网和B网中的ATS系统功能。双网环境即为A/B网的冗余架构。A distributed service cluster refers to a ZooKeeper cluster that uses ZooKeeper software. The ZooKeeper cluster in the dual-network environment refers to the use of two independent ZooKeeper clusters to realize the ATS system functions in the A network and the B network. The dual network environment is the redundant architecture of the A/B network.
图1揭示了根据本发明一实施例的全量数据同步装置连接示意图。在图1所示的实施例中,实现A网的ATS系统功能的ZooKeeper集群为ZK集群1,实现B网的ATS系统功能的ZooKeeper集群为ZK集群2。Fig. 1 shows a schematic diagram of the connection of a full data synchronization device according to an embodiment of the present invention. In the embodiment shown in FIG. 1, the ZooKeeper cluster that implements the ATS system function of the A network is ZK cluster 1, and the ZooKeeper cluster that implements the ATS system function of the B network is ZK cluster 2.
在图1所示的实施例中,ZooKeeper集群是由一台领导者服务器和若干台跟随者服务器构成。用户通过ZooKeeper客户端与ZooKeeper集群建立会话之后,就可以通过客户端与ZooKeeper集群进行交互。In the embodiment shown in Figure 1, the ZooKeeper cluster is composed of a leader server and several follower servers. After users establish a session with the ZooKeeper cluster through the ZooKeeper client, they can interact with the ZooKeeper cluster through the client.
所述跟随者服务器,提供所有的读操作,并且将结果返回客户端;The follower server provides all read operations and returns the results to the client;
所述领导者服务器,提供所有的写操作,并且将写入的数据复制到ZooKeeper集群中其他的跟随者服务器中,更新系统的状态。The leader server provides all write operations and copies the written data to other follower servers in the ZooKeeper cluster to update the state of the system.
当ZooKeeper集群中的某个ZooKeeper客户端对数据进行修改时,领导者服务器会将修改后的数据同步到ZooKeeper集群中所有的服务器上,这样就能够让ZooKeeper集群上的所有客户端都能够看到修改后的数据。When a ZooKeeper client in the ZooKeeper cluster modifies data, the leader server will synchronize the modified data to all servers in the ZooKeeper cluster, so that all clients on the ZooKeeper cluster can see The revised data.
当领导者服务器由于故障无法访问时,剩下的所有跟随者服务器就开始进行领导者的选举。通过选举算法,最终由一台原本是跟随者的服务器升级为领导者。当原来的领导者服务器一旦被恢复,它就只能作为跟随者服务器,并在下一次选举中争夺领导者的位置。When the leader server cannot be accessed due to a failure, all remaining follower servers begin to elect the leader. Through the election algorithm, a server that was originally a follower is finally upgraded to a leader. Once the original leader server is restored, it can only act as a follower server and compete for the leader's position in the next election.
ZooKeeper集群在内部领导者服务器和跟随者服务器之间能做到数据同步,然而,对于两个独立的ZooKeeper集群,ZooKeeper底层协议并不支持两个独立的ZooKeeper集群之间进行数据同步。The ZooKeeper cluster can synchronize data between the internal leader server and follower server. However, for two independent ZooKeeper clusters, the ZooKeeper underlying protocol does not support data synchronization between two independent ZooKeeper clusters.
本发明采用的技术方案是,在两个独立的ZooKeeper集群之间建立全量数据同步装置,解决两个独立集群数据不一致性,提高数据的可靠性。The technical scheme adopted by the present invention is to establish a full data synchronization device between two independent ZooKeeper clusters to solve the data inconsistency of the two independent clusters and improve the reliability of the data.
在图1所示的实施例中,全量数据同步装置3为双网环境下的ZK集群1和ZK集群2的数据一致性而设计。全量数据同步装置3一端连接ZK集群1,另一端连接ZK集群2,对双网环境下的两个ZooKeeper集群进行数据同步。In the embodiment shown in FIG. 1, the full data synchronization device 3 is designed for data consistency between ZK cluster 1 and ZK cluster 2 in a dual-network environment. One end of the full data synchronization device 3 is connected to ZK cluster 1, and the other end is connected to ZK cluster 2, to synchronize data between two ZooKeeper clusters in a dual-network environment.
在图1所示的实施例中,全量数据同步装置3是一个数据比对组件,通过以下步骤实现数据同步功能:In the embodiment shown in FIG. 1, the full data synchronization device 3 is a data comparison component, which implements the data synchronization function through the following steps:
读取ZK集群1中的数据,所述数据包括配置文件、内存数据、数据库数据等数据,与ZK集群2中对应的数据进行比对,若该数据在ZK集 群2中不存在或不是最新数据,将数据写入ZK集群2,ZK集群2对应的数据被覆盖。Read the data in ZK cluster 1, the data includes configuration files, memory data, database data and other data, and compare it with the corresponding data in ZK cluster 2. If the data does not exist in ZK cluster 2 or is not the latest data , The data is written into ZK cluster 2, and the data corresponding to ZK cluster 2 is overwritten.
读取ZK集群2中的数据,所述数据包括配置文件、内存数据、数据库数据等数据,与ZK集群1中对应的数据进行比对,若该数据在ZK集群1中不存在不是最新数据,将数据写入ZK集群1,ZK集群1对应的数据被覆盖。Read the data in ZK cluster 2. The data includes configuration files, memory data, database data and other data, and compare it with the corresponding data in ZK cluster 1. If the data does not exist in ZK cluster 1, it is not the latest data, Write data to ZK cluster 1, and the data corresponding to ZK cluster 1 is overwritten.
所述数据以时间戳最大为最新数据,否则不予覆盖。The data with the largest timestamp is the latest data, otherwise it will not be overwritten.
可选的,该全量数据同步装置以硬件或软件程序的方式实现。Optionally, the full data synchronization device is implemented in the form of hardware or software programs.
ZK集群1和ZK集群2均为ZooKeeper集群。所述ZooKeeper集群是一个分布式小文件系统,通过选举算法和集群复制可以避免单点故障。Both ZK cluster 1 and ZK cluster 2 are ZooKeeper clusters. The ZooKeeper cluster is a distributed small file system, and a single point of failure can be avoided through election algorithms and cluster replication.
分布式服务集群的数据以每个分布式服务节点为单位进行存储。分布式服务节点包括:节点名称、数据值和时间戳,其中时间戳为该节点的数据值对应的时间戳。图1所示的实施例中,分布式服务节点是指ZooKeeper节点。The data of the distributed service cluster is stored in units of each distributed service node. The distributed service node includes: a node name, a data value, and a timestamp, where the timestamp is the timestamp corresponding to the data value of the node. In the embodiment shown in FIG. 1, the distributed service node refers to a ZooKeeper node.
ZooKeeper集群,向用户提供数据存储服务,数据存储是以ZooKeeper节点(znodes,数据节点)为单位的,每个节点都有名称而且可以存放数据,这些节点按照层次结构组成类似于文件系统的名称空间。The ZooKeeper cluster provides users with data storage services. The data storage is based on ZooKeeper nodes (znodes, data nodes). Each node has a name and can store data. These nodes form a file system-like namespace according to a hierarchical structure. .
其数据模型类似于一个文件系统,而znodes之前的层级关系就像文件系统的目录结构一样,不过ZooKeeper集群将全量数据存储在内存和文件中,并且通过自动设定响应节点,以此来降低选举耗时,提高服务器吞吐量,减少延迟。Its data model is similar to a file system, and the hierarchical relationship before znodes is like the directory structure of a file system, but the ZooKeeper cluster stores all data in memory and files, and automatically sets response nodes to reduce elections Time-consuming, improve server throughput and reduce latency.
由于是文件系统,所以即使所有的ZooKeeper节点全部挂掉,数据也不会丢失,重启服务器之后,数据即可恢复。Because it is a file system, even if all ZooKeeper nodes are down, the data will not be lost. After restarting the server, the data can be restored.
在图1所示的实施例中,全量数据同步装置3从ZK集群1和ZK集群2中读取的数据,数据以每个ZooKeeper节点为单位,进行数据比对。数据结构采用Key+Value的形式。In the embodiment shown in FIG. 1, the full data synchronization device 3 reads data from ZK cluster 1 and ZK cluster 2, and the data is compared with each ZooKeeper node as a unit. The data structure adopts the form of Key+Value.
全量数据同步装置3周期遍历的读取双网环境下的ZK集群1和ZK集群2中所有ZooKeeper节点的数据,并对每个节点的数据值进行比较。The full data synchronization device 3 periodically reads the data of all ZooKeeper nodes in the ZK cluster 1 and ZK cluster 2 in the dual-network environment, and compares the data value of each node.
ZooKeeper节点的数据结构为Key=(Value,time),Key为该节点的名称,每个节点的Key值不同,Value为该节点的数据值,包括配置文件、内存数据、数据库数据等数据,time为该节点的Value数据值对应的时间戳。The data structure of the ZooKeeper node is Key=(Value, time), Key is the name of the node, the Key value of each node is different, Value is the data value of the node, including configuration files, memory data, database data and other data, time It is the timestamp corresponding to the Value data value of this node.
图2揭示了根据本发明一实施例的全量数据同步装置工作流程示意图,下面以ZK集群1和ZK集群2两个集群的同一节点的数据值为例,结合图2,进一步说明全量数据同步装置3的数据同步工作过程。Figure 2 discloses a schematic diagram of the working process of a full data synchronization device according to an embodiment of the present invention. The following takes the data of the same node of the two clusters ZK cluster 1 and ZK cluster 2 as an example. With reference to Figure 2, the full data synchronization device is further explained 3 data synchronization work process.
ZK集群1和ZK集群2都分别存储节点Key=(Value1,time1),Key=(Value2,time2)数据,其中,Key为该节点的名称,Value1为ZK集群1该节点的数据值,time1为ZK集群1该节点的时间戳,Value2为ZK集群2该节点的数据值,time2为ZK集群2该节点的时间戳。Key必须是相同的,由应用层保证。Both ZK cluster 1 and ZK cluster 2 store node Key = (Value1, time1), Key = (Value2, time2) data respectively, where Key is the name of the node, Value1 is the data value of the node in ZK cluster 1, and time1 is The timestamp of this node in ZK cluster 1, Value2 is the data value of this node in ZK cluster 2, and time2 is the timestamp of this node in ZK cluster 2. The key must be the same, which is guaranteed by the application layer.
首先,判断Value1和Value2的数值。First, determine the values of Value1 and Value2.
若Value1=Value2,即Value1、Value2值相同,则全量数据同步装置不做任何处理;If Value1=Value2, that is, Value1 and Value2 are the same, the full data synchronization device will not do any processing;
若Value1!=Value2,即Value1、Value2值不相同,需要重新写入时间戳最新的数据;If Value1! = Value2, that is, Value1 and Value2 are different, and the latest data of the time stamp needs to be rewritten;
进一步,判断time1和time2的数值。Further, determine the values of time1 and time2.
若time1>time2,则ZK集群1的Value1数据为最新的可靠数据,全量数据同步装置启动写功能,重新写入ZK集群2的数据值,Value2被覆盖为Value1的值;If time1>time2, the Value1 data of ZK cluster 1 is the latest reliable data, the full data synchronization device starts the write function, and rewrites the data value of ZK cluster 2, and Value2 is overwritten with the value of Value1;
若time1<time2,则ZK集群2的Value2数据为最新的可靠数据,全量数据同步装置启动写功能,重新写入ZK集群1的数据值,Value1被覆盖为Value2的值。If time1<time2, the Value2 data of ZK cluster 2 is the latest reliable data, and the full data synchronization device starts the write function, rewrites the data value of ZK cluster 1, and Value1 is overwritten with the value of Value2.
若time1=time2,则输出提示,等待输入指令进行操作。可选的,输入指令操作为人工介入操作。If time1=time2, output a prompt and wait for the input command to operate. Optionally, the instruction input operation is a manual intervention operation.
由于time是以毫秒为单位,且两个集群共享同一个时钟源,所以Value不同但time相同发生的概率是几乎不可能,若确实发生,可以选择,输出提示人工进行处理。Since time is in milliseconds and the two clusters share the same clock source, it is almost impossible that the value is different but the time is the same. If it does happen, you can choose to output a prompt for manual processing.
本发明解决了两个独立ZooKeeper集群之间的数据不一致问题,提高了ZooKeeper集群的数据可靠性,当其中一个集群不可访问时,可通过另一个集群获取相同的数据,同时满足了传统轨道交通行业对A/B网冗余架构下对双集群的可靠性要求。The present invention solves the problem of data inconsistency between two independent ZooKeeper clusters and improves the data reliability of ZooKeeper clusters. When one of the clusters is inaccessible, the same data can be obtained through the other cluster, which satisfies the requirements of the traditional rail transit industry. Reliability requirements for dual clusters under A/B network redundancy architecture.
尽管为使解释简单化将上述方法图示并描述为一系列动作,但是应理解并领会,这些方法不受动作的次序所限,因为根据一个或多个实施例,一些动作可按不同次序发生和/或与来自本文中图示和描述或本文中未图示和描述但本领域技术人员可以理解的其他动作并发地发生。Although the above methods are illustrated and described as a series of actions to simplify the explanation, it should be understood and appreciated that these methods are not limited by the order of the actions, because according to one or more embodiments, some actions may occur in a different order And/or occur concurrently with other actions from what is illustrated and described herein or that are not illustrated and described herein but can be understood by those skilled in the art.
本领域技术人员将进一步领会,结合本文中所公开的实施例来描述的各种解说性逻辑板块、模块、电路、和算法步骤可实现为电子硬件、计算机软件、或这两者的组合。为清楚地解说硬件与软件的这一可互换性,各种解说性组件、框、模块、电路、和步骤在上面是以其功能性的形式作一般化描述的。此类功能性是被实现为硬件还是软件取决于具体应用和施加于整体系统的设计约束。技术人员对于每种特定应用可用不同的方式来实现所描述的功能性,但这样的实现决策不应被解读成导致脱离了本发明的范围。Those skilled in the art will further appreciate that the various illustrative logic blocks, modules, circuits, and algorithm steps described in conjunction with the embodiments disclosed herein can be implemented as electronic hardware, computer software, or a combination of the two. In order to clearly explain the interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps are generally described above in terms of their functionality. Whether such functionality is implemented as hardware or software depends on the specific application and the design constraints imposed on the overall system. Technicians can implement the described functionality in different ways for each specific application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
结合本文所公开的实施例描述的各种解说性逻辑板块、模块、和电路可用通用处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现场可编程门阵列(FPGA)或其它可编程逻辑器件、分立的门或晶体管逻辑、分立的硬件组件、或其设计成执行本文所描述功能的任何组合来实现或执行。通用处理器可以是微处理器,但在替换方案中,该处理器可以是任何常规的处理器、控制器、微控制器、或状态机。处理器还可以被实现为计算设备的组合,例如DSP与微处理器的组合、多个微处理器、与DSP核心协作的一个或多个微处理器、或任何其他此类配置。Various illustrative logic blocks, modules, and circuits described in conjunction with the embodiments disclosed herein can be used with general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA), or other A programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described herein are implemented or executed. A general-purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. The processor may also be implemented as a combination of computing devices, such as a combination of a DSP and a microprocessor, multiple microprocessors, one or more microprocessors cooperating with a DSP core, or any other such configuration.
如本申请和权利要求书中所示,除非上下文明确提示例外情形,“一”、“一个”、“一种”和/或“该”等词并非特指单数,也可包括复数。一般说来,术语“包括”与“包含”仅提示包括已明确标识的步骤和元素,而 这些步骤和元素不构成一个排它性的罗列,方法或者设备也可能包含其他的步骤或元素。As shown in the present application and claims, unless the context clearly suggests exceptional circumstances, the words "a", "an", "an" and/or "the" do not specifically refer to the singular, but may also include the plural. Generally speaking, the terms "including" and "including" only suggest that the clearly identified steps and elements are included, and these steps and elements do not constitute an exclusive list, and the method or device may also include other steps or elements.
上述实施例是提供给熟悉本领域内的人员来实现或使用本发明的,熟悉本领域的人员可在不脱离本发明的发明思想的情况下,对上述实施例做出种种修改或变化,因而本发明的保护范围并不被上述实施例所限,而应该是符合权利要求书提到的创新性特征的最大范围。The above-mentioned embodiments are provided for those skilled in the art to implement or use the present invention. Those skilled in the art can make various modifications or changes to the above-mentioned embodiments without departing from the inventive idea of the present invention. The protection scope of the present invention is not limited by the above-mentioned embodiments, but should be the maximum scope that meets the innovative features mentioned in the claims.

Claims (10)

  1. 一种全量数据同步装置,其特征在于,一端连接第一分布式服务集群,一端连接第二分布式服务集群:A full data synchronization device, characterized in that one end is connected to a first distributed service cluster, and one end is connected to a second distributed service cluster:
    所述全量数据同步装置读取第一分布式服务集群中的数据,与第二分布式服务集群中对应的数据进行比对,若该数据在第二分布式服务集群中不存在或不是最新数据,则将该数据写入第二分布式服务集群;The full data synchronization device reads the data in the first distributed service cluster and compares it with the corresponding data in the second distributed service cluster. If the data does not exist in the second distributed service cluster or is not the latest data , Then write the data to the second distributed service cluster;
    所述全量数据同步装置读取第二分布式服务集群中的数据,与第一分布式服务集群中对应的数据进行比对,若该数据在第一分布式服务集群中不存在或不是最新数据,则将该数据写入第一分布式服务集群。The full data synchronization device reads the data in the second distributed service cluster and compares it with the corresponding data in the first distributed service cluster. If the data does not exist in the first distributed service cluster or is not the latest data , The data is written into the first distributed service cluster.
  2. 根据权利要求1所述的全量数据同步装置,其特征在于,所述数据以时间戳最大为最新数据。The device for synchronizing full data according to claim 1, wherein the data has a maximum time stamp as the latest data.
  3. 根据权利要求1所述的全量数据同步装置,其特征在于,所述第一分布式服务集群和/或第二分布式服务集群,数据存储以分布式服务节点为单位,每个分布式服务节点具有唯一可识别的名称。The full data synchronization device according to claim 1, wherein the first distributed service cluster and/or the second distributed service cluster are stored in units of distributed service nodes, and each distributed service node Have a uniquely identifiable name.
  4. 根据权利要求1所述的全量数据同步装置,其特征在于,所述全量数据同步装置周期遍历的从第一分布式服务集群和第二分布式服务集群中读取数据,并进行数据比对,所读取的数据以每个分布式服务节点为单位进行存储。The full data synchronization device according to claim 1, wherein the full data synchronization device periodically traverses reading data from the first distributed service cluster and the second distributed service cluster, and performs data comparison, The read data is stored in units of each distributed service node.
  5. 根据权利要求4所述的全量数据同步装置,其特征在于,所述分布式服务节点包括:节点名称,数据值和时间戳,其中时间戳为该节点的数据值对应的时间戳。The full data synchronization device according to claim 4, wherein the distributed service node comprises: a node name, a data value and a time stamp, wherein the time stamp is a time stamp corresponding to the data value of the node.
  6. 根据权利要求5所述的全量数据同步装置,其特征在于,所述全量数据同步装置,对第一分布式服务集群和第二分布式服务集群中相同节点名称的数据进行数据比对:The full data synchronization device according to claim 5, wherein the full data synchronization device performs data comparison on the data of the same node name in the first distributed service cluster and the second distributed service cluster:
    判断该节点对应的第一分布式服务集群和第二分布式服务集群的数据值是否相同;Determine whether the data values of the first distributed service cluster and the second distributed service cluster corresponding to the node are the same;
    如果相同则不做任何处理,如果不同,则进一步比对时间戳;If they are the same, do nothing, if they are different, then further compare the timestamps;
    判断该节点对应的第一分布式服务集群和第二分布式服务集群的时间戳的大小;Determine the size of the timestamp of the first distributed service cluster and the second distributed service cluster corresponding to the node;
    如果第一分布式服务集群的时间戳大于第二分布式服务集群的时间戳,则第二分布式服务集群的数据值被覆盖为第一分布式服务集群的数据值;If the timestamp of the first distributed service cluster is greater than the timestamp of the second distributed service cluster, the data value of the second distributed service cluster is overwritten with the data value of the first distributed service cluster;
    如果第二分布式服务集群的时间戳大于第一分布式服务集群的时间戳,则第一分布式服务集群的数据值被覆盖为第二分布式服务集群的数据值。If the timestamp of the second distributed service cluster is greater than the timestamp of the first distributed service cluster, the data value of the first distributed service cluster is overwritten with the data value of the second distributed service cluster.
  7. 根据权利要求6所述的全量数据同步装置,其特征在于,在比对时间戳步骤中,如果第一分布式服务集群的时间戳等于第二分布式服务集群的时间戳,则输出提示,等待输入指令进行操作。The full data synchronization device according to claim 6, characterized in that, in the step of comparing the timestamps, if the timestamp of the first distributed service cluster is equal to the timestamp of the second distributed service cluster, output a prompt and wait Enter instructions to operate.
  8. 根据权利要求1所述的全量数据同步装置,其特征在于,所述数据包括配置文件、内存数据、数据库数据。The full data synchronization device according to claim 1, wherein the data includes configuration files, memory data, and database data.
  9. 根据权利要求1所述的全量数据同步装置,其特征在于,所述第一分布式服务集群和/或第二分布式服务集群由一台领导者服务器和若干台跟随者服务器组成,用户通过分布式服务客户端与第一分布式服务集群和/或第二分布式服务集群进行交互,The full data synchronization device according to claim 1, wherein the first distributed service cluster and/or the second distributed service cluster is composed of a leader server and several follower servers, and users are distributed Service client interacts with the first distributed service cluster and/or the second distributed service cluster,
    所述跟随者服务器,提供所有的读操作,并且将结果返回分布式服务客户端;The follower server provides all read operations and returns the results to the distributed service client;
    所述领导者服务器,提供所有的写操作,并且将写入的数据复制到集群中其他的跟随者服务器中,更新系统的状态。The leader server provides all write operations and replicates the written data to other follower servers in the cluster to update the state of the system.
  10. 根据权利要求1所述的全量数据同步装置,其特征在于,所述第一分布式服务集群和/或第二分布式服务集群将全量数据存储在内存和文件中。The full data synchronization device according to claim 1, wherein the first distributed service cluster and/or the second distributed service cluster stores full data in memory and files.
PCT/CN2020/111011 2019-08-26 2020-08-25 Full data synchronization device suitable for a/b network double clusters WO2021037015A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910790758.2A CN110489491B (en) 2019-08-26 2019-08-26 Full data synchronization device suitable for A/B network double clusters
CN201910790758.2 2019-08-26

Publications (1)

Publication Number Publication Date
WO2021037015A1 true WO2021037015A1 (en) 2021-03-04

Family

ID=68554161

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/111011 WO2021037015A1 (en) 2019-08-26 2020-08-25 Full data synchronization device suitable for a/b network double clusters

Country Status (2)

Country Link
CN (1) CN110489491B (en)
WO (1) WO2021037015A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113965910A (en) * 2021-11-17 2022-01-21 交控科技股份有限公司 Vehicle-ground communication redundant networking architecture

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110489491B (en) * 2019-08-26 2023-07-04 湖南中车时代通信信号有限公司 Full data synchronization device suitable for A/B network double clusters

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102263798A (en) * 2010-05-25 2011-11-30 中国移动通信集团甘肃有限公司 Data synchronization method, device and system for communication systems
US20170300307A1 (en) * 2013-03-21 2017-10-19 Razer (Asia-Pacific) Pte. Ltd. Utilizing user devices for backing up and retrieving data in a distributed backup system
CN110109932A (en) * 2019-03-25 2019-08-09 民生科技有限责任公司 A kind of method and system ensuring primary copy data consistency under distributed environment
CN110162571A (en) * 2019-04-26 2019-08-23 厦门市美亚柏科信息股份有限公司 A kind of system, method, storage medium that data among heterogeneous databases synchronize
CN110489491A (en) * 2019-08-26 2019-11-22 湖南中车时代通信信号有限公司 A kind of full dose data synchronization unit for netting double clusters suitable for A/B

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107295031A (en) * 2016-03-30 2017-10-24 阿里巴巴集团控股有限公司 A kind of method of data synchronization and device
CN106341454B (en) * 2016-08-23 2019-09-24 世纪龙信息网络有限责任公司 Across computer room distributed data base management system (DDBMS) mostly living and method
CN110209726B (en) * 2018-02-12 2023-10-20 金篆信科有限责任公司 Distributed database cluster system, data synchronization method and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102263798A (en) * 2010-05-25 2011-11-30 中国移动通信集团甘肃有限公司 Data synchronization method, device and system for communication systems
US20170300307A1 (en) * 2013-03-21 2017-10-19 Razer (Asia-Pacific) Pte. Ltd. Utilizing user devices for backing up and retrieving data in a distributed backup system
CN110109932A (en) * 2019-03-25 2019-08-09 民生科技有限责任公司 A kind of method and system ensuring primary copy data consistency under distributed environment
CN110162571A (en) * 2019-04-26 2019-08-23 厦门市美亚柏科信息股份有限公司 A kind of system, method, storage medium that data among heterogeneous databases synchronize
CN110489491A (en) * 2019-08-26 2019-11-22 湖南中车时代通信信号有限公司 A kind of full dose data synchronization unit for netting double clusters suitable for A/B

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113965910A (en) * 2021-11-17 2022-01-21 交控科技股份有限公司 Vehicle-ground communication redundant networking architecture
CN113965910B (en) * 2021-11-17 2024-03-15 交控科技股份有限公司 Redundant networking architecture for vehicle-ground communication

Also Published As

Publication number Publication date
CN110489491B (en) 2023-07-04
CN110489491A (en) 2019-11-22

Similar Documents

Publication Publication Date Title
US11853263B2 (en) Geographically-distributed file system using coordinated namespace replication over a wide area network
US9495381B2 (en) Geographically-distributed file system using coordinated namespace replication over a wide area network
US9747301B2 (en) Distributed file system using consensus nodes
CN111581284B (en) Database high availability method, device, system and storage medium
US7653668B1 (en) Fault tolerant multi-stage data replication with relaxed coherency guarantees
CA2853465C (en) Split brain resistant failover in high availability clusters
US7275177B2 (en) Data recovery with internet protocol replication with or without full resync
US8301600B1 (en) Failover recovery in a distributed data store
WO2021037015A1 (en) Full data synchronization device suitable for a/b network double clusters
WO2016070375A1 (en) Distributed storage replication system and method
US9576040B1 (en) N-site asynchronous replication
US20040267836A1 (en) Replication of snapshot using a file system copy differential
JP4461147B2 (en) Cluster database using remote data mirroring
CN105493474B (en) System and method for supporting partition level logging for synchronizing data in a distributed data grid
KR100956637B1 (en) Method for asynchronous data replication in distributed file system and system thereof
CN101567805A (en) Method for recovering failed parallel file system
JP2000112911A (en) System and method for automatically redistributing task in data base managing system for computer network
US7752404B2 (en) Toggling between concurrent and cascaded triangular asynchronous replication
CN104506625A (en) Method for improving reliability of metadata nodes of cloud databases
WO2023077971A1 (en) Transaction processing method and apparatus, and computing device and storage medium
JP5331892B2 (en) Storage system and data replication method in storage system
CN115794499B (en) Method and system for dual-activity replication data among distributed block storage clusters
CN113254275A (en) MySQL high-availability architecture method based on distributed block device
CN105843560A (en) Method and system for maintaining consistency of master-slave mode double-controller software Raid 6
CN104991739A (en) Method and system for refining primary execution semantics during metadata server failure substitution

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20859088

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20859088

Country of ref document: EP

Kind code of ref document: A1