CN105763519A - Consistency control method, device and system - Google Patents

Consistency control method, device and system Download PDF

Info

Publication number
CN105763519A
CN105763519A CN201410795095.0A CN201410795095A CN105763519A CN 105763519 A CN105763519 A CN 105763519A CN 201410795095 A CN201410795095 A CN 201410795095A CN 105763519 A CN105763519 A CN 105763519A
Authority
CN
China
Prior art keywords
resolution
bag
receiver node
node
order
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
CN201410795095.0A
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201410795095.0A priority Critical patent/CN105763519A/en
Publication of CN105763519A publication Critical patent/CN105763519A/en
Pending legal-status Critical Current

Links

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

An embodiment of the invention discloses a consistency control method, device and system applied to a message transmission based negotiation process. The implementation of the method includes packaging an obtained decision and obtaining a decision packet after a coordination node obtains a decision, wherein the decision packet includes at least two decisions; sending the decision packet to a receiver node which is corresponding to decisions in the decision packet; receiving the confirmation information returned by the decision node and determining that the receiver node returning the confirmation information confirms the decisions corresponding to the confirmation information; determining whether the decisions in the decision packet are passed or not through negotiation according to the confirmation information returned by the receiver node; submitting the decisions in the decision packet if the decisions in the decision packet are passed through negotiation. At least two decisions can be negotiated in a single negotiation process, so that decision negotiation efficiency can be improved. Besides, requirements for communication protocols during a negotiation process can be reduced.

Description

