Skip to content

Support for gRPC-JSON Transcoding #339

@thinkhard-j-park

Description

@thinkhard-j-park

Many gRPC services need to be exposed as RESTful JSON APIs to support legacy clients, frontend applications, or public APIs that do not support gRPC natively. Currently, users often have to set up a separate proxy (like Envoy) or use a separate gateway service just to handle this translation.

I would like to propose adding support for gRPC-JSON Transcoding directly within spring-grpc. This feature allows mapping JSON/HTTP requests to gRPC methods using configuration (often via google.api.http annotations in Protobuf).

This concept is well-documented in Google Cloud Endpoints: Transcoding HTTP/JSON to gRPC.

Currently, other ecosystems and frameworks within the Java landscape provide this functionality:

  • Armeria: Provides built-in support for serving gRPC and REST/JSON from the same port.
  • Spring Cloud Gateway: Offers a JsonToGrpc filter factory to act as a transcoding gateway.

Having native support or a dedicated starter in spring-grpc (e.g., essentially embedded transcoding capability) would greatly simplify the architecture for Spring Boot developers who want to expose their gRPC services over HTTP/JSON without maintaining a separate Gateway component.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions