-
Notifications
You must be signed in to change notification settings - Fork 30
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
Should be able to alternate between grpc and http for jssdk compatibility #76
Comments
We could also consider - https://grpc.io/docs/platforms/web/ - https://github.com/improbable-eng/grpc-web. |
How do you know grpc will break https://github.com/johanbrandhorst/grpcweb-wasm-example do you have a proof of concept (20-50 lines) proving golang => wasm that can't make grpc calls. |
grpc/grpc-go#2294 grpc-web and grpc are different |
anyway, if grpc can compile to wasm (despite it not being able to run in browser), we can just use runtime param/flag for this. That is probably easier to do |
grpc/grpc-go#2294 - states it doesnt compile to wasm (yet) |
OK. So your plan is to create a go file that's dedicated to network/API interfacing with others? Then you're going to have 2 versions of this go file, one for wasm and one for normal golang RPCs? |
Update on this - |
related to #85 |
After some research golang doesnt have a decent grpc-web client so we cannot use grpc-web, another option is to generate a http client/server from the open api spec using https://github.com/go-swagger/go-swagger |
gRPC-web will be a lot more performant than the grpc-gateway. This should be done as gRPC-gateway has a heavy flaw on the performance, give it a go https://github.com/thinhdanggroup/benchmark-grpc-web-gateway , gRPC-gateway is a lot costlier than gRPC-web. Since we already have our services implemented, gRPC-gateway is an easy way out for us but sooner or later we should focus on gRPC-web when we are on mainnet. https://github.com/grpc/grpc-web#proxy-interoperability official grpc library also mentions about the exisiting grpc-web go proxying. |
If you can find a working golang grpc-web client please go ahead and implement it. |
Isnt that what a reverse proxy is meant to https://github.com/improbable-eng/grpc-web/blob/master/go/grpcwebproxy/ see the following implementation. |
Yea maybe you could try to embed that in gosdk, could work havent tried it |
@mallochine
As jssdk is using gosdk as a wasm dependency, it will break since gosdk is going to start using grpc instead of http soon and browser clients do not support grpc even with wasm.
we can solve this by making gosdk use http/grpc based on some kind of configuration
Possible solution -
The text was updated successfully, but these errors were encountered: