JSON to gRPC Transcoding

Hello folks! :wave:

In my current company, we are evaluating existing API gateways to replace our homemade tool. Tyk looks excellent, but I need help finding a satisfying answer to one of our requirements.

Most of our web services expose gRPC APIs, but we want to allow our clients (our developers and some of our customers) to query the gateway using REST endpoints.

Does Tyk provide a way to natively transcode incoming JSON-over-HTTP requests to gRPC requests? By natively, I mean without asking to implement a custom plugin relying on an external tool such as gRPC-gateway. Thatโ€™s what we did in our homemade gateway, and we want to avoid going that way now.

Thanks for your time, and if some people already did something similar in their context, I would be happy to have any feedback! :man_bowing:

1 Like

@widokast Welcome to the community.

I donโ€™t think so but let me confirm internally.

@Sredny_Buitrago Any ideas?


Tyk supports gRPC plugins which are called during the flow of the API. The plugin is passed the session object which also contains the the data sent over rest including the body with its JSON payload.

It may not be too difficult to alter your existing gRPC server to work with this calling structure and have it return a result that is sent back to the caller.

The gRPC plugin docs start at gRPC. Please have a look and see if this is a workable idea.