Skip to content

Commit

Permalink
Huge updates adding server leave and reset support (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
josehu07 authored Aug 31, 2023
1 parent 4142626 commit 6b8d1fa
Show file tree
Hide file tree
Showing 37 changed files with 1,650 additions and 691 deletions.
24 changes: 24 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ serde = { version = "1.0", features = ["derive"] }
toml = { version = "0.7", features = ["parse"] }
log = "0.4"
reed-solomon-erasure = { version = "6.0", features = ["simd-accel"] }
ctrlc = { version = "3.4", features = ["termination"] }
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Summerset is a distributed key-value store supporting a wide range of state mach
| `RepNothing` | Simplest protocol w/o any replication |
| `SimplePush` | Pushing to peers w/o any consistency guarantees |
| `MultiPaxos` | Classic [MultiPaxos](https://www.microsoft.com/en-us/research/uploads/prod/2016/12/paxos-simple-Copy.pdf) protocol |
| `RS-Paxos` | MultiPaxos w/ Reed-Solomon erasure code sharding |

Formal TLA+ specification of some protocols are provided in `tla+/`.

Expand Down
119 changes: 0 additions & 119 deletions scripts/local_bench.tmp.py

This file was deleted.

23 changes: 8 additions & 15 deletions scripts/local_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,6 @@ def run_process(cmd):
MANAGER_CLI_PORT = 52601


PROTOCOL_CONFIGS = {
"RepNothing": "",
"SimplePush": "",
"MultiPaxos": "",
"RSPaxos": "",
}


UTILITY_PARAM_NAMES = {
"repl": [],
"bench": ["freq_target", "value_size", "put_ratio", "length_s"],
Expand Down Expand Up @@ -62,7 +54,7 @@ def compose_client_cmd(protocol, manager, config, utility, params, release):
"-m",
manager,
]
if len(config) > 0:
if config is not None and len(config) > 0:
cmd += ["--config", config]

cmd += ["-u", utility]
Expand All @@ -71,16 +63,16 @@ def compose_client_cmd(protocol, manager, config, utility, params, release):

# if in benchmarking mode, lower the client's CPU scheduling priority
if utility == "bench":
cmd = ["nice", "-n", "15"] + cmd
cmd = ["nice", "-n", "19"] + cmd

return cmd


def run_client(protocol, utility, params, release):
def run_client(protocol, utility, params, release, config):
cmd = compose_client_cmd(
protocol,
f"127.0.0.1:{MANAGER_CLI_PORT}",
PROTOCOL_CONFIGS[protocol],
config,
utility,
params,
release,
Expand All @@ -96,6 +88,9 @@ def run_client(protocol, utility, params, release):
"-p", "--protocol", type=str, required=True, help="protocol name"
)
parser.add_argument("-r", "--release", action="store_true", help="run release mode")
parser.add_argument(
"-c", "--config", type=str, help="protocol-specific TOML config string"
)

subparsers = parser.add_subparsers(
required=True,
Expand Down Expand Up @@ -128,9 +123,6 @@ def run_client(protocol, utility, params, release):

args = parser.parse_args()

if args.protocol not in PROTOCOL_CONFIGS:
raise ValueError(f"unknown protocol name '{args.protocol}'")

# build everything
do_cargo_build(args.release)

Expand All @@ -140,6 +132,7 @@ def run_client(protocol, utility, params, release):
args.utility,
glue_params_str(args, UTILITY_PARAM_NAMES[args.utility]),
args.release,
args.config,
)

rc = client_proc.wait()
Expand Down
Loading

0 comments on commit 6b8d1fa

Please sign in to comment.