Skip to content
This repository has been archived by the owner on Jun 21, 2024. It is now read-only.

Commit

Permalink
Update Hydroflow
Browse files Browse the repository at this point in the history
  • Loading branch information
shadaj committed Jan 5, 2024
1 parent 554f291 commit 53f5cc6
Show file tree
Hide file tree
Showing 6 changed files with 83 additions and 78 deletions.
91 changes: 49 additions & 42 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The template includes two sample programs, `first_ten` and `first_ten_distribute

`first_ten` demonstrates how to use Hydroflow+ to create dataflow programs for a single machine, and can be launched by running `cargo run -p flow --bin first_ten`.

`first_ten_distributed` demonstrates how to use Hydroflow+ to create dataflow programs for a distributed system, and can be launched by running `cargo run -p flow --example first_ten_distributed`. Note the use of `--example` here because `src/bin/first_ten_distributed.rs` contains the binary that will be launched on each node, whereas `examples/first_ten_distributed.rs` contains a deployment script for connecting the nodes together.
`first_ten_distributed` demonstrates how to use Hydroflow+ to create dataflow programs for a distributed system, and can be launched by running `cargo run -p flow --example first_ten_distributed`. Note the use of `--example` here because `src/bin/first_ten_distributed.rs` contains the binary that will be launched for each process, whereas `examples/first_ten_distributed.rs` contains a deployment script for connecting the processes together.

This template also comes with an example of deploying the `first_ten_distributed` flow to Google Cloud. To deploy, you will need to install the [Google Cloud SDK](https://cloud.google.com/sdk/docs/install) and [Terraform](https://developer.hashicorp.com/terraform/install). Then, authenticate with Google Cloud and launch the deployment script with your project ID as an argument:

Expand Down
8 changes: 4 additions & 4 deletions flow/examples/first_ten_distributed.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
use hydro_deploy::{Deployment, HydroflowCrate};
use hydroflow_plus_cli_integration::CLIDeployNodeBuilder;
use hydroflow_plus_cli_integration::DeployProcessSpec;

#[tokio::main]
async fn main() {
let mut deployment = Deployment::new();
let localhost = deployment.Localhost();

let builder = hydroflow_plus::GraphBuilder::new();
let flow = hydroflow_plus::FlowBuilder::new();
flow::first_ten_distributed::first_ten_distributed(
&builder,
&CLIDeployNodeBuilder::new(|| {
&flow,
&DeployProcessSpec::new(|| {
deployment.add_service(
HydroflowCrate::new(".", localhost.clone())
.bin("first_ten_distributed")
Expand Down
Loading

0 comments on commit 53f5cc6

Please sign in to comment.