Skip to content
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

added reactive design doc #60

Closed
wants to merge 1 commit into from
Closed

Conversation

Mossaka
Copy link
Member

@Mossaka Mossaka commented Jun 29, 2022

Signed-off-by: Jiaxiao Zhou [email protected]

Signed-off-by: Jiaxiao Zhou <[email protected]>
@Mossaka Mossaka added the 📚 docs Improvements or additions to documentation label Jun 29, 2022
@Mossaka Mossaka linked an issue Jun 29, 2022 that may be closed by this pull request
@danbugs danbugs added this to the July Milestone milestone Jun 29, 2022
Copy link
Collaborator

@danbugs danbugs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

~a couple of suggestions, requests, and questions.

@@ -4,8 +4,8 @@ wasi-cloud is a set of consistent, modular and portable interfaces that provide
1. **Portability**: wasi-cloud is vendor-neutral, and can run on various host environments (e.g., cloud, edge, bare-metal etc.) and deployment runtime (e.g., VM, containers, standalone etc.), using different programming languages (e.g., Rust, C etc.)
2. **Security**: applications that link to wasi-cloud libc will run in a sandboxed environment. The host will put capability functions in a sandboxed environment that the code can run.
3. **Modular**:

![Diagram](./Slide1.jpg)
w
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

~remove stray "w"


let events = exec::Events::get()?;
events
.listen(watch(rd, "my-key1")?))?
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think spacing might have gotten incorrectly formatted here.

}
```

The above example shows that the guest application can define a events resource and listen on streams of events that are observed by invoking `watch` functions on resource descriptors and keys to watch on.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: instead of "a events", say "an events"

Comment on lines +143 to +145
I then gave up using `wit_bindgen_wasmtime::export!("exec.wit");` in the host.

In [the second iteration](https://github.com/Mossaka/wasi-callback/pull/1/files#diff-42cb6807ad74b3e201c5a7ca98b911c5fa08380e942be6e4ac5807f8377f87fc), I copied the generated `[bindings.rs](http://bindings.rs)` to the src folder, and modified the generated APIs in this file to suit my needs. Specifically, I made the API to use reference counting to access host states, and thus I can have two mutable references to the same data structure.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: again again again again, do we want to use first person here?


### Threading

In the reactive design, I want events to expose an API to resources so that each resource can implement their own listen for change code, and send event back to a channel.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: again again again again again, do we want to use first-person here?

@danbugs danbugs force-pushed the main branch 4 times, most recently from 09239e3 to 0921137 Compare July 4, 2022 19:37
@Mossaka Mossaka marked this pull request as draft July 12, 2022 20:03
@Mossaka Mossaka removed this from the July Milestone milestone Jul 21, 2022
@Mossaka Mossaka closed this Aug 8, 2022
@Mossaka Mossaka deleted the jiazho/docs/wasi-callback branch August 8, 2022 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📚 docs Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docs: Improve Documentation
2 participants