-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
example(hydroflow): shopping cart working (#690)
Refs: #666
- Loading branch information
1 parent
e1f043c
commit 9029539
Showing
23 changed files
with
648 additions
and
991 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,28 @@ | ||
To run the example: | ||
This directory contains the code for the shopping example from the paper. It includes a driver program in `driver.rs` that generates data from 3 client "sessions" defined in `test_data.rs`. The driver process shuts itself down after a short time since this is just an example. | ||
|
||
Code for the BP and SSIV lattices is in `lattices.rs`. Basic types for the shopping scenario are defined in `structs.rs`. The code for the various Hydroflow examples is in `flows/`. | ||
|
||
To run the driver on an example from the paper, choose one of the following numbered options from the paper: | ||
|
||
1. the original flow (`flows/orig_flow.rs`) | ||
2. the bounded prefix (bp) lattice (`flows/bp_flow.rs`) | ||
3. the sealed set of indexed values (ssiv) lattice (`flows/ssiv_flow.rs`) | ||
4. the sealed set of indexed values (ssiv) lattice with group_by pushed through join (`flows/ssiv_flow_groupby.rs`) | ||
5. decoupled across a network with state at the server (`flows/server_state_flow.rs`) | ||
6. decoupled across a network with state at the client (`flows/client_state_flow.rs`) | ||
7. decoupled across a network with state at a triply-replicated server (`flows/rep_server_flow.rs`) | ||
|
||
Then run the driver program, passing the number of your option to the `--opt` flag. E.g: | ||
``` | ||
cargo run -p hydroflow --example shopping -- --opt 5 | ||
``` | ||
|
||
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). | ||
|
||
For options 1-4, the driver runs a single Hydro transducer (thread) that handles client requests. | ||
|
||
For options 5-6, the driver runs two Hydro transducers, one for each side of the network communication. | ||
|
||
For option 7, the driver runs four Hydro transducers: one client proxy and 3 server replicas. | ||
|
||
Under all options, the driver runs an additional independent Hydro transducer (thread) to receive the output of the flow and print it to the console. The code for this transducer is in `flows/listener_flow.rs`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.