jsmouret / grpc-over-webrtc Goto Github PK
View Code? Open in Web Editor NEWgRPC over WebRTC
License: MIT License
gRPC over WebRTC
License: MIT License
Are you using protoc-gen-go from https://github.com/golang/protobuf/tree/master/protoc-gen-go by any chance ?
last update in 14 May, 2020
With the golang and grpc reorg, the new ones are:
which is https://godoc.org/google.golang.org/protobuf/cmd/protoc-gen-go
LIB_PB_REPO= github.com/protocolbuffers
LIB_PB_REPO_FSPATH=
GRPC is now here:https://github.com/grpc/grpc-go
LIB_GRPC_REPO= github.com/grpc
LIB_GRPC_REPO_FSPATH=
cd $(LIB_PB_REPO_FSPATH)/protobuf-go/cmd/protoc-gen-go && go install .
cd $(LIB_GRPC_REPO_FSPATH)/grpc-go/cmd/protoc-gen-go-grpc && go install .
I am using the new ones and on your code it fails:
cd /Users/apple/workspace/go/src/github.com/jsmouret/grpc-over-webrtc/server && chmod +x *.sh
cd /Users/apple/workspace/go/src/github.com/jsmouret/grpc-over-webrtc/server && ./proto.sh
2020/07/15 14:15:21 WARNING: Missing 'go_package' option in "signaling/signaling.proto",
please specify it with the full Go package path as
a future release of protoc-gen-go will require this be specified.
See https://developers.google.com/protocol-buffers/docs/reference/go-generated#package for more information.
--go_out: protoc-gen-go: plugins are not supported; use 'protoc --go-grpc_out=...' to generate gRPC
2020/07/15 14:15:21 WARNING: Missing 'go_package' option in "grtc/grtc.proto",
please specify it with the full Go package path as
a future release of protoc-gen-go will require this be specified.
See https://developers.google.com/protocol-buffers/docs/reference/go-generated#package for more information.
--go_out: protoc-gen-go: plugins are not supported; use 'protoc --go-grpc_out=...' to generate gRPC
2020/07/15 14:15:21 WARNING: Missing 'go_package' option in "echo/echo.proto",
please specify it with the full Go package path as
a future release of protoc-gen-go will require this be specified.
See https://developers.google.com/protocol-buffers/docs/reference/go-generated#package for more information.
--go_out: protoc-gen-go: plugins are not supported; use 'protoc --go-grpc_out=...' to generate gRPC
sed: 1: "protos/echo/echo.pb.go": extra characters at the end of p command
make: *** [proto] Error 1
➜ jsmouret_grpc-over-webrtc git:(master) ✗ which protoc-gen-go
/Users/apple/workspace/go/bin/protoc-gen-go
Hey @jsmouret, cool stuff!
Sorry if I'm overlooking something obvious, but in your repo, the generated function signatures, e. g., in https://github.com/jsmouret/grpc-over-webrtc/blob/master/server/protos/echo/echo.pb.go#L595, expect an interface { RegisterService(*grpc.ServiceDesc, interface{}) }
. When I try to generate code, the same function expects a *grpc.Server
, which of course isn't helpful if I want to pass a WebRTC proxy instead. Did you change the generated file by hand, or am I missing something obvious in the generator options?
Thanks!
Hey! Just wanted to leave a note that I've done a lot of work over on https://github.com/viamrobotics/goutils/tree/main/rpc/examples/echo which adds grpc over webrtc that we've been using at production levels for about a year now. It includes a signaling server implementation via in-memory or MongoDB. This repo is of course credited with the original idea!
I have not dived into the code too deeply, but a code generator that is Protobuf driven might be useful here ?
https://github.com/moul/protoc-gen-gotemplate
It even has a Web based real time ide: http://protoc-gen-gotemplate.m.42.am/
Class 'WebRtcClientBase' incorrectly implements class 'AbstractClientBase'. Did you mean to extend 'AbstractClientBase' and inherit its members as a subclass? Property 'thenableCall' is missing in type 'WebRtcClientBase' but required in type 'AbstractClientBase'.ts(2720)
QuickFix offers add in WebRtcClientBase below code
thenableCall<REQ, RESP>(method: string, request: REQ, metadata: Metadata, methodDescriptor: MethodDescriptor<REQ, RESP>): Promise<RESP> {
throw new Error("Method not implemented.")
}
rpcCall and serverStreaming functions have return error
Property 'removeListener' is missing in type 'WebRtcClientStream<Request, Response>' but required in type 'ClientReadableStream<Response>'.ts(2741) index.d.ts(49, 5): 'removeListener' is declared here.
Type 'WebRtcClientStream<Request, Response>' is not assignable to type 'ClientReadableStream<Response>'.ts(2322)
I use the client-improbable and server programs to test, but when I use webrtc connect, the Web UI message does not echo, and the webrtc peer has been created and connected. Using grpc-web connection can work normally. I want to transfer large files for this package, such as https://github.com/duysmile/grpc-upload-file , how to add and modify?, I found a pilot project github.com/viarobotics/gotutils
I understand the server streaming code but not able to implement the client streaming and bidi module. It will be very helpful if you implement these scenarios as well in your example.
Thanks,
Manoj
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.