代码拉取完成,系统将自动刷新
使用 fork 功能将在后台会为你创建一个与该项目内容一样的同名项目,你可以在这个新项目里自由的修改内容。
建议只在有意向参与改进该项目时使用 fork 功能。
Certain is an asynchronous implementation of paxos log.
1) sh third/autobuild.sh;
2) make -j 4 example;
For server:
Use '-i' and 'e' to override LocalAcceptorID and ExtEndpoint in the configure.
If AcceptorNum is 3 in certain.conf, each server(process) run as:
./simple_srv -c example/example.conf -i 0 -e 127.0.0.1:38240 &
./simple_srv -c example/example.conf -i 1 -e 127.0.0.1:38241 &
./simple_srv -c example/example.conf -i 2 -e 127.0.0.1:38242 &
For client:
~>./simple_cli 127.0.0.1 38240
Get xxx
cmd: cmd 3 uuid 409927680 E(560266, 1) scmd 1 key xxx val.size 0 val ret -7000 // Not Found
Set xxx yyy
cmd: cmd 3 uuid 409927682 E(560266, 1) scmd 2 key xxx val.size 3 val yyy ret 0 // OK
Get xxx
cmd: cmd 3 uuid 409927683 E(560266, 2) scmd 1 key xxx val.size 3 val yyy ret 0 // OK
To have fun, you may kill some of them, and then restart.