Skip to content

Commit

Permalink
Merge 2e72659 into sapling-pr-archive-shadaj
Browse files Browse the repository at this point in the history
  • Loading branch information
shadaj authored Dec 9, 2024
2 parents 6969a37 + 2e72659 commit 1beff83
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 18 deletions.
Binary file added docs/src/pages/people-img/rohit.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 9 additions & 6 deletions docs/src/pages/people.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import mingwei from "./people-img/mingwei.jpeg"
import natacha from "./people-img/natacha.jpeg"
import shadaj from "./people-img/shadaj.png"
import lucky from "./people-img/lucky.jpeg"
import rohit from "./people-img/rohit.jpg"
import hydroTurtle from "./people-img/hydro-turtle.png"

import styles from './people.module.css';
Expand Down Expand Up @@ -73,12 +74,7 @@ export default function Home() {
<PersonCard name={"Alvin Cheung"} role={"Faculty"} url={"https://people.eecs.berkeley.edu/~akcheung"} img={akcheung}></PersonCard>
<PersonCard name={"Natacha Crooks"} role={"Faculty"} url={"https://nacrooks.github.io"} img={natacha}></PersonCard>
<PersonCard name={"Joe Hellerstein"} role={"Faculty"} url={"https://dsf.berkeley.edu/jmh"} img={jmh}></PersonCard>
</div>

<div className={styles["subtitle"]}>Postdocs</div>
<div className={styles["personGroup"]}>
<PersonCard name={"Tiemo Bang"} role={"Postdoc"} url={"https://scholar.google.com/citations?user=HDK0KRYAAAAJ&hl=en"} img={hydroTurtle}></PersonCard>
<PersonCard name={"Mae Milano"} role={"Postdoc"} url={"http://www.languagesforsyste.ms"} img={mae}></PersonCard>
<PersonCard name={"Mae Milano"} role={"Faculty"} url={"http://www.languagesforsyste.ms"} img={mae}></PersonCard>
</div>

<div className={styles["subtitle"]}>Graduate Students & Research Engineers</div>
Expand All @@ -88,7 +84,14 @@ export default function Home() {
<PersonCard name={"Shadaj Laddad"} role={"PhD Student"} url={"https://www.shadaj.me"} img={shadaj}></PersonCard>
<PersonCard name={"Conor Power"} role={"PhD Student"} url={"https://www.linkedin.com/in/conorpower23"} img={conor}></PersonCard>
<PersonCard name={"Mingwei Samuel"} role={"Research Engineer"} url={"https://github.com/MingweiSamuel"} img={mingwei}></PersonCard>
<PersonCard name={"Rohit Kulshreshtha"} role={"Research Engineer"} url={"https://www.linkedin.com/in/lucky-k-59020457/"} img={rohit}></PersonCard>
</div>

<div className={styles["subtitle"]}>Alumni</div>
<div className={styles["personGroup"]}>
<PersonCard name={"Tiemo Bang"} role={"Postdoc"} url={"https://scholar.google.com/citations?user=HDK0KRYAAAAJ&hl=en"} img={hydroTurtle}></PersonCard>
<PersonCard name={"Lucky Katahanas"} role={"Research Engineer"} url={"https://www.linkedin.com/in/lucky-k-59020457/"} img={lucky}></PersonCard>
<PersonCard name={"Justin Jaffray"} role={"Research Engineer"} url={"https://www.linkedin.com/in/justinjaffray/"} img={hydroTurtle}></PersonCard>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Two Phase Commit
This is a remedial 2PC implementation.
This is a remedial 2PC implementation.

Design limitations:
- No database logging (just log statements via println)
Expand All @@ -8,22 +8,22 @@ Design limitations:
- Subordinates make random decisions whether to commit or abort

### To Run the code:
Look in the file `members.json` to find the addresses of the coordinator and subordinates.
Look in the file `members.json` to find the addresses of the coordinator and subordinates.
For the coordinator, launch a process on the node with a matching IP address as follows.
Here we assume the coordinator's IP address is `localhost` and port `12346` is free:
```
cargo run --example two_pc -- --path hydroflow/examples/two_pc/members.json --role coordinator --addr localhost:12346
cargo run --example two_pc_hf -- --path hydroflow/examples/two_pc_hf/members.json --role coordinator --addr localhost:12346
```

Now for each subordinate, launch a process on the node with the matching IP address as follows.
Here we assume the subordinate's IP address is `127.0.0.1` and port `12349` is free:
```
cargo run --example two_pc -- --path hydroflow/examples/two_pc/members.json --role subordinate --addr localhost:12349
cargo run --example two_pc_hf -- --path hydroflow/examples/two_pc_hf/members.json --role subordinate --addr localhost:12349
```

Now, in the coordinator process you can type an integer at `stdin`. Each integer you type is considered a transaction ID,
Now, in the coordinator process you can type an integer at `stdin`. Each integer you type is considered a transaction ID,
and a two-phase commit process is run for that transaction. Votes to commit or abort are randomized.

You should see logging information on screen at both the coordinator and the subordinates.

Adding the `--graph <graph_type>` flag to the end of the command lines above will print out a node-and-edge diagram of the program. Supported values for `<graph_type>` include [mermaid](https://mermaid-js.github.io/) and [dot](https://graphviz.org/doc/info/lang.html).
Adding the `--graph <graph_type>` flag to the end of the command lines above will print out a node-and-edge diagram of the program. Supported values for `<graph_type>` include [mermaid](https://mermaid-js.github.io/) and [dot](https://graphviz.org/doc/info/lang.html).
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -69,28 +69,31 @@ fn test() {

use hydroflow::util::{run_cargo_example, wait_for_process_output};

const TEST_NAME: &str = "two_pc_hf";

let members_path = format!(
"{}/examples/two_pc/members.json",
env!("CARGO_MANIFEST_DIR")
"{}/examples/{}/members.json",
env!("CARGO_MANIFEST_DIR"),
TEST_NAME,
);

let (_coordinator, mut coordinator_stdin, mut coordinator_stdout) = run_cargo_example(
"two_pc",
TEST_NAME,
&format!("--path {members_path} --role coordinator --addr 127.0.0.1:12346"),
);

let (_subordinate1, _, mut subordinate1_stdout) = run_cargo_example(
"two_pc",
TEST_NAME,
&format!("--path {members_path} --role subordinate --addr 127.0.0.1:12347"),
);

let (_subordinate2, _, mut subordinate2_stdout) = run_cargo_example(
"two_pc",
TEST_NAME,
&format!("--path {members_path} --role subordinate --addr 127.0.0.1:12348"),
);

let (_subordinate3, _, mut subordinate3_stdout) = run_cargo_example(
"two_pc",
TEST_NAME,
&format!("--path {members_path} --role subordinate --addr 127.0.0.1:12349"),
);

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 1beff83

Please sign in to comment.