Deploy the gRPC service on Cloud Run
Creating an API Config with HTTP to gRPC Transcoding
Call the API using Transcoding
Transcoding HTTP/JSON API calls to gRPC through API Gateway
gRPC Transcoding is a feature for mapping between a gRPC method and one or more HTTP REST endpoints. It allows developers to build a single API service that supports both gRPC APIs and REST APIs. API Gateway enables you to provide secure access to gRPC services through a well-defined API configuration. If securing gRPC APIs through API Gateway, you may also want to support protocol transcoding so that clients can access your gRPC API by using HTTP/JSON
Transcoding involves mapping HTTP/JSON requests and their parameters to gRPC methods, their parameters and return types. Because of this, while it's possible to map an HTTP/JSON request to any arbitrary API method, it helps to do so if the gRPC API is structured in a resource-oriented way, similar to a traditional HTTP REST API.
In other words, you design the API service so that it uses a small number of standard methods, corresponding to HTTP verbs such as
PUT, that operate on the service's resources. These standard methods are List, Get, Create, Update, and Delete. You can find out much more about resource-oriented design and standard transcoding mappings in Google Cloud's API design guide.
In this lab you will learn how to:
- Secure a gRPC API via API Gateway and provide the ability to call the API using HTTP/JSON.
- Use annotations in your gRPC
.protofile to specify data conversion from HTTP/JSON to gRPC.
- How to deploy your service on Cloud Run and leverage transcoding to mediate between HTTP/JSON and gRPC.
- Where to find more reference information about designing and implementing transcoding for gRPC services.
This lab assumes that you have already completed the Managing Cloud Run gRPC Services with API Gateway lab.
Participe do Qwiklabs para ler o restante deste laboratório e muito mais!
- Receber acesso temporário a Console do Cloud.
- Mais de 200 laboratórios, do nível iniciante ao avançado.
- Tamanho compacto para que você possa aprender no seu próprio ritmo.