CN101661408A - Distributed real-time data replication synchronizing method - Google Patents

Distributed real-time data replication synchronizing method Download PDF

Info

Publication number
CN101661408A
CN101661408A CN200910167619A CN200910167619A CN101661408A CN 101661408 A CN101661408 A CN 101661408A CN 200910167619 A CN200910167619 A CN 200910167619A CN 200910167619 A CN200910167619 A CN 200910167619A CN 101661408 A CN101661408 A CN 101661408A
Authority
CN
China
Prior art keywords
data
message
ddr
local
attitude
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN200910167619A
Other languages
Chinese (zh)
Inventor
杨波
刘健波
杨军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sichuan University
Sichuan Chuanda Zhisheng Software Co Ltd
Original Assignee
Sichuan Chuanda Zhisheng Software Co Ltd
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 Sichuan Chuanda Zhisheng Software Co Ltd filed Critical Sichuan Chuanda Zhisheng Software Co Ltd
Priority to CN200910167619A priority Critical patent/CN101661408A/en
Publication of CN101661408A publication Critical patent/CN101661408A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a distributed real-time data replication synchronizing method, belonging to the application of a computer. A DDR process runs on each processor, heatbeat information is broadcasted periodically, and data copy which has same process with other processors is stored and maintained. An application program and the DDR process carry out data interaction in a DDR interface library. Data adopts strip as unit, and is stored in a shared memory provided by an operating system; each data is set with N bytes and M strips of data records and contains logic time, the number of updating application program and user data. The whole DDR process group only has a master mode. The replication comprises the following steps: DDR initiation of synchronous processes, master mode election, periodical inspection of data consistency, data updating, data updating notification, data updating inconsistency solving, data reading and DDR process exit. The method does not use database and avoidsthe condition that the whole system can not be used due to downtime of database; the data reading does not generate network access; and the method has fast data updating and high real time and reliability and is especially suitable for real-time distributed important mission system.

Description

A kind of distributed real-time data replication synchronizing method
Technical field
The invention belongs to the Computer Applied Technology field, relate to the replication synchronizing method of distributed real-time data.
Background technology
Traffic control system (ATC aloft, Air Traffic Control system), Ship Management System (CMS, Combat Management System) etc. (Real-time of magnificent mission system in real time,, mission-critical system) in, service processes generally adopts redundant configuration to be deployed on many processors, same process on many processors constitutes a cluster (Cluster), and having only a process on the processor simultaneously is main attitude, and other is from attitude.When main attitude process place processor or main attitude process itself go wrong, cluster control process will select certain to continue operation from the attitude process switching to main attitude automatically.The consistance and the real-time update that how to guarantee data between the principal and subordinate's process on many processors become a key problem in technology and difficult point.Traditional method adopts database as storage medium, and many processors are connected to database simultaneously and realize data sharing, but the method is deposited two problems: there is Single Point of Faliure in (1), and as the database machine of delaying, then total system is with unavailable; (2) real-time is not high, can't satisfy ATC etc. in real time, the requirement of magnificent mission system.Also exist to adopt method in addition, but under and the situation that the synchrodata amount is big a lot of at processor, its real-time is subjected to very big influence, can not satisfy the requirement of the consistance and the real-time update of data basically based on the data sync of issued transaction.
Summary of the invention
The objective of the invention is at the deficiencies in the prior art, propose a kind of distributed real-time data replication synchronizing method, be called for short the DDR method.This method does not adopt database as storage medium, do not exist because of the database machine of delaying and cause the out of use situation of total system, simultaneously, real time of data transmission and reliability have been improved, satisfy ATC, CMS etc. in real time, the real time data synchronization replication needs in the magnificent mission system, the consistance that keeps data between principal and subordinate's process, and then improve total system reliability of operation, availability.
The objective of the invention is to reach like this: keep real time data synchronized process of operation on every processor of data sync at need, be called for short the DDR process, preserve in each DDR process with keep with other processor on the identical copying data of DDR process.Simultaneously, provide a function interface storehouse, abbreviation ddr interface storehouse is used for application program and data synchronizing process DDR carries out data interaction.Be to improve the performance of DDR process and the access of ddr interface database data, with the deposit data of DDR management of process in the shared drive (ShareMemory) that operating system provides.The data of DDR management of process are unit with the bar, the space size of every data is fixed as the N byte, be total to M bar data recording, be stored in the shared drive of a continuous M * N byte-sized, each bar data content includes the logical time LTS of these data, the application reference number UID and user data USER DATA three parts of renewal, wherein application reference number UID is made up of the process number PID of processor numbering and application program, keeps uniqueness.Each DDR process can be given other DDR process by the periodic broadcasting heartbeat message, to guarantee the keeping IP address list of all normal DDR processes of moving and current main attitude DDR process numbering in each DDR process.A main attitude DDR process can only be arranged in the whole DDR process group, if when main attitude or dereliction attitude process judge occurring more than 2, is main attitude with the DDR process that starts on the processor of an IP address minimum of main attitude election algorithm election, and all the other are from attitude; The data copy step comprises: real time data synchronized process DDR initialization; Main attitude election; The data consistency periodic test; Data Update; The Data Update notice; The Data Update conflict solves; Data read and DDR process withdraw from several sections, and wherein data read is that application program directly reads certain bar data by the ddr interface storehouse from local shared drive, does not produce access to netwoks.
The detailed process of data copy step is:
(1) real time data synchronized process DDR initialization:
A) program start, initialization shared drive data field,
B) master slave mode with process is changed to from the attitude state,
C) after the success of DDR process initiation, periodically to other DDR process broadcasting heartbeat message HBM,
D) receive other DDR process heartbeat message HBM, and upgrade the local activity tabulation, as the heartbeat message HBM message that exceeds schedule time and do not receive certain, the then corresponding information of this process of deletion in effort scale.
(2) main attitude election:
A) main attitude DDR process election algorithm: if receive that from attitude DDR process main DDR process will withdraw from message MDM message or exceeds schedule time and do not receive data consistent check message MCM message, then think main attitude process cisco unity malfunction, whether the IP address of checking this process place processor according to local activity DDR process list is minimum, judge whether this process should switch to main attitude, switch to main attitude as need, then broadcast transmission master DDR process alive message MEM message is main attitude with this machine DDR process switching simultaneously.
B) how main attitude DDR process collision is separated annual reporting law: if main attitude DDR process is received data consistent check message MCM message or main attitude DDR process alive message MEM, then think and have a plurality of main attitudes, therefore compare with the IP address of this machine IP address and the MCM message of receiving: if this machine IP is bigger, then thinking has other DDR process to be more suitable for main attitude, is from attitude with this machine DDR process switching; If this machine IP is less, then send MEM message to corresponding DDR process, other main attitude DDR process is done same judgement.
(3) data consistency periodic test:
Main attitude DDR process periodic broadcasting sends data consistent check message MCM, comprises the LTS and the UID field of every data of main attitude DDR process in the MCM message, and the DDR process will be done following the processing after receiving MCM message:
A) main attitude DDR process is received MCM message, then knows a plurality of main attitudes to occur, and the how main attitude DDR process collision that then starts in (2) step solves, thereby guarantees to have only a main attitude process.
B) each receives MCM message from attitude DDR process, then according to content in the MCM message one by one with the LTS of local data and UID relatively.
If the LTS value of this record in the MCM message is bigger, the data that main attitude DDR process is described are more recent version, send data re-transmission message RDM to main attitude DDR process, ask main attitude to retransmit this data, after main attitude DDR process is received RDM message, with data re-transmission response message RRM, broadcast the latest edition data of these data.
If the LTS value of this record in the MCM message is less, the data of then main attitude DDR process are legacy version, send RRM message to main attitude DDR process, to upgrade this data from attitude DDR process.
If this record in the MCM message equates with the LTS value of local record, but both UID values are unequal, illustrate to have data collision and also be not employed the program solution, send RDM message to main attitude DDR process, ask main attitude to retransmit this data,
After main attitude DDR process is received RDM message, with the latest edition data of these data of RRM information broadcast.
If this record in the MCM message all equates with the LTS value and the UID value of local record, both versions of data unanimities are described, do not do any processing.
(4) Data Update:
A) when application program need be upgraded certain bar data, call the renewal function that provides in ddr interface storehouse will be more new data send to local DDR process, local DDR process adopts more new data of following algorithm:
I) LTS with these data adds 1, and UID is updated to the UID of calling process, upgrades local data;
Ii) to other DDR process broadcast transmission Data Update UDM message, to upgrade this data;
B) the DDR process receives Data Update message UDM by following algorithm process:
I) as the LTS value of these data in the UDM message LTS value, illustrate that local data is newer, does not process less than local these data;
Ii), then use the Data Update local data among the UDM, comprise LTS and UID field as the LTS value of these data in the UDM message LTS value greater than local these data;
Iii) equal the LTS value of local these data, but the UID value is unequal, illustrates to produce the Data Update conflict, manage conflict by (6) step " Data Update conflict resolution algorithm ", and write down detailed daily record as the LTS value of these data in the UDM message;
Iv) other situation does not then process;
C) the DDR process receives data re-transmission response message RRM by following algorithm process:
I) as the LTS value of these data in the RRM message LTS value, illustrate that local data is newer, does not process less than local these data;
Ii), then use the Data Update local data among the RRM, comprise LTS and UID field as the LTS value of these data in the RRM message LTS value greater than local these data;
Iii) equal the LTS value of local these data, but the UID value is unequal, illustrates to produce the Data Update conflict, manage conflict by (6) step " Data Update conflict resolution algorithm ", and write down detailed daily record as the LTS value of these data in the RRM message.
(5) Data Update notice: the DDR process that receives Data Update sends the Data Update notification message to local ddr interface storehouse, and application program obtains this notification message by automatic regular polling or registered callbacks function mode.
(6) the Data Update conflict solves:
When the DDR process is received UDM or RRM message and detect Data Update when conflict and handle by following method:
A) local data with these data is saved in the colliding data tabulation;
B) with the local corresponding data of the Data Update of receiving;
C) the ddr interface storehouse of the Data Update message UID correspondence in colliding data sends the data collision notification message, solves this conflict by the local application of ddr interface storehouse correspondence;
D) send the Data Update notice to the ddr interface storehouse of local other application program.
(7) data read:
Application program directly reads certain bar data by the ddr interface storehouse from local shared drive.
(8) the DDR process withdraws from:
When the DDR process that is in main attitude withdraws from, broadcast transmission master DDR process will withdraw from message MDM message.
The good effect that the present invention has is:
1,, stopped because of the database then out of use situation of total system of machine of delaying, and data read is that application program directly reads by the ddr interface storehouse that do not produce access to netwoks, Data Update is fast, the real-time height from local shared drive without database.
2, DATA DISTRIBUTION is on every processor, and is consistent, and reliability is higher, is particularly suitable for real-time, distributed, magnificent mission system.
3, the local storage adopted the shared drive mode, makes between a plurality of application processes of this machine exchanges data speed application program faster, that support more.The shared drive mode is higher than mode efficient such as the file-sharing of this machine, TCP/IP.
Description of drawings
Fig. 1 duplicates the deployment synoptic diagram with the distributed data that 4 processors are example.
Fig. 2 is stored in M * N size to share the data structure synoptic diagram of storage space.
Embodiment
The process of this distributed real-time data replication synchronizing method promptly is the implementation process of real time data synchronized process DDR process.
The message definition that is used for data interaction between the DDR process is as follows:
HBM:Heartbeat Message, DDR process heartbeat message is used for the states such as survival to other this machine of DDR process periodic report DDR process.HBM message data comprises: message sequence number, this machine IP, message generation time, master slave mode.
MCM:Master Check Message, data consistent check message, the data consistent check message of main DDR process periodic broadcasting is convenient to other DDR process check and new data more, to keep the global data unanimity.MCM message data comprises: the logical time LTS of message sequence number, this machine IP, message generation time, every data and application reference number UID field etc.
UDM:Update Data Message, Data Update message is used for the DDR process and Data Update situation and data updated is in time sent to other DDR process.UDM message comprises message sequence number, this machine IP address, message generation time, the numbering of data to be updated, logical time LTS, application reference number UID, user data user data etc.
RDM:Retransmission Data Message, data re-transmission message is used for the DDR process and retransmits certain bar data to certain DDR process requested; RDM message data comprises: the numbering of message sequence number, this machine IP address, message generation time, request retransmission data.
RRM:Reply Retransmission Message, the data re-transmission response message is used for receiving replying after the RDM message; RRM message data comprises: numbering, logical time LTS, application reference number UID, user data user data head and the user data of the data strip of message sequence number, this machine IP address, message generation time, re-transmission.
MDM:Master Dead Message, main DDR process will withdraw from message, send to other DDR process before the DDR process will withdraw from, and be used for other process initiation main frame election process; MDM message data comprises: message sequence number, this machine IP address, message generation time.
MEM:Master Exist Message, main DDR process alive message is used to solve the situation that has a plurality of main DDR processes simultaneously.MEM message data comprises: message sequence number, this machine IP address, message generation time.
The definition in ddr interface storehouse
It is that ddr interface storehouse mode is finished by the function interface storehouse is provided that application program and data synchronizing process DDR carry out data interaction.In the ddr interface storehouse promising application program provide that data are obtained, interface functions such as Data Update, automatic regular polling and register update notice readjustment.
The ddr interface built-in function is defined as:
(1) data are obtained function definition and are:
Int Get (int nddrNo, char*pUserdata, int nUserdataLength), this function take out nddrNo bar data and data content are put into pUserdata from local shared drive data, data are the longest to be the nUserdataLength byte.Application program directly by ddr interface storehouse reading of data from local shared drive, does not produce access to netwoks, both can reduce network overhead, can improve the real-time of data read again.
(2) the Data Update function definition is:
In the nddrNo bar data, data are the longest to be the nUserdataLength byte int Set (int nddrNo, const char*pUserdata, int nUserdataLength), this function copy the Data Update among the pUserdata to local data in.
(3) the automatic regular polling function definition is:
How many bar data variation int GetNotify (int*changedRecords) has returned according to function, and the numbering of delta data is put into the changedRecords array.Application program can be called the data that the get function is obtained concrete variation according to the data number in the changedRecords array.When certain bar data changed, the notification message that local transmission comprises data number was in the formation in the ddr interface storehouse of local application, and application program adopts the automatic regular polling mode to obtain the data message of variation.
(4) the registered callbacks function is:
Int RegisterNotifyCallback (void*funcptr), funcptr are shape such as void func (int nRecordNo) function pointer, the data number of nRecordNo for changing.When notification message, the function (funcptr) of the automatic invokes application registration in ddr interface storehouse is finished function corresponding and is handled.
The concrete steps that data are duplicated in the present embodiment are:
(1) real time data synchronized process DDR initialization:
A) program start, according to configuration parameter, initialization shared drive data field,
B) master slave mode with process is changed to from the attitude state,
C) after the DDR process initiation success, be 2 seconds the cycle to other DDR process broadcasting heartbeat message HBM,
D) receive other DDR process heartbeat message HBM, and upgrade the local activity tabulation,, then in effort scale, delete the corresponding information of this process as surpassing the heartbeat message HBM message of not receiving certain in 5 seconds of regulation.
(2) main attitude election:
A) main attitude DDR process election:
If receive that from attitude DDR process main DDR process will withdraw from message MDM message or exceeds schedule time, generally be decided to be 2.5~3 seconds, do not receive data consistent check message MCM message, then think main attitude process cisco unity malfunction.Therefore the relation of minimum IP address in this machine of DDR process check IP address and the local activity DDR process list:
If this machine IP address minimum thinks that then this process should switch to main attitude, broadcast transmission master DDR process alive message MEM message is main attitude with this machine DDR process switching simultaneously.
If this machine IP address is not minimum, then be left intact.
B) how main attitude DDR process collision solves:
If main attitude DDR process is received data consistent check message MCM message or main attitude DDR process alive message MEM, then think and have a plurality of main attitudes, therefore compare with the IP address of this machine IP address and the MCM message of receiving: if this machine IP is bigger, then thinking has other DDR process to be more suitable for main attitude, is from attitude with this machine DDR process switching; If this machine IP is less, then send MEM message to corresponding DDR process, other main attitude DDR process is done same judgement.
(3) data consistency periodic test:
Regular 1 second broadcast transmission data consistent check message of main attitude DDR process MCM message comprises the LTS and the UID field of every data of main attitude DDR process in the MCM message, the DDR process will be done following the processing after receiving MCM message:
A) main attitude DDR process is received MCM message, then knows a plurality of main attitudes to occur, and the how main attitude DDR process collision that starts in (2) step solves, and guarantees to have only a main attitude process at last.
B) each receives MCM message from attitude DDR process, then according to content in the MCM message one by one with the LTS of local data and UID relatively.
If LTS (MCM)>LTS (local record), this of then main attitude DDR process is recorded as more recent version, send RDM message to main attitude DDR process, ask main attitude DDR process to retransmit this data, after main attitude DDR process is received RDM message, random delay 0--50 millisecond is after the time, with the latest edition data of these data of RRM information broadcast.The purpose that sends RRM message behind the employing random delay time is that many RDM message compression from attitude DDR process possible receiving are a RRM acknowledgement messaging, reduces network traffics and DDR process processing time.
If LTS (MCM)<LTS (local record), the data of then main attitude DDR process are legacy version, send RRM message to main attitude DDR process, to upgrade this data from attitude DDR process.
If a LTS (MCM)=LTS (local record), and UID (MCM)!=UID (localrecord) illustrates to have data collision, but the program that also is not employed solves, send RDM message to main attitude DDR process, ask main attitude to retransmit this data, after main attitude DDR process is received RDM message, with the latest edition data of these data of RRM information broadcast.
If LTS (MCM)=LTS (local record), and UID (MCM)=UID (localrecord) illustrate both versions of data unanimities, do not do any processing.
(4) Data Update:
A) when application program need be upgraded certain bar data, the Data Update Set function that calls the ddr interface storehouse sends to local DDR process with data to be updated, and local DDR process adopts more new data of following algorithm:
I) LTS with these data adds 1, and UID is updated to the UID of calling process, upgrades local data;
Ii) to other DDR process broadcast transmission Data Update UDM message;
B) the DDR process receives Data Update message UDM or data re-transmission response message RRM message by following algorithm process:
I) as LTS (UDM)<LTS (local record) or LTS (RRM)<LTS (local record), do not process;
Ii) as LTS (UDM)>LTS (local record) or LTS (RRM)>LTS (local record) then with the local corresponding data of the Data Update among UDM or the RRM, comprise LTS and UID field;
Iii) as LTS (UDM)=LTS (local record), and UID (UDM)!=UID (localrecord); Or LTS (RRM)=LTS (local record), an and UID (RRM)!=UID (localrecord) illustrates to produce the Data Update conflict, goes on foot " Data Update conflict resolution algorithm " according to (6) and manages conflict, and write down detailed daily record;
Iv) other situation does not then process.
(5) Data Update notice: the DDR process that receives Data Update sends the Data Update notification message to local ddr interface storehouse, and application program obtains this notification message by automatic regular polling or registered callbacks function mode.
(6) the Data Update conflict solves:
When the DDR process is received UDM or RRM message and detect Data Update when conflict, at this moment handle by following method:
A) local data with these data is saved in the colliding data tabulation;
B) with the local corresponding data of the Data Update of receiving;
C) the ddr interface storehouse of the UID of the Data Update person in colliding data correspondence sends the data collision notification message, solves this conflict by the local application of ddr interface storehouse correspondence;
D) send the Data Update notice to the ddr interface storehouse of local other application program.
(7) data read:
Application program directly reads the data strip data that need from local shared drive by the ddr interface storehouse
(8) the DDR process withdraws from: when the DDR process that is in main attitude withdraws from, broadcast transmission master DDR process will withdraw from message MDM message, and this message is represented withdrawing from of whole process.

Claims (4)

1, a kind of distributed real-time data replication synchronizing method, it is characterized in that: real time data synchronized process of operation on every processor of need maintenance data sync, be called for short the DDR process, preserve in each DDR process with keep with other processor on the identical copying data of DDR process; Simultaneously, provide a function interface storehouse, abbreviation ddr interface storehouse is used for application program and data synchronizing process DDR carries out data interaction;
The data of DDR management of process are unit with the bar, the space size of every data is fixed as the N byte, be total to M bar data recording, in the shared drive that is stored in a continuous M * N byte-sized, provides by operating system, each bar data content includes the logical time LTS of these data, the application reference number UID and user data USER DATA three parts of renewal, and wherein application reference number UID is made up of the process number PID of processor numbering and application program;
Each DDR process periodic broadcasting heartbeat message is given other DDR process, to guarantee the keeping IP address list of all normal DDR processes of moving and current main attitude DDR process numbering in each DDR process;
A main attitude DDR process can only be arranged in the whole DDR process group, if when main attitude or dereliction attitude process judge occurring more than 2, the DDR process that then starts on the processor of an IP address minimum of main attitude election algorithm election is main attitude, and all the other are from attitude;
The data copy step comprises: real time data synchronized process DDR initialization; Main attitude election; The data consistency periodic test; Data Update; The Data Update notice; The Data Update conflict solves; Data read and DDR process withdraw from several sections, and wherein data read is that application program directly reads certain bar data by the ddr interface storehouse from local shared drive, does not produce access to netwoks.
2, distributed real-time data replication synchronizing method as claimed in claim 1 is characterized in that: described data copy step:
(1) real time data synchronized process DDR initialization:
A) program start, initialization shared drive data field,
B) master slave mode with process is changed to from the attitude state,
C) after the success of DDR process initiation, periodically to other DDR process broadcasting heartbeat message HBM,
D) receive other DDR process heartbeat message HBM, and upgrade the local activity tabulation, as the heartbeat message HBM message that exceeds schedule time and do not receive certain, the then corresponding information of this process of deletion in effort scale;
(2) main attitude election:
A) main attitude DDR process election algorithm: if receive main DDR process with exit message MDM message or exceed schedule time and do not receive data consistent check message MCM message from attitude DDR process; Then think cisco unity malfunction of main attitude process; Whether the IP address that checks this process place processor according to local activity DDR process list is minimum; Judge whether this process should switch to main attitude; Switch to main attitude such as need; Broadcast transmission master DDR process alive message MEM message then; Be main attitude with this machine DDR process switching simultaneously
B) how main attitude DDR process collision is separated annual reporting law: if main attitude DDR process is received data consistent check message MCM message or main attitude DDR process alive message MEM, then think and have a plurality of main attitudes, therefore compare with the IP address of this machine IP address and the MCM message of receiving: if this machine IP is bigger, then thinking has other DDR process to be more suitable for main attitude, with this machine DDR process switching is from attitude, if this machine IP is less, then send MEM message to corresponding DDR process, other main attitude DDR process is done same judgement;
(3) data consistency periodic test:
Main attitude DDR process periodic broadcasting sends data consistent check message MCM, comprises the LTS and the UID field of every data of main attitude DDR process in the MCM message, and the DDR process will be done following the processing after receiving MCM message:
A) main attitude DDR process is received MCM message, then knows a plurality of main attitudes to occur, and the how main attitude DDR process collision that starts in (2) step solves, thereby guarantees to have only a main attitude process,
B) each receives MCM message from attitude DDR process, then according to content in the MCM message one by one with the LTS of local data and UID relatively:
If the LTS value of this record in the MCM message is bigger, the data that main attitude DDR process is described are more recent version, send data re-transmission message RDM to main attitude DDR process, ask main attitude to retransmit this data, after main attitude DDR process is received RDM message, with data re-transmission response message RRM, broadcast the latest edition data of these data
If the LTS value of this record in the MCM message is less, the data of then main attitude DDR process are legacy version, send RRM message to main attitude DDR process from attitude DDR process, upgrading this data,
If this record in the MCM message equates with the LTS value of local record, but both UID values are unequal, illustrate to have data collision and also be not employed the program solution, send RDM message to main attitude DDR process, ask main attitude to retransmit this data,
After main attitude DDR process is received RDM message, with the latest edition data of these data of RRM information broadcast,
If this record in the MCM message all equates with the LTS value and the UID value of local record, both versions of data unanimities are described, do not do any processing;
(4) Data Update:
A) when application program need be upgraded certain bar data, call the renewal function that provides in ddr interface storehouse will be more new data send to local DDR process, local DDR process adopts more new data of following algorithm:
I) LTS with these data adds 1, and UID is updated to the UID of calling process, upgrades local data,
Ii) to other DDR process broadcast transmission Data Update UDM message, to upgrade this data;
B) the DDR process receives Data Update message UDM by following algorithm process:
I) as the LTS value of these data in the UDM message LTS value, illustrate that local data is newer, do not process less than local these data,
Ii), then use the Data Update local data among the UDM, comprise LTS and UID field as the LTS value of these data in the UDM message LTS value greater than local these data,
Iii) equal the LTS value of local these data, but the UID value is unequal, illustrates to produce the Data Update conflict, manage conflict by (6) step " Data Update conflict resolution algorithm ", and write down detailed daily record as the LTS value of these data in the UDM message,
Iv) other situation does not then process;
C) the DDR process receives data re-transmission response message RRM by following algorithm process,
I) as the LTS value of these data in the RRM message LTS value, illustrate that local data is newer, do not process less than local these data,
Ii), then use the Data Update local data among the RRM, comprise LTS and UID field as the LTS value of these data in the RRM message LTS value greater than local these data,
Iii) equal the LTS value of local these data, but the UID value is unequal, illustrates to produce the Data Update conflict, manage conflict by (6) step " Data Update conflict resolution algorithm ", and write down detailed daily record as the LTS value of these data in the RRM message;
(5) Data Update notice: the DDR process that receives Data Update sends the Data Update notification message to local ddr interface storehouse, and application program obtains this notification message by automatic regular polling or registered callbacks function mode;
(6) the Data Update conflict solves:
When the DDR process is received UDM or RRM message and detect Data Update when conflict and handle by following method:
A) local data with these data is saved in the colliding data tabulation,
B) with the local corresponding data of the Data Update of receiving,
C) the ddr interface storehouse of the Data Update message UID correspondence in colliding data sends the data collision notification message, solves this conflict by the local application of ddr interface storehouse correspondence,
D) send the Data Update notice to the ddr interface storehouse of local other application program;
(7) data read:
Application program directly reads certain bar data by the ddr interface storehouse from local shared drive;
(8) the DDR process withdraws from:
When the DDR process that is in main attitude withdraws from, broadcast transmission master DDR process will withdraw from message MDM message.
3, distributed real-time data replication synchronizing method as claimed in claim 1, it is characterized in that: describedly provide a function interface storehouse, be used for application program and data synchronizing process DDR carry out data interaction be meant in the promising application program in ddr interface storehouse provide that data are obtained, the interface function of Data Update, automatic regular polling and register update notice readjustment, the ddr interface built-in function is defined as:
(1) obtaining data function is defined as:
Int Get (int nddrNo, char*pUserdata, int nUserdataLength), this function take out nddrNo bar data and data content are put into pUserdata from local shared drive data, data are the longest to be the nUserdataLength byte;
(2) upgrading data function is defined as:
In the nddrNo bar data, data are the longest to be the nUserdataLength byte int Set (int nddrNo, const char*pUserdata, int nUserdataLength), this function copy the Data Update among the pUserdata to local data in;
(3) the automatic regular polling function definition is:
Int GetNotify (int*changedRecords), how many bar data variation have been returned according to function, the numbering of delta data is put into the changedRecords array, and application program can be called the data that the get function is obtained concrete variation according to the data number in the changedRecords array;
(4) the registered callbacks function is:
Int RegisterNotifyCallback (void*funcptr), funcptr is shape such as void func (int nRecordNo) function pointer, the data number of nRecordNo for changing, when notification message, the function (funcptr) of the automatic invokes application registration in ddr interface storehouse is finished function corresponding and is handled.
4, distributed real-time data replication synchronizing method as claimed in claim 2 is characterized in that:
Described heartbeat message HBM message data comprises: message sequence number, this machine IP, message generation time, master slave mode;
Described data consistent check message MCM message data comprises: the logical time LTS and the application reference number UID field of message sequence number, this machine IP, message generation time, every data;
Described Data Update message UDM message comprises message sequence number, this machine IP address, message generation time, data updated bar numbering, logical time LTS, application reference number UID field and user data user datahead and user data;
Described data re-transmission message RDM message data comprises: the numbering of message sequence number, this machine IP address, message generation time, request retransmission data strip;
Described data re-transmission response message RRM message data comprises: numbering, logical time LTS, application reference number UID field and the user data user data head and the user data of message sequence number, this machine IP address, message generation time, data retransmission bar;
Described main DDR process will withdraw from message MDM message data and comprise: message sequence number, this machine IP address, message generation time;
Described main DDR process alive message MEM message data comprises: message sequence number, this machine IP, message generation time.
CN200910167619A 2009-09-14 2009-09-14 Distributed real-time data replication synchronizing method Pending CN101661408A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200910167619A CN101661408A (en) 2009-09-14 2009-09-14 Distributed real-time data replication synchronizing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200910167619A CN101661408A (en) 2009-09-14 2009-09-14 Distributed real-time data replication synchronizing method