A kind of concordance control method, Apparatus and system
Technical field
The present invention relates to communication technical field, particularly to a kind of concordance control method, Apparatus and system.
Background technology
Current distributed system can use consistency algorithm to ensure the data consistency of most nodes in distributed system.One general consistency algorithm can being applied in multiple distributed system scene is an important foundation sex chromosome mosaicism of distributed system.The problem that Paxos algorithm (consistency algorithm based on message transmission) solves is how distributed system reaches an agreement with regard to certain value (i.e. resolution).
One typical scene is: in distributed data base system, if the original state of each node is consistent, each node is carried out the identical sequence of operation, then they need have concordance at last getable state.For ensureing that each node performs identical command sequence, it is necessary to perform " consistency algorithm " in each instruction consistent with the instruction ensureing each node and obtaining.There are two kinds of models in node communication: shared drive (Sharedmemory) and message transmission (Messagespassing).Paxos algorithm is exactly a kind of consistency algorithm based on Message-Passing Model.
Usual Paxos algorithm includes three phases: (leader) node, recovery and negotiation are coordinated in election.The embodiment of the present invention is primarily related to based on what carry out when leader is chosen in outside, and whole algorithm is divided into two stages: recovers flow process and consults flow process.
Recovery flow process in Paxos algorithm is: new Leader specifies other nodes to learn to oneself.Most of nodes have kept consistent with Leader and have just initially entered negotiation flow process.
Negotiation flow process in Paxos algorithm is: Leader proposes resolution, and is sent to the negotiation of other nodes.After most of nodes agree to this resolution, submit resolution (namely executing a decision) to.Resolve different according to business difference, for instance: cloth data base can be SQL (StructuredQueryLanguage, SQL).
Assume now have 3 nodes (1 Leader and 2 Acceptor) in the cluster, wherein recover flow process as follows:
1) Leader sends and gathers (collect) request to all of receptor (Acceptor).
2) AcceptorB receives collect request.
3) AcceptorB performs to share information (share_state) and calculates the version gap with LeaderA, selects shared vision according to gap.
4) AcceptorB returns final (last) to LeaderA and asks to contain in last request version gap and the version of concrete difference.
5) AcceptorC receives collect request.
6) LeaderA is after the last receiving AcceptorB asks, and calculates last replys whether reach great majority.This 1 (LeaderA acquiescence counts)+1 (AcceptorB)=2 >=3/2+1 meets most condition.In present specification, "/" is to round symbol, and therefore the result of 3/2 is 1.
7) AcceptorC returns last request to LeaderA.
8) LeaderA performs merging (merge) operation, merges the AcceptorB version shared and the version of self to latest edition.
9) LeaderA sends latest edition to AcceptorB again.
Wherein negotiation phase is as follows:
1) first client submits a resolution to Leader (that is: LeaderA).
2), after LeaderA receives resolution, send respectively to node AcceptorB/C and start (begin) message.
3) AcceptorB writes acceptance (Accept) daily record to permanently store.
4) AcceptorB returns Accept message to LeaderA.
5) LeaderA is after the Accept receiving AcceptorB responds, and calculates whether Accept response reaches great majority.This 1 (LeaderA acquiescence counts)+1 (AcceptorB)=2 >=3/2+1 meets most condition.
6) LeaderA submits (commit) this resolution to.
7) LeaderA sends commit message to all nodes.
8) AcceptorB receives commit message, performs this resolution of commit.
Owing to the negotiation of resolution needs to carry out in order, also requiring that network is reliable, therefore current negotiations process is resolution to be held consultation one by one, and therefore unit interval treatable resolution bar number is few, therefore consults performance low.Require again network when implementing to adopt reliable host-host protocol, such as require to transmit based on transmission control protocol (TransmissionControlProtocol, TCP), limit use scene.
Summary of the invention
Embodiments provide a kind of concordance control method, Apparatus and system, for improving the negotiation efficiency of resolution, and reduce the negotiations process requirement to communication protocol.
The embodiment of the present invention provides a kind of concordance control method on the one hand, is applied to the negotiations process based on message transmission, including:
Coordinator node is after obtaining resolution, and the resolution that packing obtains obtains resolution bag;Described resolution bag comprises at least two resolution;
Sending described resolution bag to receiver node, described receiver node is the receiver node corresponding with the resolution in described resolution bag;
Receive the confirmation message that described receiver node returns, it is determined that return and confirm that the receiver node of message confirms the resolution that described confirmation message is corresponding;
According to the confirmation message that receiver node returns, it is determined that whether the resolution in described resolution bag is all consulted is passed through, and if so, then submits the resolution in described resolution bag to.
In conjunction with implementation on the one hand, in the first optional implementation, described send described resolution bag to receiver node and include:
Adopt require in order up to communication protocol send described resolution bag to receiver node;Or, adopt do not require in order up to communication protocol send described resolution bag to receiver node.
In conjunction with implementation on the one hand or the first optional implementation on the one hand, in the optional implementation of the second, described method also includes:
After send described resolution bag to receiver node, start intervalometer;
After described timer expiry, if still suffering from the resolution not consulting to pass through in described resolution bag, then determine that the receiver node of message sends described unsanctioned resolution to corresponding not the replying of resolution not consulting to pass through.
The embodiment of the present invention two aspect provides a kind of concordance control method, is applied to the negotiations process based on message transmission, including:
Receiver node receives the resolution bag from coordinator node, comprises at least two resolution in described resolution bag;
Whether the resolution determined successively in described resolution bag according to resolution negotiation order should confirm, if so, then replys to described coordinator node and confirms message, and specifies the resolution of confirmation in described confirmation message.
In conjunction with the implementation of two aspects, in the first optional implementation, the resolution bag that described receiver node receives from coordinator node includes:
Described receiver node receive adopt from coordinator node require in order up to the resolution bag that sends of communication protocol;Or, described receiver node receive adopt from coordinator node do not require in order up to the resolution bag that sends of communication protocol.
In conjunction with implementation or the first optional implementation on the one hand of two aspects, in the optional implementation of the second, if described resolution bag adopt do not require in order up to communication protocol send;
Whether the described resolution determined successively in described resolution bag according to resolution negotiation order should confirm to include:
After all resolutions in receiving described resolution bag, whether the resolution determined successively in described resolution bag according to resolution negotiation order should confirm;
Or, after any one resolution in receiving described resolution bag, determine that whether the resolution received is the resolution being currently needed for consulting according to resolution negotiation order, if it is not, then buffer memory, if, it is determined that whether the resolution received should confirm.
The embodiment of the present invention three aspect additionally provides a kind of coordinator node, is applied to the negotiations process based on message transmission, including:
Packaged unit, for after obtaining resolution, the resolution that packing obtains obtains resolution bag;Described resolution bag comprises at least two resolution;
Bag transmitting element, for sending described resolution bag to receiver node, described receiver node is the receiver node corresponding with the resolution in described resolution bag;
Confirm to receive unit, for receiving the confirmation message that described receiver node returns, it is determined that return and confirm that the receiver node of message confirms the resolution that described confirmation message is corresponding;
Submission control unit, for the confirmation message returned according to receiver node, it is determined that whether the resolution in described resolution bag is all consulted is passed through, and if so, then submits the resolution in described resolution bag to.
In conjunction with the implementation of three aspects, in the first optional implementation, described bag transmitting element, specifically for adopt require in order up to communication protocol send described resolution bag to receiver node;Or, adopt do not require in order up to communication protocol send described resolution bag to receiver node.
In conjunction with implementation or the first optional implementation on the one hand of three aspects, in the optional implementation of the second, described coordinator node also includes:
Timer units, for, after described bag transmitting element sends described resolution bag to receiver node, starting intervalometer;
Described bag transmitting element, is additionally operable to after described timer expiry, if still suffering from the resolution not consulting to pass through in described resolution bag, then determines that the receiver node of message sends described unsanctioned resolution to corresponding not the replying of resolution not consulting to pass through.
The embodiment of the present invention four aspect additionally provides a kind of receiver node, is applied to the negotiations process based on message transmission, including:
Bag receives unit, for receiving the resolution bag from coordinator node, comprises at least two resolution in described resolution bag;
Resolution control unit, for whether the resolution determined successively in described resolution bag according to resolution negotiation order should confirm;
Confirm transmitting element, if determining that result is yes for described resolution control unit, then reply to described coordinator node and confirm message, and in described confirmation message, specify the resolution of confirmation.
In conjunction with the implementation of four aspects, in the optional implementation of the second, described bag receives unit, receive specifically for described receiver node adopt from coordinator node require in order up to the resolution bag that sends of communication protocol;Or, described receiver node receive adopt from coordinator node do not require in order up to the resolution bag that sends of communication protocol.
In conjunction with implementation or the first optional implementation on the one hand of four aspects, in the optional implementation of the second, if described resolution bag adopt do not require in order up to communication protocol send;
Described resolution control unit, for after described bag receives all resolutions that unit receives in described resolution bag, whether the resolution determined successively in described resolution bag according to resolution negotiation order should confirm;
Or,
According to resolution negotiation order, described resolution control unit, for, after described bag receives any one resolution that unit receives in described resolution bag, determining whether the resolution received is the resolution being currently needed for consulting, if not, then buffer memory, if, it is determined that whether the resolution received should confirm.
The embodiment of the present invention five aspect additionally provides a kind of concordance and controls system, including: coordinator node and receiver node, it is applied to the negotiations process based on message transmission, the coordinator node of any one that described coordinator node provides for the embodiment of the present invention, the receiver node of any one that described receiver node provides for the embodiment of the present invention.
As can be seen from the above technical solutions, the embodiment of the present invention has the advantage that due at least two resolution of having packed in resolution bag, the resolution once decided by vote in receiver node side so accordingly can have at least two, so once consult flow process and can consult at least two resolution, therefore can improve the negotiation efficiency of resolution.And two resolutions are being sent to receiver node, coordinator node only it is to be understood that the negotiation result of each resolution just, and is not required to each resolution and arrives receiver node according to the order of sequence, therefore can reduce the negotiations process requirement to communication protocol.
Accompanying drawing explanation
In order to be illustrated more clearly that the technical scheme in the embodiment of the present invention, below the accompanying drawing used required during embodiment is described is briefly introduced, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the premise not paying creative work, it is also possible to obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is embodiment of the present invention method flow schematic diagram;
Fig. 2 is embodiment of the present invention method flow schematic diagram;
Fig. 3 is that schematic diagram consuming time is consulted in embodiment of the present invention resolution;
Fig. 4 is embodiment of the present invention cluster module relation schematic diagram;
Fig. 5 is embodiment of the present invention method flow schematic diagram;
Fig. 6 is embodiment of the present invention method flow schematic diagram;
Fig. 7 is embodiment of the present invention coordinator node structural representation;
Fig. 8 is embodiment of the present invention coordinator node structural representation;
Fig. 9 is embodiment of the present invention receiver node structural representation;
Figure 10 is embodiment of the present invention system structure schematic diagram;
Figure 11 is embodiment of the present invention coordinator node structural representation;
Figure 12 is embodiment of the present invention receiver node structural representation.
Detailed description of the invention
In order to make the object, technical solutions and advantages of the present invention clearly, below in conjunction with accompanying drawing, the present invention is described in further detail, it is clear that described embodiment is only some embodiments of the present invention, rather than whole embodiments.Based on the embodiment in the present invention, all other embodiments that those of ordinary skill in the art obtain under not making creative work premise, broadly fall into the scope of protection of the invention.
Embodiments provide a kind of concordance control method, be applied to the negotiations process based on message transmission, as it is shown in figure 1, include:
101: coordinator node is after obtaining resolution, and the resolution that packing obtains obtains resolution bag;Above-mentioned resolution bag comprises at least two resolution;
The Leader that coordinator node is elected, other nodes participating in consulting are then receptor (Acceptor) nodes.Each resolution in resolution bag should have identical receiver node.The resolution quantity of resolution bag the inside generally can have tens, and its quantity can be that this is not limited by the embodiment of the present invention arbitrarily set.
102: send above-mentioned resolution bag to receiver node, above-mentioned receiver node is the receiver node corresponding with the resolution in above-mentioned resolution bag;
The receiver node that resolution is corresponding, it is simply that need to participate in the receiver node that this resolution is consulted.Receiver node has at least one, so the receiver node in this step is a general term, does not refer to a receiver node.
In the present embodiment, what adopt is that the form that resolution is wrapped is sent to receiver node, therefore being not required to necessarily adopt the agreement of TCP class, the scheme sending resolution bag that therefore embodiment of the present invention provides can be such that and above-mentioned send above-mentioned resolution bag to receiver node and include: adopt require in order up to communication protocol send above-mentioned resolution bag to receiver node;Or, adopt do not require in order up to communication protocol send above-mentioned resolution bag to receiver node.
Require in order up to communication protocol can be TCP etc., do not require in order up to communication protocol can such as UDP (UserDatagramProtocol, UDP) etc., the communicating requirement of various agreements is well-known to those skilled in the art, and therefore the present embodiment differs a citing.
103: receive the confirmation message that above-mentioned receiver node returns, it is determined that return and confirm that the receiver node of message confirms the resolution that above-mentioned confirmation message is corresponding;
Can specify this confirmation message in above-mentioned confirmation message is the confirmation to which resolution.
104: the confirmation message returned according to receiver node, it is determined that whether the resolution in above-mentioned resolution bag is all consulted is passed through, and if so, then submits the resolution in above-mentioned resolution bag to.
In the present embodiment, due at least two resolution of having packed in resolution bag, the resolution once decided by vote in receiver node side so accordingly can have at least two, then once consults flow process and can consult at least two resolution, therefore can improve the negotiation efficiency of resolution.And two resolutions are being sent to receiver node, coordinator node only it is to be understood that the negotiation result of each resolution just, and is not required to each resolution and arrives receiver node according to the order of sequence, therefore can reduce the negotiations process requirement to communication protocol.
Further, owing to the embodiment of the present invention can not use the agreement of TCP class to carry out the transmission resolved, it is thus possible to out of order situation occurs, it is also possible to the situation of packet loss occurs, embodiments provides solution as follows: said method also includes:
After sending above-mentioned resolution bag to receiver node, start intervalometer;
After above-mentioned timer expiry, if still suffering from the resolution not consulting to pass through in above-mentioned resolution bag, then determine that the receiver node of message sends above-mentioned unsanctioned resolution to corresponding not the replying of resolution not consulting to pass through.
The embodiment of the present invention additionally provides another kind of concordance control method, is applied to the negotiations process based on message transmission, as in figure 2 it is shown, include:
201: receiver node receives the resolution bag from coordinator node, comprise at least two resolution in above-mentioned resolution bag;
Owing to resolution bag the inside contains at least two resolution, therefore need the packaging operation of resolution is obtained above-mentioned resolution bag at coordinator node.
In the present embodiment, what adopt is that the form that resolution is wrapped is sent to receiver node, therefore being not required to necessarily adopt the agreement of TCP class, the scheme sending resolution bag that therefore embodiment of the present invention provides can be such that the resolution bag that above-mentioned receiver node receives from coordinator node includes:
Above-mentioned receiver node receive adopt from coordinator node require in order up to the resolution bag that sends of communication protocol;Or, above-mentioned receiver node receive adopt from coordinator node do not require in order up to the resolution bag that sends of communication protocol.
202: determine whether the resolution in above-mentioned resolution bag should confirm successively according to resolution negotiation order, if so, then reply to above-mentioned coordinator node and confirm message, and in above-mentioned confirmation message, specify the resolution of confirmation.
Due at least two resolution of having packed in resolution bag, then the resolution that receiver node is once decided by vote can have at least two, then once consult flow process and can consult at least two resolution, therefore can improve the negotiation efficiency of resolution.And two resolutions are being sent to receiver node, coordinator node only it is to be understood that the negotiation result of each resolution just, and is not required to each resolution and arrives receiver node according to the order of sequence, therefore can reduce the negotiations process requirement to communication protocol.
Additionally, if coordinator node determines that negotiation is passed through, so receiver node can receive the submission information of resolution in above-mentioned resolution bag, coordinator node is performing submission process, as in the operating process such as business lower wall, arrive the order of receiver node regardless of the submission information resolved, receiver node is required for performing submission successively according to the negotiation order of resolution.
If adopt do not require in order up to communication protocol, then resolution, it may happen that the situation of out of order even packet loss, embodiments provides solution based on this as follows: if above-mentioned resolution bag adopt do not require in order up to communication protocol send;
Above-mentioned according to resolution negotiation order determine whether the resolution in above-mentioned resolution bag should confirm to include successively:
After all resolutions in receiving above-mentioned resolution bag, determine whether the resolution in above-mentioned resolution bag should confirm successively according to resolution negotiation order;
Or, after any one resolution in receiving above-mentioned resolution bag, determine that whether the resolution received is the resolution being currently needed for consulting according to resolution negotiation order, if it is not, then buffer memory, if, it is determined that whether the resolution received should confirm.
The embodiment of the present invention relates generally to following Railway Project:
(1) adopt in the packing of leader node, application (proposal) packing is carried out negotiation table certainly, once decides by vote the proposal of a bag (batch).The method can greatly promote handling capacity.
(2) adopting Concurrent negotiation at leader node, decide by vote multiple proposal concomitantly, the method can promote handling capacity significantly.
(3) can every time packing and the content concurrently sent be numbered, repeatings transmission of host node time-out, main-standby nodes all caching process etc. realize the synchronization of paxos high-performance data on unreliable network.
The embodiment of the present invention also uses caching process, time-out is retransmitted and guaranteed that paxos is by utilizing " packing " and " concurrently " to promote the process performance of paxos under network type restrictive condition.
Packing (Batching) technology that Paxos uses, its principle is to receive, at Leader end, a plurality of resolution that client (Client) is submitted to, with the strategy of certain time and packing size restriction, bag is played in a plurality of resolution and is dealt into receiver node and completes resolution voting and business lower wall.
Concurrent (Pipelining) technology that Paxos uses, when its principle is to utilize the Internet communication time delay relative business process time big, when waiting propagation, carries out transmission of next resolution.Sending and the succession of receiving terminal guarantee message.
As shown in Figure 3, wherein left side is streamline (Pipelining) right side is the schematic diagram of (Batching) in batches, in the schematic diagram of Fig. 3, left side is the time that two resolutions adopt that negotiation mode needs one by one, so require time for being i+1, two resolutions are bundled to a resolution bag the inside by right side, all consulting complete requiring time for is i, so more saving the time.In practical operation, a resolution bag can be packed any number of resolution, and two resolution citings of the present embodiment should not be construed as the restriction to the embodiment of the present invention.
As shown in Figure 4, for typical case's Paxos cluster module relation schematic diagram, comprise a coordinator node and several receiver nodes, in subsequent embodiment, receiver node is two, and actually receiver node can have a lot, and citing should not be construed as the uniqueness to the invention process example and limits.Subsequent embodiment by introduce respectively when packing resolution out of order, lose packing resolution how to realize Paxos normal negotiations process.
This scene is for, in packing transmitted in parallel, having bag contents lost, and flow process is as it is shown in figure 5, as follows:
Resolution is consulted in 501:Leader packing, is numbered 1,2,3.
502:Leader starts intervalometer.
AcceptorA, AcceptorB are given in 503:Leader transmitted in parallel packing resolution 1,2,3.
504:AcceptorA receives packing resolution 1 buffer memory and replys ACK.
505:AcceptorB receives packing resolution 1 buffer memory and replys ACK.
506:AcceptorA receives packing resolution 2 buffer memory and replys ACK.
507:AcceptorB receives packing resolution 2 buffer memory and replys ACK.
508:AcceptorA receives packing resolution 3 buffer memory and replys ACK.
509: regularly device time-out.
510:Leader finds that AcceptorB does not also reply the ACK of packing resolution 3, again sends packing resolution 3 to AcceptorB, waits that it is replied.
511: receive the packing of AcceptorB 3 buffer memorys of resolving and reply ACK.
512: send the message submitting (Commit) to AcceptorA, AcceptorB.
After AcceptorA, AcceptorB receive Commit message, difference lower wall record is resolved, and has consulted.
The embodiment of the present invention additionally provides packing and resolves out of order process, and as shown in Figure 6, this figure is the packing resolution of Leader transmitted in parallel, but due to use UDP class need not in order up to agreement, therefore resolution order is chaotic, and idiographic flow is as follows:
Resolution is consulted in 601:Leader packing, is numbered 1,2,3.
602:Leader starts intervalometer.
603:Leader transmitted in parallel resolution bag 1,2,3 gives AcceptorA, AcceptorB.
604:AcceptorA receives packing resolution 2 buffer memorys.
605:AcceptorB receives packing resolution 3 buffer memorys.
606:AcceptorA receives packing resolution 3 buffer memorys.
607:AcceptorA receives packing resolution 1 buffer memory.
608:AcceptorB receives packing resolution 1 buffer memory.
609:AcceptorB receives packing resolution 2 buffer memorys.
610:AcceptorA replys packing resolution 2ACK.
611:AcceptorA replys packing resolution 3ACK.
612:AcceptorA replys packing resolution 1ACK.
613:AcceptorB replys packing resolution 3ACK.
614:AcceptorB replys packing resolution 1ACK.
615:AcceptorB replys packing resolution 2ACK.
616:Leader checks that AcceptorA, AcceptorBACK are all normal.Leader sends Commit information to AcceptorB and AcceptorA.
AcceptorB receives lower wall record resolution information after Commit information.AcceptorA receives lower wall record resolution information after Commit information.Negotiation completes.
The scheme of the embodiment of the present invention, it is possible to promote the negotiation performance of paxos in insecure network environment, thus being effectively lifted in the unit interval, carries out the quantity of the many copies synchronized of data between multinode in distributed system.
The embodiment of the present invention also provides for giving a kind of coordinator node, is applied to the negotiations process based on message transmission, as it is shown in fig. 7, comprises:
Packaged unit 701, for after obtaining resolution, the resolution that packing obtains obtains resolution bag;Above-mentioned resolution bag comprises at least two resolution;
Bag transmitting element 702, for sending above-mentioned resolution bag to receiver node, above-mentioned receiver node is the receiver node corresponding with the resolution in above-mentioned resolution bag;
Confirm to receive unit 703, for receiving the confirmation message that above-mentioned receiver node returns, it is determined that return and confirm that the receiver node of message confirms the resolution that above-mentioned confirmation message is corresponding;
Submission control unit 704, for the confirmation message returned according to receiver node, it is determined that whether the resolution in above-mentioned resolution bag is all consulted is passed through, and if so, then submits the resolution in above-mentioned resolution bag to.
The Leader that coordinator node is elected, other nodes participating in consulting are then receptor (Acceptor) nodes.Each resolution in resolution bag should have identical receiver node.The resolution quantity of resolution bag the inside generally can have tens, and its quantity can be that this is not limited by the embodiment of the present invention arbitrarily set.
In the present embodiment, due at least two resolution of having packed in resolution bag, the resolution once decided by vote in receiver node side so accordingly can have at least two, then once consults flow process and can consult at least two resolution, therefore can improve the negotiation efficiency of resolution.And two resolutions are being sent to receiver node, coordinator node only it is to be understood that the negotiation result of each resolution just, and is not required to each resolution and arrives receiver node according to the order of sequence, therefore can reduce the negotiations process requirement to communication protocol.
In the present embodiment, what adopt is that the form that resolution is wrapped is sent to receiver node, therefore it is not required to necessarily adopt the agreement of TCP class, therefore the scheme sending resolution bag that the embodiment of the present invention provides can be such that alternatively, above-mentioned bag transmitting element 702, specifically for adopt require in order up to communication protocol send above-mentioned resolution bag to receiver node;Or, adopt do not require in order up to communication protocol send above-mentioned resolution bag to receiver node.
Require in order up to communication protocol can be TCP etc., do not require in order up to communication protocol can such as UDP (UserDatagramProtocol, UDP) etc., the communicating requirement of various agreements is well-known to those skilled in the art, and therefore the present embodiment differs a citing.
Further, owing to the embodiment of the present invention can not use the agreement of TCP class to carry out the transmission resolved, it is thus possible to out of order situation occurs, it is also possible to the situation of packet loss occurs, embodiments providing solution as follows: as shown in Figure 8, above-mentioned coordinator node also includes:
Timer units 801, for, after above-mentioned bag transmitting element 702 sends above-mentioned resolution bag to receiver node, starting intervalometer;
Above-mentioned bag transmitting element 702, is additionally operable to after above-mentioned timer expiry, if still suffering from the resolution not consulting to pass through in above-mentioned resolution bag, then determines that the receiver node of message sends above-mentioned unsanctioned resolution to corresponding not the replying of resolution not consulting to pass through.
The embodiment of the present invention additionally provides a kind of receiver node, is applied to the negotiations process based on message transmission, as it is shown in figure 9, include:
Bag receives unit 901, for receiving the resolution bag from coordinator node, comprises at least two resolution in above-mentioned resolution bag;
According to resolution negotiation order, resolution control unit 902, for determining whether the resolution in above-mentioned resolution bag should confirm successively;
Confirm transmitting element 903, if determining that result is yes for above-mentioned resolution control unit 902, then reply to above-mentioned coordinator node and confirm message, and in above-mentioned confirmation message, specify the resolution of confirmation.
Owing to resolution bag the inside contains at least two resolution, therefore need the packaging operation of resolution is obtained above-mentioned resolution bag at coordinator node.
Due at least two resolution of having packed in resolution bag, then the resolution that receiver node is once decided by vote can have at least two, then once consult flow process and can consult at least two resolution, therefore can improve the negotiation efficiency of resolution.And two resolutions are being sent to receiver node, coordinator node only it is to be understood that the negotiation result of each resolution just, and is not required to each resolution and arrives receiver node according to the order of sequence, therefore can reduce the negotiations process requirement to communication protocol.
In the present embodiment, what adopt is that the form that resolution is wrapped is sent to receiver node, therefore it is not required to necessarily adopt the agreement of TCP class, therefore the scheme sending resolution bag that the embodiment of the present invention provides can be such that above-mentioned bag receives unit 901, receive specifically for above-mentioned receiver node adopt from coordinator node require in order up to the resolution bag that sends of communication protocol;Or, above-mentioned receiver node receive adopt from coordinator node do not require in order up to the resolution bag that sends of communication protocol.
If adopt do not require in order up to communication protocol, then resolution, it may happen that the situation of out of order even packet loss, embodiments provides solution based on this as follows: if above-mentioned resolution bag adopt do not require in order up to communication protocol send;
According to resolution negotiation order, above-mentioned resolution control unit 902, for, after above-mentioned bag reception unit receives all resolutions in above-mentioned resolution bag, determining whether the resolution in above-mentioned resolution bag should confirm successively;
Or,
Above-mentioned resolution control unit 902, for after above-mentioned bag receives any one resolution that unit receives in above-mentioned resolution bag, determine whether the resolution received is the resolution being currently needed for consulting according to resolution negotiation order, if not, then buffer memory, if, it is determined that whether the resolution received should confirm.
The embodiment of the present invention additionally provides a kind of concordance and controls system, as shown in Figure 10, including: coordinator node 1001 and receiver node 1002, it is applied to the negotiations process based on message transmission, the coordinator node of any one that above-mentioned coordinator node 1001 provides for the embodiment of the present invention, the receiver node of any one that above-mentioned receiver node 1002 provides for the embodiment of the present invention.
The embodiment of the present invention additionally provides another kind of coordinator node, as shown in figure 11, including: receptor 1101, emitter 1102, processor 1103 and memorizer 1104;
Wherein, above-mentioned processor 1103, for after obtaining resolution, the resolution that packing obtains obtains resolution bag;Above-mentioned resolution bag comprises at least two resolution;Sending above-mentioned resolution bag to receiver node, above-mentioned receiver node is the receiver node corresponding with the resolution in above-mentioned resolution bag;Receive the confirmation message that above-mentioned receiver node returns, it is determined that return and confirm that the receiver node of message confirms the resolution that above-mentioned confirmation message is corresponding;According to the confirmation message that receiver node returns, it is determined that whether the resolution in above-mentioned resolution bag is all consulted is passed through, and if so, then submits the resolution in above-mentioned resolution bag to.
The Leader that coordinator node is elected, other nodes participating in consulting are then receptor (Acceptor) nodes.Each resolution in resolution bag should have identical receiver node.The resolution quantity of resolution bag the inside generally can have tens, and its quantity can be that this is not limited by the embodiment of the present invention arbitrarily set.
The receiver node that resolution is corresponding, it is simply that need to participate in the receiver node that this resolution is consulted.Receiver node has at least one, so the receiver node in this step is a general term, does not refer to a receiver node.
In the present embodiment, due at least two resolution of having packed in resolution bag, the resolution once decided by vote in receiver node side so accordingly can have at least two, then once consults flow process and can consult at least two resolution, therefore can improve the negotiation efficiency of resolution.And two resolutions are being sent to receiver node, coordinator node only it is to be understood that the negotiation result of each resolution just, and is not required to each resolution and arrives receiver node according to the order of sequence, therefore can reduce the negotiations process requirement to communication protocol.
In the present embodiment, what adopt is that the form that resolution is wrapped is sent to receiver node, therefore it is not required to necessarily adopt the agreement of TCP class, therefore the scheme sending resolution bag that the embodiment of the present invention provides can be such that above-mentioned processor 1103, includes for sending above-mentioned resolution bag to receiver node: adopt require in order up to communication protocol send above-mentioned resolution bag to receiver node;Or, adopt do not require in order up to communication protocol send above-mentioned resolution bag to receiver node.
Further, owing to the embodiment of the present invention can not use the agreement of TCP class to carry out the transmission resolved, therefore out of order situation it is likely to occur, it is also possible that the situation of packet loss, embodiments provide solution as follows: above-mentioned processor 1103, it is additionally operable to, after sending above-mentioned resolution bag to receiver node, start intervalometer;After above-mentioned timer expiry, if still suffering from the resolution not consulting to pass through in above-mentioned resolution bag, then determine that the receiver node of message sends above-mentioned unsanctioned resolution to corresponding not the replying of resolution not consulting to pass through.
The embodiment of the present invention additionally provides another kind of receiver node, as shown in figure 12, including: receptor 1201, emitter 1202, processor 1203 and memorizer 1204;
Wherein, above-mentioned processor 1103, for receiving the resolution bag from coordinator node, in above-mentioned resolution bag, comprise at least two resolution;Determine whether the resolution in above-mentioned resolution bag should confirm successively according to resolution negotiation order, if so, then reply to above-mentioned coordinator node and confirm message, and in above-mentioned confirmation message, specify the resolution of confirmation.
Due at least two resolution of having packed in resolution bag, then the resolution that receiver node is once decided by vote can have at least two, then once consult flow process and can consult at least two resolution, therefore can improve the negotiation efficiency of resolution.And two resolutions are being sent to receiver node, coordinator node only it is to be understood that the negotiation result of each resolution just, and is not required to each resolution and arrives receiver node according to the order of sequence, therefore can reduce the negotiations process requirement to communication protocol.
In the present embodiment, what adopt is that the form that resolution is wrapped is sent to receiver node, therefore it is not required to necessarily adopt the agreement of TCP class, therefore the scheme sending resolution bag that the embodiment of the present invention provides can be such that above-mentioned processor 1103, receives for receiver node and includes from the resolution bag of coordinator node: receive adopt from coordinator node require in order up to the resolution bag that sends of communication protocol;Or, receive adopt from coordinator node do not require in order up to the resolution bag that sends of communication protocol.
Additionally, if coordinator node determines that negotiation is passed through, so receiver node can receive the submission information of resolution in above-mentioned resolution bag, coordinator node is performing submission process, as in the operating process such as business lower wall, arrive the order of receiver node regardless of the submission information resolved, receiver node is required for performing submission successively according to the negotiation order of resolution.
If adopt do not require in order up to communication protocol, then resolution, it may happen that the situation of out of order even packet loss, embodiments provides solution based on this as follows: if above-mentioned resolution bag adopt do not require in order up to communication protocol send;
Above-mentioned processor 1103, for determining whether the resolution in above-mentioned resolution bag should confirm to include successively according to resolution negotiation order:
After all resolutions in receiving above-mentioned resolution bag, determine whether the resolution in above-mentioned resolution bag should confirm successively according to resolution negotiation order;
Or, after any one resolution in receiving above-mentioned resolution bag, determine that whether the resolution received is the resolution being currently needed for consulting according to resolution negotiation order, if it is not, then buffer memory, if, it is determined that whether the resolution received should confirm.
Those skilled in the art is it can be understood that arrive, for convenience and simplicity of description, the system of foregoing description, the specific works process of device and unit, it is possible to reference to the corresponding process in preceding method embodiment, do not repeat them here.
In several embodiments provided herein, it should be understood that disclosed system, apparatus and method, it is possible to realize by another way.Such as, device embodiment described above is merely schematic, such as, the division of described unit, being only a kind of logic function to divide, actual can have other dividing mode when realizing, for instance multiple unit or assembly can in conjunction with or be desirably integrated into another system, or some features can ignore, or do not perform.Another point, shown or discussed coupling each other or direct-coupling or communication connection can be through INDIRECT COUPLING or the communication connection of some interfaces, device or unit, it is possible to be electrical, machinery or other form.
The described unit illustrated as separating component can be or may not be physically separate, and the parts shown as unit can be or may not be physical location, namely may be located at a place, or can also be distributed on multiple NE.Some or all of unit therein can be selected according to the actual needs to realize the purpose of the present embodiment scheme.
It addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, it is also possible to be that unit is individually physically present, it is also possible to two or more unit are integrated in a unit.Above-mentioned integrated unit both can adopt the form of hardware to realize, it would however also be possible to employ the form of SFU software functional unit realizes.
If described integrated unit is using the form realization of SFU software functional unit and as independent production marketing or use, it is possible to be stored in a computer read/write memory medium.Based on such understanding, part or all or part of of this technical scheme that prior art is contributed by technical scheme substantially in other words can embody with the form of software product, this computer software product is stored in a storage medium, including some instructions with so that a computer equipment (can be personal computer, server, or the network equipment etc.) perform all or part of step of method described in each embodiment of the present invention.And aforesaid storage medium includes: USB flash disk, portable hard drive, read only memory (ROM, Read-OnlyMemory), the various media that can store program code such as random access memory (RAM, RandomAccessMemory), magnetic disc or CD.
The above, above example only in order to technical scheme to be described, is not intended to limit;Although the present invention being described in detail with reference to previous embodiment, it will be understood by those within the art that: the technical scheme described in foregoing embodiments still can be modified by it, or wherein portion of techniques feature is carried out equivalent replacement;And these amendments or replacement, do not make the essence of appropriate technical solution depart from the spirit and scope of various embodiments of the present invention technical scheme.

Claims (13)

1. a concordance control method, is applied to the negotiations process based on message transmission, it is characterised in that including:
Coordinator node is after obtaining resolution, and the resolution that packing obtains obtains resolution bag;Described resolution bag comprises at least two resolution;
Sending described resolution bag to receiver node, described receiver node is the receiver node corresponding with the resolution in described resolution bag;
Receive the confirmation message that described receiver node returns, it is determined that return and confirm that the receiver node of message confirms the resolution that described confirmation message is corresponding;
According to the confirmation message that receiver node returns, it is determined that whether the resolution in described resolution bag is all consulted is passed through, and if so, then submits the resolution in described resolution bag to.
2. method according to claim 1, it is characterised in that described send described resolution bag to receiver node and include:
Adopt require in order up to communication protocol send described resolution bag to receiver node;Or, adopt do not require in order up to communication protocol send described resolution bag to receiver node.
3. method according to claim 1 or claim 2, it is characterised in that described method also includes:
After send described resolution bag to receiver node, start intervalometer;
After described timer expiry, if still suffering from the resolution not consulting to pass through in described resolution bag, then determine that the receiver node of message sends described unsanctioned resolution to corresponding not the replying of resolution not consulting to pass through.
4. a concordance control method, is applied to the negotiations process based on message transmission, it is characterised in that including:
Receiver node receives the resolution bag from coordinator node, comprises at least two resolution in described resolution bag;
Whether the resolution determined successively in described resolution bag according to resolution negotiation order should confirm, if so, then replys to described coordinator node and confirms message, and specifies the resolution of confirmation in described confirmation message.
5. method according to claim 4, it is characterised in that the resolution bag that described receiver node receives from coordinator node includes:
Described receiver node receive adopt from coordinator node require in order up to the resolution bag that sends of communication protocol;Or, described receiver node receive adopt from coordinator node do not require in order up to the resolution bag that sends of communication protocol.
6. method according to claim 4 or 5, it is characterised in that if described resolution bag adopt do not require in order up to communication protocol send;
Whether the described resolution determined successively in described resolution bag according to resolution negotiation order should confirm to include:
After all resolutions in receiving described resolution bag, whether the resolution determined successively in described resolution bag according to resolution negotiation order should confirm;
Or, after any one resolution in receiving described resolution bag, determine that whether the resolution received is the resolution being currently needed for consulting according to resolution negotiation order, if it is not, then buffer memory, if, it is determined that whether the resolution received should confirm.
7. a coordinator node, is applied to the negotiations process based on message transmission, it is characterised in that including:
Packaged unit, for after obtaining resolution, the resolution that packing obtains obtains resolution bag;Described resolution bag comprises at least two resolution;
Bag transmitting element, for sending described resolution bag to receiver node, described receiver node is the receiver node corresponding with the resolution in described resolution bag;
Confirm to receive unit, for receiving the confirmation message that described receiver node returns, it is determined that return and confirm that the receiver node of message confirms the resolution that described confirmation message is corresponding;
Submission control unit, for the confirmation message returned according to receiver node, it is determined that whether the resolution in described resolution bag is all consulted is passed through, and if so, then submits the resolution in described resolution bag to.
8. coordinator node according to claim 7, it is characterised in that
Described bag transmitting element, specifically for adopt require in order up to communication protocol send described resolution bag to receiver node;Or, adopt do not require in order up to communication protocol send described resolution bag to receiver node.
9. coordinator node according to claim 7 or 8, it is characterised in that described coordinator node also includes:
Timer units, for, after described bag transmitting element sends described resolution bag to receiver node, starting intervalometer;
Described bag transmitting element, is additionally operable to after described timer expiry, if still suffering from the resolution not consulting to pass through in described resolution bag, then determines that the receiver node of message sends described unsanctioned resolution to corresponding not the replying of resolution not consulting to pass through.
10. a receiver node, is applied to the negotiations process based on message transmission, it is characterised in that including:
Bag receives unit, for receiving the resolution bag from coordinator node, comprises at least two resolution in described resolution bag;
Resolution control unit, for whether the resolution determined successively in described resolution bag according to resolution negotiation order should confirm;
Confirm transmitting element, if determining that result is yes for described resolution control unit, then reply to described coordinator node and confirm message, and in described confirmation message, specify the resolution of confirmation.
11. receiver node according to claim 10, it is characterised in that
Described bag receives unit, receive specifically for described receiver node adopt from coordinator node require in order up to the resolution bag that sends of communication protocol;Or, described receiver node receive adopt from coordinator node do not require in order up to the resolution bag that sends of communication protocol.
12. receiver node according to claim 10 or 11, it is characterised in that if described resolution bag adopt do not require in order up to communication protocol send;
Described resolution control unit, for after described bag receives all resolutions that unit receives in described resolution bag, whether the resolution determined successively in described resolution bag according to resolution negotiation order should confirm;
Or,
According to resolution negotiation order, described resolution control unit, for, after described bag receives any one resolution that unit receives in described resolution bag, determining whether the resolution received is the resolution being currently needed for consulting, if not, then buffer memory, if, it is determined that whether the resolution received should confirm.
13. a concordance controls system, including: coordinator node and receiver node, it is applied to the negotiations process based on message transmission, it is characterized in that, described coordinator node is the coordinator node of claim 9~10 any one, and described receiver node is the receiver node of claim 11 to 12 any one.
CN201410795095.0A 2014-12-18 2014-12-18 Consistency control method, device and system Pending CN105763519A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410795095.0A CN105763519A (en) 2014-12-18 2014-12-18 Consistency control method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410795095.0A CN105763519A (en) 2014-12-18 2014-12-18 Consistency control method, device and system

Publications (1)

Publication Number Publication Date
CN105763519A true CN105763519A (en) 2016-07-13

Family

ID=56340801

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410795095.0A Pending CN105763519A (en) 2014-12-18 2014-12-18 Consistency control method, device and system

Country Status (1)

Country Link
CN (1) CN105763519A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106547610A (en) * 2016-10-11 2017-03-29 北京国电通网络技术有限公司 The method and system that a kind of distributed transaction is submitted to
CN110753005A (en) * 2019-10-17 2020-02-04 腾讯科技(深圳)有限公司 Speed limiting method, device and system, electronic equipment and computer readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1659500A2 (en) * 2004-11-23 2006-05-24 Microsoft Corporation Generalized paxos
CN102882927A (en) * 2012-08-29 2013-01-16 华南理工大学 Cloud storage data synchronizing framework and implementing method thereof
CN103200116A (en) * 2013-04-28 2013-07-10 成都市欧冠信息技术有限责任公司 Non-connection-oriented reliable UDP transmission protocol and data transmission method
CN103914313A (en) * 2012-12-31 2014-07-09 北京新媒传信科技有限公司 Paxos example updating method, device and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1659500A2 (en) * 2004-11-23 2006-05-24 Microsoft Corporation Generalized paxos
CN102882927A (en) * 2012-08-29 2013-01-16 华南理工大学 Cloud storage data synchronizing framework and implementing method thereof
CN103914313A (en) * 2012-12-31 2014-07-09 北京新媒传信科技有限公司 Paxos example updating method, device and system
CN103200116A (en) * 2013-04-28 2013-07-10 成都市欧冠信息技术有限责任公司 Non-connection-oriented reliable UDP transmission protocol and data transmission method

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
HUA CHAI: "PERFORMANCE ENGINEERING OF A LIGHTWEIGHT FAULT TOLERANCE FRAMEWORK", 《HTTPS://ETD.OHIOLINK.EDU/PG_10?0::NO:10:P10_ACCESSION_NUM:CSU1260912144》 *
NUNO SANTOS: "Optimizing Paxos with batching and pipelining", 《THEORETICAL COMPUTER SCIENCE》 *
PARISA JALILI MARANDI: "Ring Paxos: High-Throughput Atomic Broadcast", 《IEEE/IFIP INTERNATIONAL CONFERENCE ON DEPENDABLE SYSTEMS & NETWORKS》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106547610A (en) * 2016-10-11 2017-03-29 北京国电通网络技术有限公司 The method and system that a kind of distributed transaction is submitted to
CN110753005A (en) * 2019-10-17 2020-02-04 腾讯科技(深圳)有限公司 Speed limiting method, device and system, electronic equipment and computer readable storage medium

Similar Documents

Publication Publication Date Title
JP6490310B2 (en) Networking technology
US10313247B2 (en) System, method, and device for network load balance processing
CN111078607B (en) Network access programming framework deployment method and system for RDMA (remote direct memory access) and nonvolatile memory
CN109101662B (en) Block generation method, device, equipment and storage medium
EP4318251A1 (en) Data access system and method, and device and network card
US8676751B2 (en) High availability database systems and methods
CN105763519A (en) Consistency control method, device and system
US8627412B2 (en) Transparent database connection reconnect
JP6438110B2 (en) Method and device for signaling in a communication network
US11256420B2 (en) Method and apparatus for scaling out storage devices and scaled-out storage devices
WO2017112338A1 (en) Congestion management techniques for communication networks
US20220124046A1 (en) System for storage of received messages
US9509780B2 (en) Information processing system and control method of information processing system
CN109241362B (en) Block generation method, device, equipment and storage medium
EP3631640B1 (en) Communication between field programmable gate arrays
CN113434290A (en) Data processing method and device based on RAFT protocol, and computer storage medium
CN111107663B (en) Data transmission method and device, storage medium and electronic device
US20170295237A1 (en) Parallel processing apparatus and communication control method
US8751603B2 (en) Exploiting cluster awareness infrastructure through internet socket based applications
CN117472844B (en) Multi-chip module and data processing method
US20240168898A1 (en) Distributed queue multi-bus on multi-cpu chips
US10693818B2 (en) Packet tracking techniques for communication networks
US10248708B2 (en) Storage and replication in distributed computing environments
JP2017017587A (en) Router device, connection establishment method, communication system and communication terminal
CN117955590A (en) Communication method and related equipment

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20160713