Skip to content

Commit

Permalink
Move streaming FAQ to Web section (#173)
Browse files Browse the repository at this point in the history
Fixes: connectrpc/connect-es#1105

---------

Signed-off-by: Carol Gunby <[email protected]>
Signed-off-by: Steve Ayers <[email protected]>
  • Loading branch information
rakuista authored and smaye81 committed Sep 30, 2024
1 parent 0393e3e commit 2dd728c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
10 changes: 3 additions & 7 deletions docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,12 +190,9 @@ protocol.

### Is streaming supported?

While the Connect protocol supports _all_ types of streaming RPCs, web browsers
do not support streaming from the client-side across the board. The fetch API
_does_ specify streaming request bodies, but unfortunately, browser vendors have
not come to an agreement to support streams from the client – see this
[WHATWG issue on GitHub][whatwg-streams-issue]. This means you can use streaming
from the browser, but only server-streaming.
The Connect protocol supports _all_ types of streaming RPCs, but web browsers have
some limitations with regard to client streaming. See the [Connect for Web](web/getting-started.mdx)
section for details.

### Does generated code affect bundle size?

Expand Down Expand Up @@ -277,6 +274,5 @@ HTTP2 target group. Route anything else to the gRPC target group.
[main-repo]: https://github.com/connectrpc?view_as=public
[remote plugins]: https://buf.build/docs/bsr/remote-plugins/overview/
[twirp-protocol]: https://github.com/twitchtv/twirp/blob/main/PROTOCOL.md
[whatwg-streams-issue]: https://github.com/whatwg/fetch/issues/1438
[alp-aws-grpc]: https://aws.amazon.com/blogs/aws/new-application-load-balancer-support-for-end-to-end-http-2-and-grpc/
[alp-aws-troubleshooting]: https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-troubleshooting.html#http-464-issues
10 changes: 10 additions & 0 deletions docs/web/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ a very simple natural language processor built in the 1960s to represent a
psychotherapist. The ELIZA service is already up and running, and it defines
a Protocol Buffer schema we'll use to generate a client.

:::note
Though the Connect protocol supports _all_ types of streaming RPCs, web browsers
do not support streaming from the client side across the board. The fetch API
_does_ specify streaming request bodies, but unfortunately, browser vendors have
not come to an agreement to support streams from the client—see this
[WHATWG issue on GitHub][whatwg-streams-issue]. This means you can use streaming
from the browser, but only server streaming.
:::

## Prerequisites

Expand Down Expand Up @@ -314,3 +322,5 @@ In case you mistype a request or response property — let's say you misspell
As an application grows, this compile-time type-safety provided by the
Protocol buffer schema becomes immensely useful. On the next page, we are
going to look at the schema and explain remote and local code generation.

[whatwg-streams-issue]: https://github.com/whatwg/fetch/issues/1438

0 comments on commit 2dd728c

Please sign in to comment.