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
Consider configuring ProtoReflectionService
to use it without internal APIs
#7138
Comments
Motivation: gRPC-Java [1.30.0](https://github.com/grpc/grpc-java/releases/tag/v1.30.0) has been released We need a workaround for `ProtoReflectionService`. Because it does not implement `InternalNotifyOnServerBuild` anymore. See grpc/grpc-java#6967 line#2806 It is a temporary workaround until upstream handles grpc/grpc-java#7138. Motivations: - Upgrade gRPC to 1.30.0 from 1.29.0 - Add ProtoReflectionServiceInterceptor that injects dummy server to gRPC context. Result: You can run gRPC 1.30.0 with Armeria server.
Motivation: gRPC-Java [1.30.0](https://github.com/grpc/grpc-java/releases/tag/v1.30.0) has been released We need a workaround for `ProtoReflectionService`. Because it does not implement `InternalNotifyOnServerBuild` anymore. See grpc/grpc-java#6967 line#2806 It is a temporary workaround until upstream handles grpc/grpc-java#7138. Motivations: - Upgrade gRPC to 1.30.0 from 1.29.0 - Add ProtoReflectionServiceInterceptor that injects dummy server to gRPC context. Result: You can run gRPC 1.30.0 with Armeria server. Fixes line#2806
The server reflection protocol in gRPC was designed
So its primary usage is to expose services running on a gRPC server. Armeria's usage of ProtoReflectionService is a pretty hacky way that takes advantage of You could design/define your own gRPC service to expose other services at runtime that does not depend on |
We don't really need |
I'd actually expect Armeria to have a reasonably good time just returning the existing Server shim from ServerCall instead of passing it to It might be fair to split the non-lifecycle methods out of Server, to have a "managed" vs "unmanaged" split like we have for Channel. But it seems that may be an overkill. |
As you said, I implemented an intercepter that injects a dummy server to the current gRPC context. It is a workaround but a hacky way. It would be nice to support an API not to depend on gRPC internal implementations. :-) |
Oh, I forgot we swapped to the internal Context key. Earlier in the iteration we had a ServerCall.getServer() API. We were having trouble settling on the replacement API and it seemed better to do the Context hack as an internal API to replace the previous broken internal API instead of delaying any longer. |
Motivation: gRPC-Java [1.30.0](https://github.com/grpc/grpc-java/releases/tag/v1.30.0) has been released We need a workaround for `ProtoReflectionService`. Because it does not implement `InternalNotifyOnServerBuild` anymore. See grpc/grpc-java#6967 #2806 It is a temporary workaround until upstream handles grpc/grpc-java#7138. Modifications: - Upgrade gRPC to 1.30.0 from 1.29.0 - Add ProtoReflectionServiceInterceptor that injects dummy server to gRPC context. Result: You can run gRPC 1.30.0 with Armeria server. Fixes #2806
ProtoReflectionService
to use it without gRPC-Java serverProtoReflectionService
to use it without internal APIs
Motivation: gRPC-Java [1.30.0](https://github.com/grpc/grpc-java/releases/tag/v1.30.0) has been released We need a workaround for `ProtoReflectionService`. Because it does not implement `InternalNotifyOnServerBuild` anymore. See grpc/grpc-java#6967 line#2806 It is a temporary workaround until upstream handles grpc/grpc-java#7138. Modifications: - Upgrade gRPC to 1.30.0 from 1.29.0 - Add ProtoReflectionServiceInterceptor that injects dummy server to gRPC context. Result: You can run gRPC 1.30.0 with Armeria server. Fixes line#2806
Due to the popularity of gRPC, some frameworks or libraries have an integration layer for gRPC.
Especially, Armeria has its own server/client implementations to serve/call a gRPC stub.
ProtoReflectionService
is using the internal reference of a gRPC-Java server instance since 1.30.0 #6967.That means a stub running without gRPC-Java server could not use
ProtoReflectionService
. line/armeria#2806Armeria injects
ServerServiceDefinition
s toProtoReflectionService
usingnotifyOnBuild()
hook.https://github.com/line/armeria/blob/armeria-0.99.6/grpc/src/main/java/com/linecorp/armeria/server/grpc/FramedGrpcService.java#L271-L275
If
ProtoReflectionService
supports better ways to buildProtoReflectionService
,it could be a good extension point for gRPC-Java ecosystem.
The text was updated successfully, but these errors were encountered: