CN106453633A - Communication method for multiple nodes in non-stable communication link - Google Patents
Communication method for multiple nodes in non-stable communication link Download PDFInfo
- Publication number
- CN106453633A CN106453633A CN201611040993.0A CN201611040993A CN106453633A CN 106453633 A CN106453633 A CN 106453633A CN 201611040993 A CN201611040993 A CN 201611040993A CN 106453633 A CN106453633 A CN 106453633A
- Authority
- CN
- China
- Prior art keywords
- node
- information
- management node
- numbering
- receives
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1095—Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/54—Presence management, e.g. monitoring or registration for receipt of user log-on information, or the connection status of the users
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses a communication method for multiple nodes in a non-stable communication link. The communication method comprises the following steps: generating a serial number M from a management node in a cluster, and transmitting preparation requests with the serial number M to all other nodes; after the nodes receive the preparation requests, determining whether the serial number M carried in the preparation requests is the maximum received serial number or not, if the serial number M is the maximum received serial number, entering into a preparation state, and transmitting preparation request response to the management node; if the number of the preparation request response received by the management node is greater than n/2, transmitting information receiving request with synchronization information V to the nodes from which the preparation request response is transmitted, by the management node; if the number of the information receiving request response received within a preset time by the management node is greater than n/2, transmitting success information to the nodes from which the information receiving request response is transmitted, by the management node; updating node state information of the nodes receiving the success information as synchronization information V. By adopting the communication method, node information synchronization can be achieved, and data consistency can be maintained.
Description
Technical field
The present invention relates to communication technical field, multi-node communication method in more particularly to a kind of unstable communication link.
Background technology
At present, in computer system architecture evolution process from centralized to distributed, network factors are necessarily introduced,
And the unreliability due to network itself, introduce extra problem again.Distributed system needs to carry out between the individual nodes
Network service, therefore network service all can pass night with a person the disabled risk of network, the hardware device such as network fiber, router every time
Or system is unavailable all to lead to final distributed system cannot smoothly complete primary network communication, and therefore message is all and disappears
Breath delay becomes very universal, therefore how to ensure that the concordance of data is problem demanding prompt solution.
Content of the invention
It is an object of the invention to provide multi-node communication method in a kind of unstable communication link, to realize node is carried out
Synchronizing information, keeps the concordance of data.
For solving above-mentioned technical problem, the present invention provides multi-node communication method in a kind of unstable communication link, the party
Method includes:
Management node in step 1, cluster generates numbering M, other nodes in addition to management node in cluster
All send the preparation request carrying numbering M;M is positive integer, and M is more than or equal to 1;
Step 2, each node receive described preparation request, judge whether numbering M carrying in preparation request receives
Maximum numbering, if so, enters into SBR, sends preparation request response to management node;
If the number of the preparation request response that step 3 management node receives is more than n/2, management node prepares to transmission
Each node of request response sends the information reception request carrying synchronizing information V;N is the total number of all nodes in cluster;
If the number that the information that step 4 management node receives in Preset Time receives request response is more than n/2, pipe
Each node that reason node receives request response to the information of transmission sends success message;
Node status information is updated to synchronizing information V by step 5, each node receiving success message.
Preferably, before step 1, also include:
The node that ID is maximum or ID is minimum is selected from cluster by node ID sortord and is used as management node.
Preferably, in step 2, each node receives described preparation request, judges numbering M that carries in preparation request whether
After maximum for receiving is numbered, also include:
If numbering M carrying in standby request is not the maximum numbering receiving, send, to management node, the maximum having received
Numbering.
Preferably, after step 2, before step 3, also include:
Step 21:When management node receives the maximum numbering being sent by other nodes, regenerate numbering M
+, return to step 1.
Preferably, step 3 also includes:
If the number of the preparation request response that management node receives is less than or equal to n/2, return to step 1.
Preferably, after step 3, before step 4, also include:
Step 31:Each node that the information that receives receives request sends information reception request response to management node.
Preferably, step 4 also includes:
If the number that the information that management node receives in Preset Time receives request response is less than or equal to n/2, return
Step 1.
Preferably, after step 5, also include:
If management node detects one of cluster, node no responds all the time, by the node removal collection of no response all the time
Group.
Multi-node communication method in a kind of unstable communication link provided by the present invention, the management node in cluster generates
One numbering M, in cluster, other nodes in addition to management node all send the preparation request carrying numbering M;Each node
Receive described preparation request, judge whether numbering M carrying in preparation request is the maximum numbering receiving, if so, enter into
SBR, sends preparation request response to management node;If the number of the preparation request response that management node receives is more than
N/2, management node sends the information reception request carrying synchronizing information V to each node sending preparation request response;N is collection
The total number of all nodes in group;If the number that the information that management node receives in Preset Time receives request response is more than
N/2, each node that management node receives request response to the information of transmission sends success message;Receive each node of success message
Node status information is updated to synchronizing information V.It can be seen that, communicated with other nodes in cluster using management node, passed through
Preparation request, preparation request response, information receive request, information receive request response and success message these request and response come
Complete the information synchronization mechanism between management node and other nodes, node status information is updated to synchronizing information, it is right to realize
Node carries out synchronizing information, reaches node information synchronization unanimously, keeps the concordance of data.
Brief description
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
Have technology description in required use accompanying drawing be briefly described it should be apparent that, drawings in the following description be only this
Inventive embodiment, for those of ordinary skill in the art, on the premise of not paying creative work, can also basis
The accompanying drawing providing obtains other accompanying drawings.
Fig. 1 is the flow chart of multi-node communication method in a kind of unstable communication link provided by the present invention;
Fig. 2 is the sequential chart between node;
Fig. 3 is node state schematic diagram;
Fig. 4 is synchronizing information particular flow sheet.
Specific embodiment
The core of the present invention is to provide multi-node communication method in a kind of unstable communication link, to realize node is carried out
Synchronizing information, keeps the concordance of data.
In order that those skilled in the art more fully understand the present invention program, below in conjunction with the embodiment of the present invention
Accompanying drawing, is clearly and completely described to the technical scheme in the embodiment of the present invention it is clear that described embodiment is only
The a part of embodiment of the present invention, rather than whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art
The every other embodiment being obtained under the premise of not making creative work, broadly falls into the scope of protection of the invention.
Refer to Fig. 1, Fig. 1 is the flow process of multi-node communication method in a kind of unstable communication link provided by the present invention
Figure, the method includes:
Management node in step 1, cluster generates numbering M, other nodes in addition to management node in cluster
All send the preparation request carrying numbering M;
Wherein, M is positive integer, and M is more than or equal to 1;
Step 2, each node receive preparation request, judge whether numbering M carrying in preparation request is the maximum receiving
Numbering, if so, enters into SBR, sends preparation request response to management node;
If the number of the preparation request response that step 3 management node receives is more than n/2, management node prepares to transmission
Each node of request response sends the information reception request carrying synchronizing information V;
Wherein, n is the total number of all nodes in cluster;
If the number that the information that step 4 management node receives in Preset Time receives request response is more than n/2, pipe
Each node that reason node receives request response to the information of transmission sends success message;
Node status information is updated to synchronizing information V by step 5, each node receiving success message.
It can be seen that, communicated with other nodes in cluster using management node, responded by preparation request, preparation request,
Information receives request, information receives and asks response and these requests of success message and response to complete management node and other nodes
Between information synchronization mechanism, node status information is updated to synchronizing information, realizes carrying out synchronizing information to node, reach section
Point synchronizing information is consistent, keeps the concordance of data.
Based on said method, further, before step 1, also include:Selected from cluster by node ID sortord
The node that ID is maximum or ID is minimum is as management node.
Wherein, in step 2, each node receives preparation request, judges whether numbering M carrying in preparation request is to receive
Maximum numbering after, also include:If numbering M carrying in standby request is not the maximum numbering receiving, send to management node
The maximum numbering having received.
Specifically, after step 2, before step 3, further comprising the steps of:
Step 21:When management node receives the maximum numbering being sent by other nodes, regenerate numbering M
+, return to step 1.
Wherein, also include in step 3:If the number of the preparation request response that management node receives is less than or equal to n/2, return
Return step 1.
Further, after step 3, before step 4, also include:
Step 31:Each node that the information that receives receives request sends information reception request response to management node.
Wherein, step 4 also includes:If the information that management node receives in Preset Time receives the number of request response
Less than or equal to n/2, return to step 1.
Further, after step 5, also include:If management node detects one of cluster, node no responds all the time,
The node of no response all the time is removed cluster.
Based on this method, it is embodied as flow process and comprises the following steps:
(1) a cluster cluster is formed by n node Node, all node Node are reciprocity, purposes initially
It is that status information X of all nodes will be consistent.
(2) the multiple nodes (Node) in cluster sorted by Node ID or node name dictionary sequencing selection
Big or minimum node (Node) is as Boss node.Boss node is responsible for unified response cluster (cluster) event, and to section
Point PUSH message simultaneously collects message feedback.
(3) information V is had to need, when multinode synchronizes, to firstly generate numbering M, this numbering is with Boss node
The numbering of the maximum having generated, and send prepare (M) request notify each node.Prepare (M) request as carries
There is the preparation request of numbering M.
(4), when each node receives prepare (M) request, first judge whether the M in prepare (M) is that oneself receives
Big number, if being put into prepare state and replying prepare response and represent respond request, if not just returning
The maximum numbering that multiple Boss node has received oneself.Prepare response is preparation request response.
(5) if Boss receives node, reaction M is not maximum numbering, regenerates numbering M+, repeat step (3)
To step (4).If the number of nodes receiving normal response within a certain period of time is more than n/2, starts next step, otherwise repeat
Step (3) arrives step (5).
(6) send accept (M, V) request to the node of normal response, if receiving normal response within a certain period of time
The acceptresponse feedback quantity of node is more than n/2, then start next step, otherwise repeat step (3) arrives step (6).Section
Point is ready to pass through V to update node status information X.The information reception that accept (M, V) request as carries synchronizing information V please
Ask, acceptresponse is information and receives request response.
(7) send success (M) message to feedback node.When node receives message, node state is updated according to V information
Information X.Success (M) message is success message.
(8) step (7) is arrived according to repeat step (3) and start next round message synchronization.
(9) the new node adding, needs to learn latest state information X and last numbering M.
(10) if Boss nodal test no responds for a long time to certain node, just this node removal can be attempted
cluster.
(11) if Boss node lost efficacy, Boss node is regenerated according to step (2) rule.New Boss node needs to receive
Collect each nodal information, if there are not synchronous information V, then repeat step (2) synchronizes to step (8).
Fig. 2 is the sequential chart between node, is the normal communication process of Boss node, is that boss node initiates communication, many
Individual node node receive information is simultaneously corresponding.
Fig. 3 is node state schematic diagram, is the state machine transition process of each node, from the beginning of start state, receives
Prepare state is entered, message numbering M have to be larger than message numbering known to node, non-less than then feeding back after prepare message
Normal response, prepare message is prepare request.
Fig. 4 is synchronizing information particular flow sheet, is the flow chart that whole message is synchronized to each node by Boss node, in office
Abnormal state in what position, all restarts whole flow process it is ensured that information obtains conforming synchronization.
This method supports that multinode data consistency is synchronous, is responsible for whole communication process by boss node, boss node can
After inefficacy, selected by other unalterable rules, the response that message must obtain n/2+1 node just can carry out next step, separately
Carry out data submission in two stages outward, the prepare stage does not directly transmit data, Prepare demands generate maximum numbering,
Node carries out further condition conversion and process to the message not being maximum numbering.
By this method, there is no Single Point of Faliure, either boss node or certain node node failure, all do not interfere with
The operation of overall cluster it is ensured that state consistency, can tackle that various communication links are unstable and information drop-out, and easily
Extension, can support to carry out synchronizing information compared with multinode, and the more vigorousnesses of node are better, could support up 1 random node of n/2
Fault, n is cluster interior nodes quantity.
To sum up, multi-node communication method in a kind of unstable communication link provided by the present invention, the management section in cluster
Point generates numbering M, and in cluster, other nodes in addition to management node all send the preparation request carrying numbering M;
Each node receives preparation request, judges whether numbering M carrying in preparation request is the maximum numbering receiving, and if so, enters
To SBR, send preparation request response to management node;If the number of the preparation request response that management node receives is big
In n/2, management node sends the information reception request carrying synchronizing information V to each node sending preparation request response;N is
The total number of all nodes in cluster;If the number that the information that management node receives in Preset Time receives request response is big
In n/2, each node that management node receives request response to the information of transmission sends success message;Receive each section of success message
Node status information is updated to synchronizing information V by point.It can be seen that, communicated with other nodes in cluster using management node, led to
Cross preparation request, preparation request response, information receives request, information receives and asks response and these requests of success message and respond
To complete the information synchronization mechanism between management node and other nodes, node status information is updated to synchronizing information, to realize
Synchronizing information is carried out to node, reaches node information synchronization unanimously, keep the concordance of data.
Above multi-node communication method in a kind of unstable communication link provided by the present invention is described in detail.
Specific case used herein is set forth to the principle of the present invention and embodiment, and the explanation of above example is to use
Understand the method for the present invention and its core concept in help.It should be pointed out that for those skilled in the art,
Under the premise without departing from the principles of the invention, the present invention can also be carried out with some improvement and modify, these improve and modify
Fall in the protection domain of the claims in the present invention.
Claims (8)
1. in a kind of unstable communication link multi-node communication method it is characterised in that include:
Management node in step 1, cluster generates numbering M, and in cluster, other nodes in addition to management node are all sent out
Send the preparation request carrying numbering M;M is positive integer, and M is more than or equal to 1;
Step 2, each node receive described preparation request, judge whether numbering M carrying in preparation request is the maximum receiving
Numbering, if so, enters into SBR, sends preparation request response to management node;
If the number of the preparation request response that step 3 management node receives is more than n/2, management node is to transmission preparation request
Each node of response sends the information reception request carrying synchronizing information V;N is the total number of all nodes in cluster;
If the number that the information that step 4 management node receives in Preset Time receives request response is more than n/2, management section
Each node that point receives request response to the information of transmission sends success message;
Node status information is updated to synchronizing information V by step 5, each node receiving success message.
2. the method for claim 1 is it is characterised in that before step 1, also include:
The node that ID is maximum or ID is minimum is selected from cluster by node ID sortord and is used as management node.
3. the method for claim 1, it is characterised in that in step 2, each node receives described preparation request, judges
After whether numbering M carrying in preparation request is the maximum numbering receiving, also include:
If numbering M carrying in standby request is not the maximum numbering receiving, send the maximum numbering having received to management node.
4. method as claimed in claim 3 is it is characterised in that after step 2, before step 3, also include:
Step 21:When management node receives the maximum numbering being sent by other nodes, regenerate numbering M+, return
Return step 1.
5. method as claimed in claim 4 is it is characterised in that step 3 also includes:
If the number of the preparation request response that management node receives is less than or equal to n/2, return to step 1.
6. the method for claim 1 is it is characterised in that after step 3, before step 4, also include:
Step 31:Each node that the information that receives receives request sends information reception request response to management node.
7. method as claimed in claim 6 is it is characterised in that step 4 also includes:
If the number that the information that management node receives in Preset Time receives request response is less than or equal to n/2, return to step
1.
8. method as claimed in any of claims 1 to 7 in one of claims is it is characterised in that after step 5, also include:
If management node detects one of cluster, node no responds all the time, and the node of no response all the time is removed cluster.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611040993.0A CN106453633A (en) | 2016-11-10 | 2016-11-10 | Communication method for multiple nodes in non-stable communication link |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611040993.0A CN106453633A (en) | 2016-11-10 | 2016-11-10 | Communication method for multiple nodes in non-stable communication link |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106453633A true CN106453633A (en) | 2017-02-22 |
Family
ID=58217986
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611040993.0A Pending CN106453633A (en) | 2016-11-10 | 2016-11-10 | Communication method for multiple nodes in non-stable communication link |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106453633A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107196786A (en) * | 2017-04-06 | 2017-09-22 | 阿里巴巴集团控股有限公司 | A kind of method and device for ensureing data consistency and availability |
CN115150031A (en) * | 2022-06-20 | 2022-10-04 | 中国工商银行股份有限公司 | Distributed system message response method and device based on distributed messages |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1812338A (en) * | 2005-01-28 | 2006-08-02 | 华为技术有限公司 | Method of inter master-slave nodal state synchronization |
CN103118084A (en) * | 2013-01-21 | 2013-05-22 | 浪潮(北京)电子信息产业有限公司 | Host node election method and node |
CN104243591A (en) * | 2014-09-24 | 2014-12-24 | 杭州华三通信技术有限公司 | Method and device for synchronizing session information of security cluster |
-
2016
- 2016-11-10 CN CN201611040993.0A patent/CN106453633A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1812338A (en) * | 2005-01-28 | 2006-08-02 | 华为技术有限公司 | Method of inter master-slave nodal state synchronization |
CN103118084A (en) * | 2013-01-21 | 2013-05-22 | 浪潮(北京)电子信息产业有限公司 | Host node election method and node |
CN104243591A (en) * | 2014-09-24 | 2014-12-24 | 杭州华三通信技术有限公司 | Method and device for synchronizing session information of security cluster |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107196786A (en) * | 2017-04-06 | 2017-09-22 | 阿里巴巴集团控股有限公司 | A kind of method and device for ensureing data consistency and availability |
CN115150031A (en) * | 2022-06-20 | 2022-10-04 | 中国工商银行股份有限公司 | Distributed system message response method and device based on distributed messages |
CN115150031B (en) * | 2022-06-20 | 2024-02-27 | 中国工商银行股份有限公司 | Distributed system message response method and device based on distributed message |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107465767B (en) | Data synchronization method and system | |
CN104243496B (en) | A kind of cross-domain TSM Security Agent method and system of software defined network | |
US7792153B2 (en) | Sequencing multi-source messages for delivery as partial sets to multiple destinations | |
CN104077181B (en) | A kind of state consistency maintaining method suitable for distributed task management system | |
US20190173596A1 (en) | Method for fast reconfiguration of gm clocks in the tsn network by means of an explicit teardown message | |
CN105959078B (en) | A kind of cluster method for synchronizing time, cluster and clock synchronization system | |
CN109450711A (en) | The choosing method of host node, device, system and storage medium in distributed system | |
CN108616455A (en) | A kind of route synchronization method of single machine pile system | |
EP2472793A1 (en) | Method, device and system for transmitting e1 bidirectional looped network data | |
CN106453633A (en) | Communication method for multiple nodes in non-stable communication link | |
CN106230622A (en) | A kind of cluster implementation method and device | |
CN105812492B (en) | A kind of method of data synchronization and system | |
EP2198567B1 (en) | Method for switching from a distributed principle to a master-slave principle in a network | |
KR101358995B1 (en) | Method and system for managing high availability | |
CN114039978B (en) | Decentralized PoW computing power cluster deployment method | |
CN114884805B (en) | Data transmission method, device, terminal and storage medium | |
JP3345546B2 (en) | Data delivery method and information communication device | |
KR101192896B1 (en) | Distributed synchronization method and apparatus for fault tolerance | |
CN111064622B (en) | Network device, synchronization apparatus, and information transmission method | |
CN107465536B (en) | Network management message automatic routing method and system based on multiplexing equipment | |
US20080211659A1 (en) | Apparatus and method for synchronizing alarm in fault management system | |
CN112994998A (en) | Communication node, communication method, communication device and electronic equipment | |
RU2450305C1 (en) | Software-hardware system for automating monitoring and control | |
CN111464346A (en) | Main and standby control board synchronization method and system based on ATCA (advanced telecom computing architecture) | |
CN107370612B (en) | Network quality management system detection task scheduling method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170222 |
|
RJ01 | Rejection of invention patent application after publication |