Comments (5)
不会乱啊,每一个instance内只能确认一个提交。不过后续可以加上选举,可以优化性能,避免活锁等情况。
from mypaxos.
如果说,一个客户端连接是serverA发送命令x,另一个客户端连接serverB发送命令y, 此时serverA作为proposer,是否生成的instanceId =1 的情况下,serverB也会同样生成instanceId=1,这个时候,你以哪一个为准呢?一个必然会覆盖另一个,所以必须要选择主的情况下才可以,避免这个Instance创建
from mypaxos.
@txm119161336 其实不会的,建议你仔细看下paxos原理和实现相关的论文。因为在每个instance内,只有一个client的提案能够成功,而另外一个client 的提案在这个instance内只能同意已经被多数派同意的提案。所以另外一个client只能将自己的提案留到下一个instance,去提交。
from mypaxos.
@luohaha,
非常感谢你的回复,
我看错了,有一个while的条件在外面,我开始没看到,我以为你缺少了propose的重试的部分,不过即便这样,性能也是相当低的,是二阶段的通信,你说优化过了
实现了multi-paxos中连续同一leader提交时,优化协议流程,将prepare和accept流程,优化到只有accept流程,目前还是先需要propose,而后再进行acceptor
好像情况不是这样的,还是需要经过一轮的prepare的
from mypaxos.
@txm119161336 对,只有在同一个proposer连续提交的时候,才能做优化,否则就会退化到两阶段。所以leader选举是需要的,不过是为了性能考虑(两阶段优化到一阶段),而不是为了正确性考虑。
from mypaxos.
Related Issues (13)
- learner 在学习过程当中,有个问题。 HOT 1
- 无法再本地复现测试用例 HOT 2
- GroupId
- Image Lost HOT 1
- 如何验证算法的正确性?
- MyPaxos 好像不是Multi-Paxos协议的实现?
- multi-paxos 优化 有逻辑错误 HOT 2
- 完成动态成员变更 HOT 1
- 编写测试用例
- 开始测试时,资源占用很大。 HOT 1
- 报错
- 请问一下分组group在这里起到了什么作用? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mypaxos.