CN103916426A - Paxos example updating method, device and system - Google Patents

Paxos example updating method, device and system Download PDF

Info

Publication number
CN103916426A
CN103916426A CN201210593773.6A CN201210593773A CN103916426A CN 103916426 A CN103916426 A CN 103916426A CN 201210593773 A CN201210593773 A CN 201210593773A CN 103916426 A CN103916426 A CN 103916426A
Authority
CN
China
Prior art keywords
paxos
motion
node
approved
upgrade
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.)
Granted
Application number
CN201210593773.6A
Other languages
Chinese (zh)
Other versions
CN103916426B (en
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.)
Beijing Feinno Communication Technology Co Ltd
Original Assignee
Beijing Feinno Communication Technology 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 Beijing Feinno Communication Technology Co Ltd filed Critical Beijing Feinno Communication Technology Co Ltd
Priority to CN201210593773.6A priority Critical patent/CN103916426B/en
Publication of CN103916426A publication Critical patent/CN103916426A/en
Application granted granted Critical
Publication of CN103916426B publication Critical patent/CN103916426B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention discloses a paxos example updating method. The method comprises: a proposal node executing a learning process, obtaining the example information of a paxos example which is already accepted under a current scheme, and obtaining the ID of an example needing paxos example updating according to the example information of the already accepted paxos example; and the proposal node obtaining a serial number which is successfully used by the accepted paxos example last time, according to the serial number which is successfully used by the accepted paxos example last time and the example ID, directly initiating acceptance requests to all acceptance nodes, after the acceptance requests are accepted by a majority of the acceptance nodes, determining that the paxos example needing the updating is accepted, and updating the paxos example needing the updating. Correspondingly, the invention further discloses a device and system for paxos example updating. According to the invention, the execution of a paxos algorithm is simplified, the execution efficiency of the paxos algorithm is improved, and the problem of low execution efficiency of a conventional paxos algorithm is solved.

Description

