menu
arrow_back

Transcoding HTTP/JSON API calls to gRPC through API Gateway

search share Dołącz Zaloguj się

Transcoding HTTP/JSON API calls to gRPC through API Gateway

1 godz. 30 godz. Punkty: 7

GSP881

Google Cloud Self-Paced Labs

Introduction

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 GET and 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 .proto file 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.

Dołącz do Qwiklabs, aby zapoznać się z resztą tego modułu i innymi materiałami.

  • Uzyskaj tymczasowy dostęp do konsola w chmurze.
  • Ponad 200 modułów z poziomów od początkującego do zaawansowanego.
  • Podzielono na części, więc można uczyć się we własnym tempie.
Dołącz, aby rozpocząć ten moduł