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

Support JSON Transcoding for gRPC services -- allows services to be called via plain HTTP #25837

Open
GavinRay97 opened this issue May 27, 2022 · 10 comments
Labels
area/grpc gRPC area/vertx kind/enhancement New feature or request triage/upstream Used for issues which are caused by issues in upstream projects/dependency

Comments

@GavinRay97
Copy link
Contributor

Description

It would be really useful if Quarkus' gRPC implementation allowed configuring JSON Transcoding:

(Maybe it already does this and I just missed the docs/tests?)

syntax = "proto3";
import "google/api/annotations.proto";
package greet;

service Greeter {
  rpc SayHello (HelloRequest) returns (HelloReply) {
    option (google.api.http) = {
      get: "/v1/greeter/{name}"
    };
  }
}

message HelloRequest {
  string name = 1;
}

message HelloReply {
  string message = 1;
}

Implementation ideas

No response

@GavinRay97 GavinRay97 added the kind/enhancement New feature or request label May 27, 2022
@quarkus-bot quarkus-bot bot added the area/grpc gRPC label May 27, 2022
@quarkus-bot
Copy link

quarkus-bot bot commented May 27, 2022

/cc @cescoffier, @michalszynkiewicz

@michalszynkiewicz
Copy link
Member

Quarkus does not support it at the moment but it is a nice idea. I have no idea where we'll have time to implement it though, at this point.

@GavinRay97
Copy link
Contributor Author

GavinRay97 commented Jun 1, 2022

Trying to think about how this could potentially work (maybe I could take a stab at it)

  1. Find a Java .proto parser
  2. Write a codegen program that analyzes .proto services and creates:
  3. Make this into a Quarkus plugin, or Maven/Gradle

Does this sound reasonable? Are there hangups that someone might run into with this?

@cescoffier
Copy link
Member

Yes, it looks like a good plan. I would not register endpoints in RestEasy reactive but work at the 'router' level directly (so you do not need RestEasy reactive, just vertx htttp which is the base of everything Http related).

Also we need to think about streams. Did you think about them?

@hardikp-fens
Copy link

I wanted to utilize this feature in my quarkus project, so are there any updates regarding this?

/cc @cescoffier, @michalszynkiewicz

@schonbachler
Copy link

This would be a very useful feature. gRPC-web transcoding would be a related feature. As of now - a possible solution is to use a reverse-proxy (like envoy) in front, that does the transcoding.

@cescoffier
Copy link
Member

Vert.x is coming with an implementation of the gRPC Web "proxy" which would be built in in the gRPC server.

CC @tsegismont

@cescoffier
Copy link
Member

Vert.x 5 is coming with gRPC Web support - We will integrate gRPC Web at that point (2025).

@cescoffier cescoffier added area/vertx triage/upstream Used for issues which are caused by issues in upstream projects/dependency labels Sep 25, 2024
@schonbachler
Copy link

@cescoffier Great news. Please keep in mind that grpc web and grpc JSON transcoding are two different things.

@cescoffier
Copy link
Member

@schonbachler I know, but at the moment, our priority is gRPC Web. Contributions are more than welcome for gRPC JSON.

@cescoffier cescoffier changed the title [FR]: Support JSON Transcoding for gRPC services -- allows services to be called via plain HTTP Support JSON Transcoding for gRPC services -- allows services to be called via plain HTTP Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/grpc gRPC area/vertx kind/enhancement New feature or request triage/upstream Used for issues which are caused by issues in upstream projects/dependency
Projects
None yet
Development

No branches or pull requests

5 participants