After the business-to-business, c2c and after, Ma Yun found a new way to do E-commerce--p2c (Service Provider to Consumer), simply to rent a house, book tickets, even wash feet, eat these life "chores" are moved to the Internet to spend.
E-commerce of service industry
Last week, Alibaba Group, China's Yahoo and Word-of-mouth Network announced the merger, and officially launched the "Yahoo Life Service new platform of Word-of-mouth." Yahoo Word-of-
Peer-to-peer, P2C, O2O, Business-to-consumer, business-to-business, c2c, see these dazzling flooded the internet is not the word, is not very familiar. However, there is no egg to be familiar with, if you do not understand the meaning of them, do not understand their differences, you take what the show force lattice it.
Don't worry, come here, there is a picture, read it will refresh your business style, open career pattern, open a new chapter of lif
consistent with the previous one, that is, when a value is selected in fact, the subsequent proposer cannot submit different values to disrupt the previous results. This is a general description, but if this description can be implemented, the paxos algorithm can be ensured. Therefore, P2 is also called "safety property ".
The subsequent discussions are based on "if a proposal with value V is chosen", how to ensure that "then every higher-numbered proposal that is chosen has value v
", How to i
detailed steps, Lamport is through the gradual enhancement of the way to implement P2, mainly from the following aspects:
Request for the entire result (P2)
Request for acceptor (P2A)
Request for Proposer (P2B)
Simultaneous request for acceptor and proposer (P2C)
It is unclear why Lamport can divide the process so clearly, but from the articles published by Lamport, he has a deep knowledge of the distribution, and for a long
behavior of proposer:P2B: Once a proposal with value V is approved (chosen), then any subsequent proposal by proposer must have value v.Since Acceptor can accept the proposal must be proposed by proposer, so p2b implication P2A, is a stronger constraint.But according to P2B difficult to put forward the means of implementation. It is therefore necessary to further strengthen the P2B.Suppose that a value V with number M has been approved (chosen) to see under what circumstances any proposal with
(chosen), and we are more concerned about what the proposed proposer should do before it is determined:p2c. For the proposal (N,V), acceptor in majority s, if there is acceptor most recent (that is, the maximum ID value) accepted by the proposed value of v', then v = v'is required; otherwise v can be any valuesatisfies the p2c namely satisfies p2b (p2c = p2b = P2A = P2).The description of
Refer to the previous article: paxos algorithm 1.
1. Number Processing
According to P2c, Proposer will first consult the acceptor to view the maximum number and value it approves before deciding which value to submit. Previously, we have been emphasizing higher-numbered proposal without explaining how to handle low-numbered Proposal.
| -------- Low number (L
The correctness of P2c is guaranteed by the hig
.
Tip: gprof generates a large amount of profiling data. If you want to check the data, you 'd better redirect the output to a file.
F2c and p2c
F2c and p2c are two source code conversion programs. f2c converts FORTRAN code to C code, and p2c converts Pascal c
. this will make the program generate a gmon every execution. out file. gprof uses this file to generate profiling information.After you run your program and generate the gmon. out file, you can use the following command to obtain the profiling information:Gprof
The program_name parameter is the name of the program that generates the gmon. out file.
-------------------------------------------------------------------------------
--turn from: {Old yards ' column}1. Numbering processingAccording to P2C, proposer will consult acceptor before the proposal to see the largest number and value of its approval before deciding which value to submit. We have previously emphasized the higher numbered proposal, without stating what to do with the low-numbered proposal.|--------low Number (lThe correctness of the P2C is by the current number n
function. This information is useful if you want to improve your program's performance.In order to use GPROF on your program, you must add the-PG option when compiling the program. This causes the program to produce a file called gmon.out each time it is executed. Gprof Use this file to generate profiling information.After you run your program and generate a Gmon.out file, you can get profiling information using the following command:GprofParameter program_name is the name of the program that p
Refer to the previous article: paxos algorithm 1.
1. Number Processing
According to P2c
, Proposer will first consult the acceptor to view the maximum number and value it approves before deciding which value to submit. Previously, we have been emphasizing higher-numbered proposal without explaining how to handle low-numbered Proposal.
| -------- Low number (L
P2c
The correctness is guaranteed by the higher
hypothetical case, then we can meet the P2. Lamport's idea is that if we want to satisfy a certain condition, we can see how this condition can be satisfied.Assuming (M,V) has been passed, note that the majority has accepted the offer. Then there is a new offer (N,v_n), here n>m, then we need to prove v_n = v. If this is to be proved, what conditions do we need? If we use mathematical induction, then we can assume the offer of M. (n-1) The proposed leader are all V, then the idea sub-proof v_n
gmon every execution. out file. GPROF uses this file to generate profiling information.
After you run your program and generate the gmon. Out file, you can use the following command to obtain the profiling information:
GPROF The program_name parameter is the name of the program that generates the gmon. Out file.
--------------------------------------------------------------------------------Tip: GPROF generates a large amount of profiling data. If you want to check the data, you 'd better re
.--------------------------------------------------------------------------------F2c and P2cF2c and P2c are two source code conversion programs. f2c converts Fortran code to C code, and P2c converts Pascal code to C code. these two programs will be installed when you install GCC. if you have code written in FORTRAN or Pascal that needs to be rewritten in C, f2c and P2c
.--------------------------------------------------------------------------------F2c and P2cF2c and P2c are two source code conversion programs. f2c converts Fortran code to C code, and P2c converts Pascal code to C code. these two programs will be installed when you install GCC. if you have code written in FORTRAN or Pascal that needs to be rewritten in C, f2c and P2c
content), then there is a majority, or none of them agree to any proposal with a number less than n, or they have agreed that the proposal with the largest number in the proposal with a number less than N has v.To meet the requirements of the P2C, the proponents first have to communicate with the majority and obtain the proposal of their last consent before proposing. Then according to the feedback information to determine the content of this proposa
met:P2C: The value of the originating proposal is the largest proposal value in any one of the majority acceptor collections. If this acceptor collection does not accept proposal to use its own value.How to launch p2b from P2C, the use of mathematical induction can easily prove that: suppose in a moment a super half acceptor set C co-accept a proposal K, because set C and any one of the majority acceptor set S There must be a common member, then, aft
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.