A kind of paxos example update method, equipment and system
Technical field
The present invention relates to Distributed Calculation field, particularly a kind of paxos example update method, equipment and system.
Background technology
Interoperation in distributed computing system between each node provides more data reliably and access that can computational resource for user.In distributed computing system, each node is carried out identical task and stores identical information, thereby distributed computing system often inevitably can produce following mistake: process is slow, restart and message delay, information drop-out, message repeat etc.
For guaranteeing that in distributed computing system, each node is carried out identical order, need in each instruction, carry out one " consistency algorithm ".Paxos algorithm is exactly a kind of " consistency algorithm " that is applied to distributed computing system.In paxos algorithm, if carry out once the operation of the Data Update on all copies, a first-selected study (learn) process that needs determines it is for which paxos example, carry out again a preparation (prepare) process with the request right of get the Green Light (accept) and carry out the needed sequence number of ratification process, finally carry out a ratification process, process complexity, relate to scene many, therefore, execution efficiency is low, can not be used for high capacity, high concurrent application scenarios.
Summary of the invention
The conforming method of distributed computing system, the equipment and system realized provided by the invention, to solve the low problem of existing paxos algorithm execution efficiency.
The invention provides a kind of paxos example update method, described method comprises:
Motion node is carried out learning process, obtains the example information of approved paxos example under current scheme, obtains needing to upgrade the example ID of paxos example according to the example information of described approved paxos example;
Motion node obtains the sequence number that last time, approved paxos example successfully used, and directly initiate to ratify a motion to all approval nodes with sequence number and described example ID that described last time, approved paxos example successfully used, described in majority, ratified after node acceptance described ratifying a motion, confirm the described paxos example approved that needs to upgrade, upgrade the described paxos example that needs to upgrade.
In such scheme, if described in ratify a motion and described in majority, do not ratified node and accept, described method also comprises: motion node is carried out set-up procedure with described example ID, determines sequence number; Motion node is with the definite sequence number of described set-up procedure and described example ID, initiate to ratify a motion to all approval nodes, described in majority, ratified after node acceptance described ratifying a motion, confirmed the described paxos example approved that needs to upgrade, upgraded the described paxos example that needs to upgrade.
In such scheme, described motion node is carried out learning process, obtains the example information of approved paxos example under current scheme, comprising: motion node receives the scheme update request that client is initiated, and initiates study request to all approval nodes; In the time that the approval interstitial content of accepting described study request meets majority's requirement, obtain the example information of approved paxos example under current scheme.
In such scheme, described motion node is preassigned main motion node.
The present invention also provides a kind of equipment upgrading for paxos example, and described equipment comprises: unit and approval unit; Wherein,
Unit, for carrying out learning process, obtains the example information of approved paxos example under current scheme, obtains needing to upgrade the example ID of paxos example according to the example information of described approved paxos example;
Approval unit, for obtaining the sequence number that last time, approved paxos example successfully used, and directly initiate to ratify a motion to all approval nodes with sequence number and described example ID that described last time, approved paxos example successfully used, described in majority, ratified after node acceptance described ratifying a motion, confirm the described paxos example approved that needs to upgrade, upgrade the described paxos example that needs to upgrade.
In such scheme, described equipment also comprises: preparatory unit;
Described approval unit, also, for ratifying a motion when not ratified node described in majority and accepting described, notifies described preparatory unit; And, for the example ID obtaining with the definite sequence number of described preparatory unit and described unit, initiate to ratify a motion to all approval nodes, described in majority, ratified after node acceptance described ratifying a motion, confirm the described paxos example approved that needs to upgrade, upgrade the described paxos example that needs to upgrade;
Described preparatory unit, for receiving after the notice of described approval unit, the example ID obtaining with described unit is carried out set-up procedure, determines sequence number.
In such scheme, described unit, the scheme update request of initiating for receiving client, and initiate study request to all approval nodes; In the time that the approval interstitial content of accepting described study request meets majority's requirement, obtain the example information of approved paxos example under current scheme.
In such scheme, it is characterized in that, the described equipment upgrading for paxos example is at the preassigned main motion node of distributed computing system.
The present invention also provides a kind of distributed computing system, and described system comprises the above-mentioned equipment upgrading for paxos example.
In such scheme, when described distributed computing system exists multiple motion node, the described equipment upgrading for paxos example is the preassigned main motion node of described distributed computing system.
The beneficial effect of the embodiment of the present invention is: while carrying out the renewal of paxos example, motion node adopts the used sequence number of approved paxos example success last time directly to initiate to ratify a motion to all approval nodes, like this, adopting sequence number maximum in used sequence number directly to initiate to ratify a motion to carry out paxos example upgrades, the rate that not only runs succeeded is higher, and can avoid repeating set-up procedure, both without prejudice to the existing criterion of paxos algorithm, also simplified the execution of paxos algorithm, improve the execution efficiency of paxos algorithm, solve the low problem of existing paxos algorithm execution efficiency.
Accompanying drawing explanation
Fig. 1 is the realization flow figure of embodiment of the present invention paxos example update method;
Fig. 2 is the specific implementation flow chart of paxos example renewal process in the embodiment of the present invention;
Fig. 3 is the composition structural representation of the embodiment of the present invention for the equipment of paxos example renewal;
Fig. 4 is a kind of exemplary composition structural representation of embodiment of the present invention distributed computing system.
Embodiment
For making the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing, embodiment of the present invention is described further in detail.
Paxos algorithm needs three category nodes to complete: motion node (Proposer), approval node (Acceptor) and study node (Learner), wherein, study node and motion node can be same nodes, and approval node need to have two at least.
In Paxos algorithm, motion node is to approval node proposition value (value), initiate the renewal of a paxos example, if majority's approval node is accepted the renewal of described paxos example, ratify the renewal of described paxos example, carry out corresponding renewal and operate, do not meet majority's requirement if accept the approval interstitial content of described paxos example renewal, disapprove the renewal of described paxos example, return to the renewal that re-executes described paxos example.At the renewal approved of paxos example, study node or motion node can be to the relevant informations of each approval node study approved paxos example.
The renewal of a paxos example refers to once the complete process on all nodes of distributed computing system that certain value is updated to.After distributed computing system runs succeeded the renewal operation of current paxos example, motion node receives the scheme update request that client is initiated, just start to carry out the renewal of next paxos example, initiate the renewal of next paxos example to all approval nodes, in the time that the renewal of next paxos example is accepted by majority's approval node, ratify the renewal of next paxos example, carry out the corresponding operation of upgrading.
In paxos algorithm, the renewal that motion node completes a paxos example generally need to have three processes: learning process, set-up procedure and ratification process.
Wherein, in learning process, motion node passes through to initiate study request to all approval nodes, obtains the example information of the approval node approved paxos of majority example, as the value of the example ID of approved paxos example, approved and the successful sequence number using etc.Then, motion node, according to the example information of approved paxos example, obtains next paxos example and upgrades required example ID, and wherein next paxos example is the example that issued for approval upgrades;
In set-up procedure, first motion node calculates this next one paxos example and upgrades required sequence number, the example ID obtaining in sequence number based on calculating and learning process is again initiated preparation request to all approval nodes, if described preparation request is accepted by majority's approval node, the sequence number to comprise in described preparation request is carried out follow-up ratification process by motion node.
In ratification process, motion node initiates to ratify a motion with the example ID obtaining in sequence number definite in set-up procedure and learning process, this also comprises the value (i.e. the value of this next one paxos example) that motion node proposes in ratifying a motion, if majority's approval node ratifies a motion described in accepting, ratify the renewal of this next one paxos example, carry out the corresponding operation of upgrading, the renewal process of a paxos example finishes.
The embodiment of the present invention provides a kind of paxos example update method, equipment and system, to simplify paxos algorithm, improves its execution efficiency.
Shown in Fig. 1, the paxos example update method that the embodiment of the present invention provides mainly can comprise the steps:
Step 101: motion node is carried out learning process, obtains the example information of approved paxos example under current scheme, obtains needing to upgrade the example ID of paxos example according to the example information of described approved paxos example;
Step 102: motion node obtains the sequence number that last time, approved paxos example successfully used, and directly initiate to ratify a motion to all approval nodes with sequence number and described example ID that described last time, approved paxos example successfully used, described in majority, ratified after node acceptance described ratifying a motion, confirm the described paxos example approved that needs to upgrade, upgrade the described paxos example that needs to upgrade.
Wherein, motion node need to obtain the sequence number that last time, approved paxos example successfully used before carrying out next example.Concrete obtain manner has multiple, for example, motion node can be confirming that last time is when approved paxos example approved, by the example information recording that comprises its sequence number successfully using at local assigned address, when the next example of follow-up execution, can directly read from described assigned address.Again for example, motion node also can be carrying out when next example, the sequence number that active obtaining approved last time paxos example successfully uses from ratifying any one approval node of described last time of approved paxos example.
Wherein, if described in ratify a motion and described in majority, do not ratified node and accept, described method also comprises: motion node is carried out set-up procedure with described example ID, determines sequence number; Motion node is with the definite sequence number of described set-up procedure and described example ID, initiate to ratify a motion to all approval nodes, described in majority, ratified after node acceptance described ratifying a motion, confirmed the described paxos example approved that needs to upgrade, upgraded the described paxos example that needs to upgrade.
Wherein, described motion node is carried out learning process, obtains the example information of approved paxos example under current scheme, can comprise: motion node receives the scheme update request that client is initiated, and initiates study request to all approval nodes; In the time that the approval interstitial content of accepting described study request meets majority's requirement, obtain the example information of approved paxos example under current scheme.
The paxos example update method that the embodiment of the present invention provides, in the time carrying out the renewal of paxos example, motion node adopts the sequence number of approved example success last time use to come directly to ratify a motion to all approval node initiations.Ratify a motion when not obtaining majority approval node and accepting described, still carry out the renewal of paxos example according to the processing method of original paxos algorithm.
According to the criterion of paxos algorithm " for the renewal of same paxos example; the sequence number of the middle use that ratifies a motion is all greater than the sequence number of the middle use that ratified a motion last time at every turn ", adopt the sequence number that last time, approved paxos example successfully used namely to adopt approved paxos example last time used maximum sequence number in the time upgrading, like this, can guarantee that paxos example upgrades the sequence number adopting for maximum, also the probability that has just improved paxos example renewal approved, has improved the rate that runs succeeded that paxos example upgrades; And, same motion node is carried out in the process of multiple paxos examples and need in the time that each paxos example upgrades, do not carried out set-up procedure, that is to say that a set-up procedure can be shared by multiple paxos examples, under the prerequisite without prejudice to existing paxos algorithmic rule, simplify paxos algorithm, improve the execution efficiency of paxos algorithm, solved the low problem of existing paxos algorithm execution efficiency.
If having multiple motion nodes carries out and upgrades same paxos example, motion node is with the sequence number that successfully uses of paxos example while initiating to ratify a motion of approved last time so, the probability of approved will reduce, and in the embodiment of the present invention, the execution efficiency of method can decrease.In order to address this problem, can specify in advance a motion node is main motion node, make the described main motion node of client first access, can guarantee that so same paxos example is upgraded by same motion node execution, improve motion node with last time approved the sequence number that successfully uses of paxos example initiate the approval probability ratifying a motion, accordingly, also can improve the execution efficiency of method in the embodiment of the present invention.
Concrete, can set in advance a configuration file, this configuration file is used to indicate the main motion node that the limited access of client is specified, and all clients all can read this configuration file.Like this, client can visit main motion node by reading described configuration file before initiation scheme is asked more by force.Here, described configuration file can be text formatting or other similar forms.
In the embodiment of the present invention, the motion node select of method shown in execution graph 1 is preassigned main motion node.
As shown in Figure 2, in the embodiment of the present invention, the specific implementation flow process of paxos example renewal process can comprise the steps:
Step 201: motion node receives the scheme update request that client is initiated;
Step 202: motion node initiates to learn (learn) request to all approval nodes;
Step 203: respectively ratify node and receive described study request, and return and reply to described motion node, this includes the example information of approved paxos example under current scheme in replying;
Concrete, described in can comprise the example information of approved paxos example under current scheme in replying, described example information can comprise: the sequence number that example ID, value and the success of approved paxos example used.
In practical application, the value of a paxos example can be any operational order, and for example, the value of a paxos example can be " value of revising certain variable is certain value ", " it is host node that present node is set " etc.
Here,, if approval node does not carry out the approval under excessive front scheme, directly return to sky and reply or do not return and reply.
Step 204: motion node receives replying that each approval node returns, and meets majority's requirement if return to the number of replying, and continues step 205; Do not meet majority's requirement if return to the number of replying, return to step 202;
Step 205: motion node obtains according to replying of described reception the example ID that paxos example upgrades;
Concrete, motion node can be from described replying the example information of extraction approved paxos example, adopts the algorithm of making an appointment to calculate the example ID of the described paxos example renewal under current scheme according to the example ID of approved paxos example.
For example, for the example ID 1 of paxos example, can add 1 by the example ID of a upper paxos example under same scheme and obtain.For example, under same scheme, the example ID of a upper paxos example is 2, and the example ID of so described paxos example is just 3.
Step 206: motion node obtains the sequence number that the paxos example of approved last time successfully uses;
Here, the sequence number that last time, approved paxos example successfully used refers to, in the renewal process of approved paxos example last time, is ratified by majority the sequence number comprising in ratifying a motion of node acceptance.
Here, concrete obtain manner has multiple, for example, motion node can be in the time of confirmation approved paxos example approved last time, by the example information recording that comprises its sequence number successfully using at local assigned address, while carrying out the renewal of paxos example, can directly read from described assigned address.Again for example, motion node also can be in the time carrying out paxos example and upgrade, the sequence number that active obtaining approved last time paxos example successfully uses from ratifying any one approval node of described last time of approved paxos example.
Step 207: the example ID that motion node upgrades with described paxos example and last time approved the sequence number that successfully uses of paxos example ratify a motion to all approval node initiations;
Here in ratifying a motion,, can also comprise the value that described paxos example upgrades.Concrete, can adopt existing correlation technique in paxos algorithm to obtain the value of described paxos example.For example, the scheme update request that can initiate according to client obtains, and also can obtain according to the value of approved paxos example.
Step 208: respectively ratify to ratify a motion described in node reception, described in judging whether to accept, ratify a motion, if, ratify the renewal of described paxos example, carry out the renewal of current scheme, and return and agree to reply to described motion node, otherwise, refuse ratifying a motion of described motion node;
In practical application, described in receiving, approval node ratifies a motion, whether the sequence number in ratifying a motion described in judgement is greater than in same paxos example the sequence number in ratifying a motion that replied last time, if, described in accepting, ratify a motion, return to OK message to motion node, if not, ignore described preparation request, do not return to any message to motion node.
Step 209: motion node receives the agreement that each approval node returns and replys, and judges whether the number that described agreement is replied meets majority's requirement, if so, confirms that described paxos example upgrades approved, continues step 214, otherwise continues step 210;
Step 210: motion node starts to carry out the set-up procedure that described paxos example upgrades, sequence of calculation SN1, and initiate preparation request with this sequence number SN1 to all approval nodes;
Concrete, motion node can adopt the computational methods of making an appointment to calculate sequence number SN.
For example, can adopt the method sequence of calculation SN shown in following formula (1):
SN=M×N+n (1)
Wherein, SN is sequence number, and M is that the sequence number of described paxos example calculates round, and N is motion node sum, and n is the numbering of current motion node.If include 10 motion nodes in current distributed computing system, the numbering of motion node is respectively 0 to 9, under the described paxos example that needs to upgrade, the round of the sequence of calculation number is for being M=0 for the first time, and the minmal sequence SN_INIT of described paxos example is 0.
Step 211: respectively ratify node and receive described preparation request, judge whether to accept described preparation request, if so, return and agree to reply to described motion node; If not, ignore the preparation request of described motion node;
In practical application, approval node receives described preparation request, judge whether sequence number SN1 in described preparation request is greater than the sequence number in the preparation request that same paxos example replied lower last time, if, accept described preparation request, if not, ignore described preparation request, do not return to any message to motion node.
Step 212: motion node receives the agreement that each approval node returns and replys, if the number that described agreement is replied meets majority's requirement, continues step 213, otherwise returns to step 210;
Step 213: the example ID that motion node upgrades with described paxos example and sequence number SN1 initiate to ratify a motion to all approval nodes, and return to step 208;
Here in ratifying a motion,, also comprise the value that described paxos example upgrades.Concrete, can adopt existing correlation technique in paxos algorithm to obtain the value of described paxos example.For example, the scheme update request that can initiate according to client obtains, and also can obtain according to the value of approved paxos example.
Step 214: current scheme is updated successfully, and flow process finishes.
Wherein, described majority requires to go to arrange according to the needs of practical application, and for example, it can be to exceed half that majority requires, or can be to exceed 3/4ths etc. of sum.Generally, majority requires to adopt the setting that exceedes half.
If having multiple motion nodes carries out and upgrades same paxos example, motion node is with the sequence number that successfully uses of paxos example while initiating to ratify a motion of approved last time so, the probability of approved will reduce, and in the embodiment of the present invention, the execution efficiency of method can decrease.In order to address this problem, can specify in advance a motion node is main motion node, make the described main motion node of client first access, can guarantee that so same paxos example is upgraded by same motion node execution, improve motion node with last time approved the sequence number that successfully uses of paxos example initiate the approval probability ratifying a motion, accordingly, also can improve the execution efficiency of method in the embodiment of the present invention.
Concrete, can set in advance a configuration file, this configuration file is used to indicate the main motion node that the limited access of client is specified, and all clients all can read this configuration file.Like this, client can visit main motion node by reading described configuration file before initiation scheme is asked more by force.Here, described configuration file can be text formatting or other similar forms.
In the embodiment of the present invention, the motion node select of flow process shown in execution graph 2 is preassigned main motion node.
The embodiment of the present invention also provides a kind of equipment upgrading for paxos example, and as shown in Figure 3, the described equipment upgrading for paxos example can comprise: unit 31 and approval unit 32; Wherein,
Unit 31, for carrying out learning process, obtains the example information of approved paxos example under current scheme, obtains needing to upgrade the example ID of paxos example according to the example information of described approved paxos example;
Approval unit 32, for obtaining the sequence number that last time, approved paxos example successfully used, and directly initiate to ratify a motion to all approval nodes with sequence number and described example ID that described last time, approved paxos example successfully used, described in majority, ratified after node acceptance described ratifying a motion, confirm the described paxos example approved that needs to upgrade, upgrade the described paxos example that needs to upgrade.
Here, in described equipment, can also comprise preparatory unit 33, for receiving after the notice of approval unit 32, the example ID obtaining with described unit 31 is carried out set-up procedure, determines sequence number.
Wherein, described approval unit 32, also, for ratifying a motion when not ratified node described in majority and accepting described, notifies described preparatory unit 33; And, for the example ID obtaining with the definite sequence number of described preparatory unit 33 and described unit 31, initiate to ratify a motion to all approval nodes, described in majority, ratified after node acceptance described ratifying a motion, confirm the described paxos example approved that needs to upgrade, upgrade the described paxos example that needs to upgrade;
Here, described unit 31, the scheme update request of initiating for receiving client, and initiate study request to all approval nodes; In the time that the approval interstitial content of accepting described study request meets majority's requirement, obtain the example information of approved paxos example under current scheme.
If exist multiple equipment that same paxos example is carried out and upgraded, so described equipment is with the sequence number initiation that successfully uses of paxos example while ratifying a motion of approved last time, and the probability of approved will reduce, and execution efficiency can decrease.
In order to address this problem, can specify in advance a motion node in distributed computing system is main motion node, using this main motion node as the above-mentioned equipment upgrading for paxos example, make the described main motion node of client first access, can guarantee that so same paxos example is upgraded by same motion node execution, improve motion node with last time approved the sequence number that successfully uses of paxos example initiate the approval probability ratifying a motion, accordingly, also can improve the execution efficiency of method in the embodiment of the present invention.
Concrete, can set in advance a configuration file, this configuration file is used to indicate the main motion node that the limited access of client is specified, and all clients all can read this configuration file.Like this, client can visit main motion node by reading described configuration file before initiation scheme is asked more by force.Here, described configuration file can be text formatting or other similar forms.
The equipment upgrading for paxos example in the embodiment of the present invention adopts the used sequence number of approved paxos example success last time directly to initiate to ratify a motion to all approval nodes, like this, adopting sequence number maximum in used sequence number directly to initiate to ratify a motion to carry out paxos example upgrades, the rate that not only runs succeeded is higher, and can avoid repeating set-up procedure, both without prejudice to the existing criterion of paxos algorithm, also simplified the execution of paxos algorithm, improve the execution efficiency of paxos algorithm, solve the low problem of existing paxos algorithm execution efficiency.
The embodiment of the present invention provides a kind of distributed computing system, and this distributed computing system includes the equipment upgrading for paxos example described in above-described embodiment.
In practical application, the distributed computing system that the embodiment of the present invention provides mainly can comprise: at least one motion node and at least two approval nodes, wherein, between motion node and each approval node, can realize alternately paxos algorithm, described motion node is the equipment upgrading for paxos example described in above-described embodiment.
If there are multiple motion nodes in described distributed computing system, the described equipment upgrading for paxos example is preferably preassigned main motion node.
In practical application, if having multiple motion nodes carries out and upgrades same paxos example, motion node is with the sequence number that successfully uses of paxos example while initiating to ratify a motion of approved last time so, the probability of approved will reduce, and the efficiency that in the embodiment of the present invention, system execution paxos example upgrades can decrease.In order to address this problem, can specify in advance a motion node is main motion node, make the described main motion node of client first access, can guarantee that so same paxos example is upgraded by same motion node execution, improve motion node with last time approved the sequence number that successfully uses of paxos example initiate the approval probability ratifying a motion, accordingly, also can improve the execution efficiency of method in the embodiment of the present invention.
Concrete, can set in advance a configuration file, this configuration file is used to indicate the main motion node that the limited access of client is specified, and all clients all can read this configuration file.Like this, client can visit main motion node by reading described configuration file before initiation scheme is asked more by force.Here, described configuration file can be text formatting or other similar forms.
In practical application, motion node and approval node can be computer, mobile device or similar other equipment.Motion node can have one, can be also two or more, and each motion node can be initiated paxos example and be upgraded.Between each approval node, be complete equity independently.
Referring to Fig. 4, be a kind of example of distributed computing system described in the embodiment of the present invention, this example comprises a motion node 41 and four approval nodes 42.
When distributed computing system described in the embodiment of the present invention is carried out the renewal of paxos example, motion node adopts the used sequence number of approved paxos example success last time directly to initiate to ratify a motion to all approval nodes, like this, adopting sequence number maximum in used sequence number directly to initiate to ratify a motion to carry out paxos example upgrades, the rate that not only runs succeeded is higher, and can avoid repeating set-up procedure, both without prejudice to the existing criterion of paxos algorithm, also simplified the execution of paxos algorithm, improve the execution efficiency of paxos algorithm, solve the low problem of existing paxos algorithm execution efficiency.
The foregoing is only preferred embodiment of the present invention, be not intended to limit protection scope of the present invention.All any modifications of doing within the spirit and principles in the present invention, be equal to replacement, improvement etc., be all included in protection scope of the present invention.

Claims (10)

1. a paxos example update method, is characterized in that, described method comprises:
Motion node is carried out learning process, obtains the example information of approved paxos example under current scheme, obtains needing to upgrade the example ID of paxos example according to the example information of described approved paxos example;
Motion node obtains the sequence number that last time, approved paxos example successfully used, and directly initiate to ratify a motion to all approval nodes with sequence number and described example ID that described last time, approved paxos example successfully used, described in majority, ratified after node acceptance described ratifying a motion, confirm the described paxos example approved that needs to upgrade, upgrade the described paxos example that needs to upgrade.
2. method according to claim 1, is characterized in that, if described in ratify a motion described in majority, do not ratified node accept, described method also comprises:
Motion node is carried out set-up procedure with described example ID, determines sequence number;
Motion node is with the definite sequence number of described set-up procedure and described example ID, initiate to ratify a motion to all approval nodes, described in majority, ratified after node acceptance described ratifying a motion, confirmed the described paxos example approved that needs to upgrade, upgraded the described paxos example that needs to upgrade.
3. method according to claim 1, is characterized in that, described motion node is carried out learning process, obtains the example information of approved paxos example under current scheme, comprising:
Motion node receives the scheme update request that client is initiated, and initiates study request to all approval nodes; In the time that the approval interstitial content of accepting described study request meets majority's requirement, obtain the example information of approved paxos example under current scheme.
4. according to the method described in claim 1,2 or 3, it is characterized in that, described motion node is preassigned main motion node.
5. the equipment upgrading for paxos example, is characterized in that, described equipment comprises: unit and approval unit; Wherein,
Unit, for carrying out learning process, obtains the example information of approved paxos example under current scheme, obtains needing to upgrade the example ID of paxos example according to the example information of described approved paxos example;
Approval unit, for obtaining the sequence number that last time, approved paxos example successfully used, and directly initiate to ratify a motion to all approval nodes with sequence number and described example ID that described last time, approved paxos example successfully used, described in majority, ratified after node acceptance described ratifying a motion, confirm the described paxos example approved that needs to upgrade, upgrade the described paxos example that needs to upgrade.
6. equipment according to claim 5, is characterized in that, described equipment also comprises: preparatory unit;
Described approval unit, also, for ratifying a motion when not ratified node described in majority and accepting described, notifies described preparatory unit; And, for the example ID obtaining with the definite sequence number of described preparatory unit and described unit, initiate to ratify a motion to all approval nodes, described in majority, ratified after node acceptance described ratifying a motion, confirm the described paxos example approved that needs to upgrade, upgrade the described paxos example that needs to upgrade;
Described preparatory unit, for receiving after the notice of described approval unit, the example ID obtaining with described unit is carried out set-up procedure, determines sequence number.
7. equipment according to claim 5, is characterized in that, described unit, and the scheme update request of initiating for receiving client, and initiate study request to all approval nodes; In the time that the approval interstitial content of accepting described study request meets majority's requirement, obtain the example information of approved paxos example under current scheme.
8. according to the equipment described in claim 5,6 or 7, it is characterized in that, the described equipment upgrading for paxos example is at the preassigned main motion node of distributed computing system.
9. a distributed computing system, is characterized in that, described system comprises the equipment upgrading for paxos example as described in claim 5 to 8 any one.
10. system according to claim 9, is characterized in that, when described distributed computing system exists multiple motion node, the described equipment upgrading for paxos example is the preassigned main motion node of described distributed computing system.
CN201210593773.6A 2012-12-31 2012-12-31 A kind of paxos examples update method, equipment and system Active CN103916426B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210593773.6A CN103916426B (en) 2012-12-31 2012-12-31 A kind of paxos examples update method, equipment and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210593773.6A CN103916426B (en) 2012-12-31 2012-12-31 A kind of paxos examples update method, equipment and system

Publications (2)

Publication Number Publication Date
CN103916426A true CN103916426A (en) 2014-07-09
CN103916426B CN103916426B (en) 2017-06-27

Family

ID=51041830

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210593773.6A Active CN103916426B (en) 2012-12-31 2012-12-31 A kind of paxos examples update method, equipment and system

Country Status (1)

Country Link
CN (1) CN103916426B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107707595A (en) * 2017-03-17 2018-02-16 贵州白山云科技有限公司 A kind of member organizes variation and device
CN108924240A (en) * 2018-07-19 2018-11-30 腾讯科技(深圳)有限公司 Distributed approach, device and storage medium based on consistency protocol

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1690968A (en) * 2003-12-30 2005-11-02 微软公司 Simplified paxos

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1690968A (en) * 2003-12-30 2005-11-02 微软公司 Simplified paxos

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107707595A (en) * 2017-03-17 2018-02-16 贵州白山云科技有限公司 A kind of member organizes variation and device
CN107707595B (en) * 2017-03-17 2018-06-15 贵州白山云科技有限公司 A kind of member organizes variation and device
CN108924240A (en) * 2018-07-19 2018-11-30 腾讯科技(深圳)有限公司 Distributed approach, device and storage medium based on consistency protocol
WO2020015576A1 (en) * 2018-07-19 2020-01-23 腾讯科技(深圳)有限公司 Distributed processing method, device and storage medium on the basis of consistency protocol
CN108924240B (en) * 2018-07-19 2022-08-12 腾讯科技(深圳)有限公司 Distributed processing method, device and storage medium based on consistency protocol
US11558460B2 (en) 2018-07-19 2023-01-17 Tencent Technology (Shenzhen) Company Limited Distributed processing method and apparatus based on consistency protocol and storage medium

