Skip to content

Commit

Permalink
README updates, esp for example
Browse files Browse the repository at this point in the history
  • Loading branch information
bmann committed Oct 4, 2023
1 parent f068d8f commit 4f86ce4
Show file tree
Hide file tree
Showing 4 changed files with 610 additions and 3,046 deletions.
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@
</p>
</div>

<div align="center"><sub>:warning: Work in progress :warning:</sub></div>

##

## Outline

- [Quickstart](#quickstart)
Expand All @@ -63,7 +59,9 @@
## Quickstart

If you're looking to help develop `homestar`, please dive right into our
[development](./DEVELOPMENT.md) guide. Otherwise, the easiest way
[development](./DEVELOPMENT.md) guide.

Otherwise, the easiest way
to get started and see `homestar` in action is to follow-along and run our
image-processing [websocket relay](./examples/websocket-relay) example,
which integrates `homestar` with a browser application to run a
Expand All @@ -73,8 +71,10 @@ to run, and embeds a video demonstrating its usage.

Throughout the `homestar` ecosystem and documentation, we'll draw a distinction
between the [host runtime][host-runtime] and the support for different
[guest languages and bindings][guest]. If you're mainly interested in
learning how to write and build-out Wasm components (in Rust), please jump
[guest languages and bindings][guest].

If you're mainly interested in
learning how to write and build-out Wasm components (currently focused on authoring in Rust), please jump
into our [`homestar-functions`](./homestar-functions) directory
and check out our examples there.

Expand All @@ -89,7 +89,7 @@ as a system.

Our current list includes:

- [websocket relay](./examples/websocket-relay) - An example (browser-based)
- [websocket relay](./examples/websocket-relay/README.md) - An example (browser-based)

This comment has been minimized.

Copy link
@zeeshanlakhani

zeeshanlakhani Oct 4, 2023

Contributor

@bmann ah, in github this usually takes me to the repo with the readme right there, but ok.

application that connects to the `homestar-runtime` over a websocket
connection in order to run a couple static Wasm-based, image processing
workflows that chain inputs and outputs.
Expand Down Expand Up @@ -154,7 +154,8 @@ For usage questions, usecases, or issues reach out to us in our [Discord channel

We would be happy to try to answer your question or try opening a new issue on Github.

## External Resources
## Videos, Presentations, & Other Resources
<a name="external-resources">

This comment has been minimized.

Copy link
@zeeshanlakhani

zeeshanlakhani Oct 4, 2023

Contributor

non closed link?


- [What Is An IPVM][ipvm-wg]
- [IPVM: High-Level Spec][ipvm-spec]
Expand Down
23 changes: 17 additions & 6 deletions examples/websocket-relay/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@

## Description

An example application that connects to a **single** `homestar-runtime` node
An example application that connects to a `homestar-runtime` node
over a websocket connection in order to run static Wasm-based, image
processing workflows that chain inputs and outputs using
[inlined promises][pipelines]. This application demonstrates:
[inlined promises][pipelines].

This application demonstrates:

* websocket notifications of [Ucan Invocation receipts][spec-receipts] sent
between a web client and a `homestar` runner
Expand All @@ -26,9 +28,6 @@ To get started, please install:
If you're using our [nix file](../../flake.nix)], you get these installs for
free.

*Note*: you **do not** have to start-up `kubo`/`ipfs` on your own. The example

This comment has been minimized.

Copy link
@zeeshanlakhani

zeeshanlakhani Oct 4, 2023

Contributor

I want to say this for those no running ipfs already, but I'll incorporate.

will do this for you.

## Usage

1. Run `cargo run -- start -c config/settings.toml` to start the runtime and
Expand All @@ -44,7 +43,19 @@ will do this for you.

https://www.loom.com/share/b0f882adc2ea45709d1f3031b5e61e92?sid=29cb403e-c666-4753-82f5-e35bbb710151

Note that IPFS may attempt to upgrade to a new version and produce an error after the update. Delete the `tmp/.ipfs/` directory and restart to reset the IPFS repo state.
Once you're up and running on localhost, you'll see two workflows with several tasks. You can click on the stack icon on the top right hand corner to inspect the source of the Workflows.

This comment has been minimized.

Copy link
@zeeshanlakhani

zeeshanlakhani Oct 4, 2023

Contributor

+1


Running the first workflow completes a number of tasks and then submits the output to the next task.

The second workflow uses some of the same tasks, and demonstrates how tasks can be skipped if they've been previously run.

## Tips & Common Issues

This comment has been minimized.

Copy link
@zeeshanlakhani

zeeshanlakhani Oct 4, 2023

Contributor

If it's ok, I'll massage this a bit.


On MacOS, verything you need can be installed with brew: `brew install rust npm ipfs`.

If you've got an older install of rust, update it with `rustup update`.

You do not have to start-up `kubo`/`ipfs` on your own. The example will do this for you, and use `examples/websocket-relay/tmp/.ipfs` for a local blockstore. If you're already running an IPFS instance, e.g. IPFS Desktop, please quit it while running this example.

[install-ipfs]: https://docs.ipfs.tech/install/
[install-npm]: https://docs.npmjs.com/downloading-and-installing-node-js-and-npm
Expand Down
Loading

0 comments on commit 4f86ce4

Please sign in to comment.