Skip to content

Updating JS host payloads and simple examples #27

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

brooksmtownsend
Copy link
Member

@brooksmtownsend brooksmtownsend commented Dec 19, 2022

This PR is an effort to update topics, cloudevent payloads, and READMEs to make this host easy to run and simple to hook into an existing wasmCloud lattice.

So far I've

  • Renamed the old simple example to console since all interaction goes through the browser console. It's great to keep this example since it has sample config for esbuild, webpack, and importing
  • Added more to the console example including a simple web UI for launching a host. The goal is for this example to be an easy way to run a single command and have a running JS host
  • Updated the host_started and heartbeat payloads to include friendly name and labels

TODO

  • Update actor_started payloads to include claims and required info
  • Update actor_stopped payloads to include claims and required info (can be in a future PR since you can just refresh the tab to stop an actor 😉
  • Ensure this host can listen to topics like start_provider to return an error message, get inventory to respond with its contents, and the auction topic to accept actors and not capability providers (can be in a future PR)
  • Bundle the host into a simple React app or similar to show how this might look in a JS framework (added simple example)
  • See what this could do with https://github.com/inokawa/react-native-react-bridge (unfortunately, very outdated)
  • In the root level of this repository, add a simple script like cd examples/console; docker compose up -d; npm install; npm run start. Need to include prerequisites
  • See about updating the npm JS library so other people could embed this host

Signed-off-by: Brooks Townsend <brooks@cosmonic.com>
Signed-off-by: Brooks Townsend <brooks@cosmonic.com>
Signed-off-by: Brooks Townsend <brooks@cosmonic.com>
Signed-off-by: Brooks Townsend <brooks@cosmonic.com>
@brooksmtownsend brooksmtownsend changed the title [WIP] Updating JS host payloads and examples Updating JS host payloads and simple examples Dec 22, 2022
@brooksmtownsend brooksmtownsend marked this pull request as ready for review December 22, 2022 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant