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

Node-based proxy #6

Open
paralin opened this issue Oct 21, 2016 · 10 comments
Open

Node-based proxy #6

paralin opened this issue Oct 21, 2016 · 10 comments
Assignees

Comments

@paralin
Copy link
Collaborator

paralin commented Oct 21, 2016

Some things I am interested in doing:

  • Running the proxy in a Node.JS process
  • Allowing arbitrary transport to the proxy (websocket, any other two-way link like WebRTC)
@paralin
Copy link
Collaborator Author

paralin commented Nov 2, 2016

Done here: http://github.com/paralin/grpc-bus

Any comments?

@wenbozhu
Copy link
Member

wenbozhu commented Nov 2, 2016

Cool. Any doc on the supported transport/protocols?

@paralin
Copy link
Collaborator Author

paralin commented Nov 3, 2016

@wenbozhu supports literally anything. You give it a function for send(message) {} and it expects that message to end up at handleMessage(message) on the server. Also, the thing passed to send() is a ProtoBuf message so it supports binary serialization.

@wenbozhu
Copy link
Member

wenbozhu commented Jun 6, 2017

Thanks for the update!

Are you interested in implementing the grpc-web spec in the Node proxy?

https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-WEB.md

There is already a Go proxy from Improbable. We are happy to review the Node proxy implementation and include the Node proxy in grpc-web interoperability test suite.

@lewish
Copy link

lewish commented Nov 4, 2019

I've taken a stab at this, because we needed it ourselves for something: https://github.com/dataform-co/dataform/tree/master/tools/grpc-web-proxy

It seems to be working well for unary calls, I haven't had a chance to test it for streaming yet! Would be happy to discuss moving this somewhere official, but not sure I have the time to do that myself.

@stanley-cheung
Copy link
Collaborator

@lewish This looks promising! Let us check this out and we can discuss where it's more appropriate to host this later. Thanks!

loyalpartner pushed a commit to loyalpartner/grpc-web that referenced this issue Sep 4, 2020
update js prototype to grpc-web spec
@petermetz
Copy link

@lewish I'm late for the party, your link goes to 404. Did you ever end up finishing that implementation so that it supports streaming as well? :-)

@tiero
Copy link

tiero commented Nov 27, 2021

@lewish I'm late for the party, your link goes to 404. Did you ever end up finishing that implementation so that it supports streaming as well? :-)

maybe this? https://github.com/dataform-co/dataform/tree/master/grpc-web-proxy

@petermetz
Copy link

@tiero Thank you! Unfortunately it says in the readme on that link that This has only been tested with unary gRPC calls. :-(

@tiero
Copy link

tiero commented Dec 1, 2021

@petermetz I tested for my use case where I use grpc-web-text (ie. messages are encoded as base64) and is not supported either, guess is same reason only works for unary calls.

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

6 participants