Also Published As

Publication number Publication date
CN103916426B (en) 2017-06-27

Similar Documents

Publication Publication Date Title
CN102299954B (en) For the context-specific network resource addressing system and method for Distributed Services
CN109951547B (en) Transaction request parallel processing method, device, equipment and medium
CN103139172B (en) A kind of service implementation method and device
CN108958787B (en) Block chain system upgrading method, device, equipment and storage medium
CN105739968B (en) Method and device for reviewing updated content based on distributed version control system Git
US10956667B2 (en) Operational transformations proxy for thin clients
CN107026871B (en) Web vulnerability scanning method based on cloud computing
KR20230006033A (en) Federated calculation processing methods, devices, electronic devices and storage media
US20210349784A1 (en) Data Replication Method, Apparatus, and System
JP2018513441A (en) Determination of region to be superimposed, image superimposition, image display method and apparatus
CN111464356A (en) Block consensus period switching method and device and computer equipment
EP4095686A2 (en) Method for switching skin of mini-program page, and electronic device
CN103914313A (en) Paxos example updating method, device and system
CN114697047A (en) Sub-device registration method in Internet of things, cloud server and gateway device
US20100285781A1 (en) Deploying learning management systems to mobile communications devices
CN103916426A (en) Paxos example updating method, device and system
CN113766504A (en) Communication connection method, device, server, terminal device, system and medium
CN105743890B (en) Authority information generation method and device
CN103916419A (en) Paxos instance update method, apparatus and system
CN114422236B (en) Intelligent device access method and device and electronic device
CN112231408B (en) Data integration method and device, electronic equipment and storage medium
CN110489430B (en) Tracing method and system based on data block signature and verification
CN111125142B (en) Data updating method and system
CN110995462B (en) Cloud host function expansion method, system, equipment and computer storage medium
CN114528893A (en) Machine learning model training method, electronic device and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP02 Change in the address of a patent holder
CP02 Change in the address of a patent holder

Address after: Room 810, 8 / F, 34 Haidian Street, Haidian District, Beijing 100080

Patentee after: BEIJING D-MEDIA COMMUNICATION TECHNOLOGY Co.,Ltd.

Address before: 100089 Beijing city Haidian District wanquanzhuang Road No. 28 Wanliu new building 6 storey block A room 602

Patentee before: BEIJING D-MEDIA COMMUNICATION TECHNOLOGY Co.,Ltd.