Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Huge updates adding server leave and reset support #16

Merged
merged 22 commits into from
Aug 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"] }
39 changes: 4 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,8 @@
This is a private mirror of [Summerset](https://github.com/josehu07/summerset). Below are a memo of development commands...

To create a branch to track public repo `main`, pull new things from it, and merge into the private `main`:

```bash
# in the private repo:
git remote add public git@github.com:josehu07/summerset.git
git config --add --local checkout.defaultRemote origin
git checkout -b public-main
git branch --set-upstream-to=public/main public-main
git checkout main
# skip the above for later times
git pull public
git merge public-main
git push
```

To create a pull request on the public repo to make batched contributions from private repo `main`:

```bash
# in the public repo:
git remote add private git@github.com:josehu07/summerset-private.git
git config --add --local checkout.defaultRemote origin
# skip the above for later times
git checkout -b <PR_name>
git branch --set-upstream-to=private/main <PR_name>
git pull private
git push origin <PR_name>
# then, on GitHub, make a PR from <PR_name> branch to main
```

# Summerset

[![Format check](https://github.com/josehu07/summerset-private/actions/workflows/format.yml/badge.svg)](https://github.com/josehu07/summerset/actions?query=josehu07%3Aformat)
[![Build status](https://github.com/josehu07/summerset-private/actions/workflows/build.yml/badge.svg)](https://github.com/josehu07/summerset/actions?query=josehu07%3Abuild)
[![Tests status](https://github.com/josehu07/summerset-private/actions/workflows/tests.yml/badge.svg)](https://github.com/josehu07/summerset/actions?query=josehu07%3Atests)
[![Format check](https://github.com/josehu07/summerset/actions/workflows/format.yml/badge.svg)](https://github.com/josehu07/summerset/actions?query=josehu07%3Aformat)
[![Build status](https://github.com/josehu07/summerset/actions/workflows/build.yml/badge.svg)](https://github.com/josehu07/summerset/actions?query=josehu07%3Abuild)
[![Tests status](https://github.com/josehu07/summerset/actions/workflows/tests.yml/badge.svg)](https://github.com/josehu07/summerset/actions?query=josehu07%3Atests)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)

Summerset is a distributed key-value store supporting a wide range of state machine replication (SMR) protocols for research purposes. More protocols are actively being added.
Expand All @@ -50,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 Expand Up @@ -148,7 +118,6 @@ Complete cluster management and benchmarking scripts are available in another re
- [ ] separate commit vs. exec responses?
- [ ] membership discovery & view changes
- [ ] implementation of Raft
- [ ] implementation of Crossword prototype
- [x] client-side utilities
- [x] REPL-style client
- [x] random benchmarking client
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