├── .gitignore ├── LICENSE ├── README.md ├── gryadka-core ├── index.js ├── package.json └── src │ ├── BallotNumber.js │ └── Proposer.js ├── gryadka-redis ├── index.js ├── package.json └── src │ ├── AcceptorClient.js │ └── lua │ ├── accept.lua │ └── prepare.lua ├── http-example ├── README.md ├── build-run.sh ├── clear.sh ├── docker-compose.yaml ├── node-acceptor │ ├── Dockerfile │ ├── init-acceptor.sh │ ├── node.conf │ ├── redis.conf │ └── run-redis.sh ├── node-control │ ├── Dockerfile │ ├── build.sh │ ├── clear.sh │ ├── clients │ │ ├── bin │ │ │ └── install-npm.sh │ │ ├── package.json │ │ └── src │ │ │ └── test.js │ ├── control │ │ ├── bin │ │ │ └── install-npm.sh │ │ ├── package.json │ │ └── src │ │ │ └── test.js │ ├── run-client.sh │ ├── run-control.sh │ ├── wipe-acceptor-1.sh │ ├── wipe-acceptor-2.sh │ └── wipe-acceptor-3.sh └── node-proposer │ ├── Dockerfile │ ├── gryadka-core │ ├── index.js │ ├── package.json │ └── src │ │ ├── BallotNumber.js │ │ └── Proposer.js │ ├── gryadka-redis │ ├── index.js │ ├── package.json │ └── src │ │ ├── AcceptorClient.js │ │ └── lua │ │ ├── accept.lua │ │ └── prepare.lua │ ├── http-proposer │ ├── conf │ │ └── configuration.json │ ├── package.json │ ├── src │ │ ├── HttpProposer.js │ │ ├── config.js │ │ └── proposerByConfig.js │ └── test.js │ ├── node.conf │ └── run-http-proposer.sh ├── lines.sh └── simulation ├── Dockerfile ├── README.md ├── bin └── npm-install.sh ├── build-run.sh ├── clear.sh ├── package.json └── src ├── lib ├── Acceptor.js ├── Context.js ├── Mocks.js ├── Random.js ├── Timer.js ├── clients │ ├── IncClient.js │ ├── IncConsistencyChecker.js │ └── ReadAllKeysClient.js ├── logging │ ├── LimitedVoid.js │ ├── LogChecker.js │ ├── LogWriter.js │ └── Void.js └── proxies │ ├── DelayProxy.js │ ├── FilteringProxy.js │ ├── LoggingProxy.js │ ├── LosingProxy.js │ ├── Proxy.js │ └── ShufflingProxy.js ├── runner.js └── scenarios ├── losing ├── c1p1k1.js ├── c2p2k1.i.js ├── c2p2k2.js └── c6p2k2.js ├── membership ├── c2p2k2.a3.a4.js └── c2p2k2.flux.js ├── partitioning ├── c1p1k1.js └── c2p2k2.js └── shuffling ├── c1p1k1.js ├── c1p2k2.js ├── c2p1k2.js └── c2p2k1.js /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/.gitignore -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/README.md -------------------------------------------------------------------------------- /gryadka-core/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/gryadka-core/index.js -------------------------------------------------------------------------------- /gryadka-core/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/gryadka-core/package.json -------------------------------------------------------------------------------- /gryadka-core/src/BallotNumber.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/gryadka-core/src/BallotNumber.js -------------------------------------------------------------------------------- /gryadka-core/src/Proposer.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/gryadka-core/src/Proposer.js -------------------------------------------------------------------------------- /gryadka-redis/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/gryadka-redis/index.js -------------------------------------------------------------------------------- /gryadka-redis/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/gryadka-redis/package.json -------------------------------------------------------------------------------- /gryadka-redis/src/AcceptorClient.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/gryadka-redis/src/AcceptorClient.js -------------------------------------------------------------------------------- /gryadka-redis/src/lua/accept.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/gryadka-redis/src/lua/accept.lua -------------------------------------------------------------------------------- /gryadka-redis/src/lua/prepare.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/gryadka-redis/src/lua/prepare.lua -------------------------------------------------------------------------------- /http-example/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/http-example/README.md -------------------------------------------------------------------------------- /http-example/build-run.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/http-example/build-run.sh -------------------------------------------------------------------------------- /http-example/clear.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/http-example/clear.sh -------------------------------------------------------------------------------- /http-example/docker-compose.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/http-example/docker-compose.yaml -------------------------------------------------------------------------------- /http-example/node-acceptor/Dockerfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/http-example/node-acceptor/Dockerfile -------------------------------------------------------------------------------- /http-example/node-acceptor/init-acceptor.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/http-example/node-acceptor/init-acceptor.sh -------------------------------------------------------------------------------- /http-example/node-acceptor/node.conf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/http-example/node-acceptor/node.conf -------------------------------------------------------------------------------- /http-example/node-acceptor/redis.conf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/http-example/node-acceptor/redis.conf -------------------------------------------------------------------------------- /http-example/node-acceptor/run-redis.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/http-example/node-acceptor/run-redis.sh -------------------------------------------------------------------------------- /http-example/node-control/Dockerfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/http-example/node-control/Dockerfile -------------------------------------------------------------------------------- /http-example/node-control/build.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/http-example/node-control/build.sh -------------------------------------------------------------------------------- /http-example/node-control/clear.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/http-example/node-control/clear.sh -------------------------------------------------------------------------------- /http-example/node-control/clients/bin/install-npm.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd /gryadka/clients 4 | npm install 5 | -------------------------------------------------------------------------------- /http-example/node-control/clients/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/http-example/node-control/clients/package.json -------------------------------------------------------------------------------- /http-example/node-control/clients/src/test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/http-example/node-control/clients/src/test.js -------------------------------------------------------------------------------- /http-example/node-control/control/bin/install-npm.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd /gryadka/control 4 | npm install 5 | -------------------------------------------------------------------------------- /http-example/node-control/control/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/http-example/node-control/control/package.json -------------------------------------------------------------------------------- /http-example/node-control/control/src/test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/http-example/node-control/control/src/test.js -------------------------------------------------------------------------------- /http-example/node-control/run-client.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/http-example/node-control/run-client.sh -------------------------------------------------------------------------------- /http-example/node-control/run-control.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/http-example/node-control/run-control.sh -------------------------------------------------------------------------------- /http-example/node-control/wipe-acceptor-1.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/http-example/node-control/wipe-acceptor-1.sh -------------------------------------------------------------------------------- /http-example/node-control/wipe-acceptor-2.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/http-example/node-control/wipe-acceptor-2.sh -------------------------------------------------------------------------------- /http-example/node-control/wipe-acceptor-3.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/http-example/node-control/wipe-acceptor-3.sh -------------------------------------------------------------------------------- /http-example/node-proposer/Dockerfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/http-example/node-proposer/Dockerfile -------------------------------------------------------------------------------- /http-example/node-proposer/gryadka-core/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/http-example/node-proposer/gryadka-core/index.js -------------------------------------------------------------------------------- /http-example/node-proposer/gryadka-core/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/http-example/node-proposer/gryadka-core/package.json -------------------------------------------------------------------------------- /http-example/node-proposer/gryadka-core/src/BallotNumber.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/http-example/node-proposer/gryadka-core/src/BallotNumber.js -------------------------------------------------------------------------------- /http-example/node-proposer/gryadka-core/src/Proposer.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/http-example/node-proposer/gryadka-core/src/Proposer.js -------------------------------------------------------------------------------- /http-example/node-proposer/gryadka-redis/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/http-example/node-proposer/gryadka-redis/index.js -------------------------------------------------------------------------------- /http-example/node-proposer/gryadka-redis/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/http-example/node-proposer/gryadka-redis/package.json -------------------------------------------------------------------------------- /http-example/node-proposer/gryadka-redis/src/AcceptorClient.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/http-example/node-proposer/gryadka-redis/src/AcceptorClient.js -------------------------------------------------------------------------------- /http-example/node-proposer/gryadka-redis/src/lua/accept.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/http-example/node-proposer/gryadka-redis/src/lua/accept.lua -------------------------------------------------------------------------------- /http-example/node-proposer/gryadka-redis/src/lua/prepare.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/http-example/node-proposer/gryadka-redis/src/lua/prepare.lua -------------------------------------------------------------------------------- /http-example/node-proposer/http-proposer/conf/configuration.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/http-example/node-proposer/http-proposer/conf/configuration.json -------------------------------------------------------------------------------- /http-example/node-proposer/http-proposer/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/http-example/node-proposer/http-proposer/package.json -------------------------------------------------------------------------------- /http-example/node-proposer/http-proposer/src/HttpProposer.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/http-example/node-proposer/http-proposer/src/HttpProposer.js -------------------------------------------------------------------------------- /http-example/node-proposer/http-proposer/src/config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/http-example/node-proposer/http-proposer/src/config.js -------------------------------------------------------------------------------- /http-example/node-proposer/http-proposer/src/proposerByConfig.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/http-example/node-proposer/http-proposer/src/proposerByConfig.js -------------------------------------------------------------------------------- /http-example/node-proposer/http-proposer/test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/http-example/node-proposer/http-proposer/test.js -------------------------------------------------------------------------------- /http-example/node-proposer/node.conf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/http-example/node-proposer/node.conf -------------------------------------------------------------------------------- /http-example/node-proposer/run-http-proposer.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/http-example/node-proposer/run-http-proposer.sh -------------------------------------------------------------------------------- /lines.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/lines.sh -------------------------------------------------------------------------------- /simulation/Dockerfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/simulation/Dockerfile -------------------------------------------------------------------------------- /simulation/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/simulation/README.md -------------------------------------------------------------------------------- /simulation/bin/npm-install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd /gryadka/simulation 4 | npm install 5 | -------------------------------------------------------------------------------- /simulation/build-run.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/simulation/build-run.sh -------------------------------------------------------------------------------- /simulation/clear.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/simulation/clear.sh -------------------------------------------------------------------------------- /simulation/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/simulation/package.json -------------------------------------------------------------------------------- /simulation/src/lib/Acceptor.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/simulation/src/lib/Acceptor.js -------------------------------------------------------------------------------- /simulation/src/lib/Context.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/simulation/src/lib/Context.js -------------------------------------------------------------------------------- /simulation/src/lib/Mocks.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/simulation/src/lib/Mocks.js -------------------------------------------------------------------------------- /simulation/src/lib/Random.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/simulation/src/lib/Random.js -------------------------------------------------------------------------------- /simulation/src/lib/Timer.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/simulation/src/lib/Timer.js -------------------------------------------------------------------------------- /simulation/src/lib/clients/IncClient.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/simulation/src/lib/clients/IncClient.js -------------------------------------------------------------------------------- /simulation/src/lib/clients/IncConsistencyChecker.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/simulation/src/lib/clients/IncConsistencyChecker.js -------------------------------------------------------------------------------- /simulation/src/lib/clients/ReadAllKeysClient.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/simulation/src/lib/clients/ReadAllKeysClient.js -------------------------------------------------------------------------------- /simulation/src/lib/logging/LimitedVoid.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/simulation/src/lib/logging/LimitedVoid.js -------------------------------------------------------------------------------- /simulation/src/lib/logging/LogChecker.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/simulation/src/lib/logging/LogChecker.js -------------------------------------------------------------------------------- /simulation/src/lib/logging/LogWriter.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/simulation/src/lib/logging/LogWriter.js -------------------------------------------------------------------------------- /simulation/src/lib/logging/Void.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/simulation/src/lib/logging/Void.js -------------------------------------------------------------------------------- /simulation/src/lib/proxies/DelayProxy.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/simulation/src/lib/proxies/DelayProxy.js -------------------------------------------------------------------------------- /simulation/src/lib/proxies/FilteringProxy.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/simulation/src/lib/proxies/FilteringProxy.js -------------------------------------------------------------------------------- /simulation/src/lib/proxies/LoggingProxy.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/simulation/src/lib/proxies/LoggingProxy.js -------------------------------------------------------------------------------- /simulation/src/lib/proxies/LosingProxy.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/simulation/src/lib/proxies/LosingProxy.js -------------------------------------------------------------------------------- /simulation/src/lib/proxies/Proxy.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/simulation/src/lib/proxies/Proxy.js -------------------------------------------------------------------------------- /simulation/src/lib/proxies/ShufflingProxy.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/simulation/src/lib/proxies/ShufflingProxy.js -------------------------------------------------------------------------------- /simulation/src/runner.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/simulation/src/runner.js -------------------------------------------------------------------------------- /simulation/src/scenarios/losing/c1p1k1.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/simulation/src/scenarios/losing/c1p1k1.js -------------------------------------------------------------------------------- /simulation/src/scenarios/losing/c2p2k1.i.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/simulation/src/scenarios/losing/c2p2k1.i.js -------------------------------------------------------------------------------- /simulation/src/scenarios/losing/c2p2k2.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/simulation/src/scenarios/losing/c2p2k2.js -------------------------------------------------------------------------------- /simulation/src/scenarios/losing/c6p2k2.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/simulation/src/scenarios/losing/c6p2k2.js -------------------------------------------------------------------------------- /simulation/src/scenarios/membership/c2p2k2.a3.a4.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/simulation/src/scenarios/membership/c2p2k2.a3.a4.js -------------------------------------------------------------------------------- /simulation/src/scenarios/membership/c2p2k2.flux.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/simulation/src/scenarios/membership/c2p2k2.flux.js -------------------------------------------------------------------------------- /simulation/src/scenarios/partitioning/c1p1k1.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/simulation/src/scenarios/partitioning/c1p1k1.js -------------------------------------------------------------------------------- /simulation/src/scenarios/partitioning/c2p2k2.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/simulation/src/scenarios/partitioning/c2p2k2.js -------------------------------------------------------------------------------- /simulation/src/scenarios/shuffling/c1p1k1.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/simulation/src/scenarios/shuffling/c1p1k1.js -------------------------------------------------------------------------------- /simulation/src/scenarios/shuffling/c1p2k2.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/simulation/src/scenarios/shuffling/c1p2k2.js -------------------------------------------------------------------------------- /simulation/src/scenarios/shuffling/c2p1k2.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/simulation/src/scenarios/shuffling/c2p1k2.js -------------------------------------------------------------------------------- /simulation/src/scenarios/shuffling/c2p2k1.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gryadka/js/HEAD/simulation/src/scenarios/shuffling/c2p2k1.js --------------------------------------------------------------------------------