gburd / gen_paxos

An Erlang/OTP-style implementation of the PAXOS distributed consensus protocol
http://www.slideshare.net/kuenishi/genpaxos-1679212
Apache License 2.0
59 stars 19 forks source link

wasting 3 second in handshake #2

Open alexshavelev opened 8 years ago

alexshavelev commented 8 years ago

Hi. Sorry, if i made mistake or misunderstood something. But i spend all day reading about Paxos and then playing with this library. I noticed that it works really slow, and started discover source code. So i've noticed that in 'paxos_fsm' module after calling init/1 function it just marks process as system and returns new gen_fsm state, without sending 'process' signal to another node. So we waste 3 seconds waiting for something will never happened. Then after timeout is calling function which will send 'prepare' message to another node. Please correct me, if i've made a mistake, but for now it seems like old bug

tenwz commented 2 years ago

I think it does work like this