Publications (1)

Publication Number Publication Date
CN101661408A true CN101661408A (en) 2010-03-03

Family

ID=41789454

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200910167619A Pending CN101661408A (en) 2009-09-14 2009-09-14 Distributed real-time data replication synchronizing method

Country Status (1)

Country Link
CN (1) CN101661408A (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103024025A (en) * 2012-12-07 2013-04-03 康佳集团股份有限公司 Method and system of managing and sharing application information of intelligent device
CN103744618A (en) * 2013-12-20 2014-04-23 金蝶软件(中国)有限公司 Method and system for achieving team shared storage
CN104850551A (en) * 2014-02-13 2015-08-19 腾讯科技(深圳)有限公司 Data processing method, data processing apparatus and mobile terminal
CN105956127A (en) * 2016-05-05 2016-09-21 郑州悉知信息科技股份有限公司 Category data processing method and apparatus
WO2016150066A1 (en) * 2015-03-25 2016-09-29 中兴通讯股份有限公司 Master node election method and apparatus, and storage system
CN106201581A (en) * 2016-08-08 2016-12-07 安徽科成信息科技有限公司 A kind of background update system of teaching software
CN106487469A (en) * 2016-10-17 2017-03-08 财付通支付科技有限公司 A kind of timing node changing method and system
CN106647412A (en) * 2017-01-17 2017-05-10 爱普(福建)科技有限公司 Data sharing method between distributed controllers based on configuration element
CN107577780A (en) * 2017-09-13 2018-01-12 郑州云海信息技术有限公司 A kind of data center's cloud resource synchronous method and device
CN107809326A (en) * 2016-09-09 2018-03-16 阿里巴巴集团控股有限公司 Processing method, device and the equipment of data consistency
CN108173948A (en) * 2017-12-29 2018-06-15 中国船舶重工集团公司第七〇九研究所 A kind of Distributed Experiment data real-time exchange method
CN110071964A (en) * 2019-03-26 2019-07-30 罗克佳华科技集团股份有限公司 File synchronisation method, device, file sharing network, file are total to system and storage medium
CN112423407A (en) * 2020-10-27 2021-02-26 广州市华用智能科技有限公司 Terminal equipment scanning connection control method based on RDM bidirectional communication
WO2022052634A1 (en) * 2020-09-08 2022-03-17 International Business Machines Corporation Adaptable legacy stateful workload

Cited By (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103024025A (en) * 2012-12-07 2013-04-03 康佳集团股份有限公司 Method and system of managing and sharing application information of intelligent device
CN103744618A (en) * 2013-12-20 2014-04-23 金蝶软件(中国)有限公司 Method and system for achieving team shared storage
CN104850551B (en) * 2014-02-13 2020-02-28 腾讯科技(深圳)有限公司 Data processing method and device and mobile terminal
CN104850551A (en) * 2014-02-13 2015-08-19 腾讯科技(深圳)有限公司 Data processing method, data processing apparatus and mobile terminal
WO2016150066A1 (en) * 2015-03-25 2016-09-29 中兴通讯股份有限公司 Master node election method and apparatus, and storage system
CN105956127A (en) * 2016-05-05 2016-09-21 郑州悉知信息科技股份有限公司 Category data processing method and apparatus
CN106201581A (en) * 2016-08-08 2016-12-07 安徽科成信息科技有限公司 A kind of background update system of teaching software
CN107809326A (en) * 2016-09-09 2018-03-16 阿里巴巴集团控股有限公司 Processing method, device and the equipment of data consistency
CN106487469A (en) * 2016-10-17 2017-03-08 财付通支付科技有限公司 A kind of timing node changing method and system
CN106487469B (en) * 2016-10-17 2019-01-11 财付通支付科技有限公司 A kind of timing node switching method and system
CN106647412A (en) * 2017-01-17 2017-05-10 爱普(福建)科技有限公司 Data sharing method between distributed controllers based on configuration element
CN106647412B (en) * 2017-01-17 2018-12-18 爱普(福建)科技有限公司 A kind of data sharing method between distributed director based on configuration element
CN107577780A (en) * 2017-09-13 2018-01-12 郑州云海信息技术有限公司 A kind of data center's cloud resource synchronous method and device
CN108173948A (en) * 2017-12-29 2018-06-15 中国船舶重工集团公司第七〇九研究所 A kind of Distributed Experiment data real-time exchange method
CN108173948B (en) * 2017-12-29 2020-12-04 中国船舶重工集团公司第七一九研究所 Distributed test data real-time exchange method
CN110071964A (en) * 2019-03-26 2019-07-30 罗克佳华科技集团股份有限公司 File synchronisation method, device, file sharing network, file are total to system and storage medium
CN110071964B (en) * 2019-03-26 2022-03-15 罗克佳华科技集团股份有限公司 File synchronization method, device, file sharing network, file sharing system and storage medium
WO2022052634A1 (en) * 2020-09-08 2022-03-17 International Business Machines Corporation Adaptable legacy stateful workload
US11321351B2 (en) 2020-09-08 2022-05-03 International Business Machines Corporation Adaptable legacy stateful workload
GB2613126A (en) * 2020-09-08 2023-05-24 Ibm Adaptable legacy stateful workload
CN112423407A (en) * 2020-10-27 2021-02-26 广州市华用智能科技有限公司 Terminal equipment scanning connection control method based on RDM bidirectional communication

Similar Documents

Publication Publication Date Title
CN101661408A (en) Distributed real-time data replication synchronizing method
CN104506625A (en) Method for improving reliability of metadata nodes of cloud databases
CN107832138B (en) Method for realizing flattened high-availability namenode model
CN101519078B (en) Method for synchronizing multi-region data of comprehensive monitoring system
CN101583024B (en) Distributed network video monitoring system and registration control method thereof
CN109597723B (en) Dual-machine hot standby redundancy implementation system and method for subway integrated monitoring system
CN101388759B (en) Method and system for implementing from asynchronous copy to synchronous copy by data
CN108600353A (en) A kind of parallel block synchronization method of block chain node
CN112565415B (en) Cross-region resource management system and method based on cloud edge cooperation
CN102880529B (en) Memory data backup method and memory data backup system
CN103138912B (en) Method of data synchronization and system
CN111787055B (en) Redis-based transaction mechanism and multi-data center oriented data distribution method and system
CN108228397A (en) The method and apparatus that a kind of cluster span computer room synchronizes
CN101436209A (en) Method and apparatus for synchronizing multiple databases
CN103902405A (en) Quasi-continuity data replication method and device
CN105302670B (en) A kind of method and device that station is monitored using multi-computer Redundancy mode
CN104320486B (en) A kind of intelligent transportation platform data integrated approach based on big data
CN114363350B (en) Service management system and method
WO2016095329A1 (en) Log recording system and log recording operating method
CN109657000B (en) Real-time data synchronization method and device of rail transit comprehensive monitoring system
CN105323271B (en) Cloud computing system and processing method and device thereof
CN114741367B (en) Data synchronization method, data synchronization device, electronic equipment, storage medium and program product
CN104243554A (en) Method for synchronizing time memories of host and standby of time series database in cluster system
CN116185697A (en) Container cluster management method, device and system, electronic equipment and storage medium
CN116346588A (en) Management node switching method, device, equipment and medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
ASS Succession or assignment of patent right

Owner name: SICHUAN UNIVERSITY

C41 Transfer of patent application or patent right or utility model
COR Change of bibliographic data

Free format text: CORRECT: ADDRESS; FROM: 610045 NO.7, WUKE EAST ROAD 1, WUHOU SCIENCE AND TECHNOLOGY PARK, CHENGDU CITY, SICHUAN PROVINCE TO: 610045 NO.7, WUKE EAST ROAD 1, CHENGDU CITY, SICHUAN PROVINCE

TA01 Transfer of patent application right

Effective date of registration: 20101227

Address after: Vuko East Road Chengdu City, Sichuan province 610045 No. 7

Applicant after: Chuandazhisheng Software Co., Ltd., Sichuan

Co-applicant after: Sichuan University

Address before: Vuko East Road Chengdu city Sichuan province 610045 Wuhou Science Park No. 7

Applicant before: Chuandazhisheng Software Co., Ltd., Sichuan

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20100303