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

Implement streaming #517

Merged
merged 1 commit into from
Sep 16, 2024
Merged

Implement streaming #517

merged 1 commit into from
Sep 16, 2024

Conversation

dwrensha
Copy link
Member

@dwrensha dwrensha commented Sep 16, 2024

Updates code generation for methods declared with -> stream. For Server traits, these methods have no Results parameter. For Client objects, the methods go through a new StreamingRequest object.

Twoparty RPC connections get a fixed window size that can be configured via twoparty::VatNetwork::set_window_size().

The implementation closely follows capnproto-c++. (See capnproto/capnproto#825.)
One important difference: in capnproto-c++ streaming methods
are delivered one-by-one, without overlap. In Rust, overlapping method calls are less error-prone, so we don't bother with that extra built-in logic.

Adds a new example streaming that performs streaming method calls on a capability returned early via set_pipeline().

Updates code generation for methods declared with `-> stream`.
For Server traits, these methods have no `Results` parameter.
For `Client` objects, the methods go through a new
`StreamingRequest` object.

Twoparty RPC connections get a fixed window size that can
be configured via `twoparty::VatNetwork::set_window_size()`.

The implementation closely follows capnproto-c++. One important
difference: in capnproto-c++ streaming methods
are delivered one-by-one, without overlap. In Rust, overlapping
method calls are less error-prone, so we don't bother with
that extra built-in logic.

Adds a new example `streaming` that performs streaming method calls
on a capability returned early via set_pipeline().
@dwrensha dwrensha merged commit 908cb4c into master Sep 16, 2024
8 checks passed
@dwrensha dwrensha deleted the streaming branch September 16, 2024 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change requires version bump
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant