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

Provide complete bidirectional example if possible? #205

Closed
alexpdp7 opened this issue Jun 11, 2018 · 5 comments
Closed

Provide complete bidirectional example if possible? #205

alexpdp7 opened this issue Jun 11, 2018 · 5 comments

Comments

@alexpdp7
Copy link

Can you get working a bidirectional proto using grpcwebproxy and a non-Go server? This seems to be working at https://grpcweb.jbrandhorst.com/ ?

Does #180 need to be merged?

Can you clarify the situation and possible document it? Or list the blockers?

@johanbrandhorst
Copy link
Contributor

johanbrandhorst commented Jun 11, 2018

Note: https://grpcweb.jbrandhorst.com/ uses a Go gRPC backend. The source is available at https://github.com/johanbrandhorst/grpcweb-example. For a more minimal example, you can look at https://github.com/johanbrandhorst/grpcweb-boilerplate. I haven't used the standalone proxy but I believe the websocket transport should be supported.

@alexpdp7
Copy link
Author

Yeah, I took a look at it, but was a little bit lost, really- I wonder how much GopherJS-specific magic is there or if grpc-web-client can be made to work. The use case for bidirectional streaming on a "regular" gRPC server (even if requiring a proxy) with Typescript on a browser as the client is really important to me.

@johanbrandhorst
Copy link
Contributor

The GopherJS library just wraps the grpc-web-client, it does all the actual sending of requests. You can definitely do the same thing with just the grpc-web-client. You can take a look at the tests for some examples of how to use bidirectional streaming: https://github.com/improbable-eng/grpc-web/blob/master/test/ts/src/client.websocket.spec.ts#L77

@alexpdp7
Copy link
Author

Ah, that's awesome, thanks!

Thinking egotistically, you can close the ticket, although I'd propose leaving it open so this is documented...

@johanbrandhorst
Copy link
Contributor

Closing as example provided in tests

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

No branches or pull requests

2 participants