タグ

関連タグで絞り込む (1)

タグの絞り込みを解除

gRPCとprotobufに関するsatoshi_hiraishiのブックマーク (2)

  • gRPCでFieldMaskを使う(取得編) - Carpe Diem

    概要 クライアントデバイスが多様化する中、UIに必要なデータもそれぞれ異なるためAPIのオーバーフェッチ(不要なデータの取りすぎ)が課題になってきます。 またマイクロサービス間の通信でも、例えばマスタ系データのうち必要なデータだけ取得して利用したいケースは多々あります。 かと言ってその度に必要最低限のデータを取得するメソッドを用意するのは開発が大変ですし、逆に細かいデータばかりのgRPCを用意すると今度はアンダーフェッチ(データが足りなくて複数回コールが必要になる)が発生します。 GraphQLでは欲しいデータをクライアント側が明示的に要求するのでオーバーフェッチが発生しないというメリットがありますが、gRPCではFieldMaskという機能があります。 今回はFieldMaskを使って余分なデータを返さない方法を説明します。 環境 Go v1.18.3 protoc-gen-go v1.

    gRPCでFieldMaskを使う(取得編) - Carpe Diem
  • Practical API Design at Netflix, Part 1: Using Protobuf FieldMask

    By Alex Borysov, Ricky Gardiner BackgroundAt Netflix, we heavily use gRPC for the purpose of backend to backend communication. When we process a request it is often beneficial to know which fields the caller is interested in and which ones they ignore. Some response fields can be expensive to compute, some fields can require remote calls to other services. Remote calls are never free; they impose

    Practical API Design at Netflix, Part 1: Using Protobuf FieldMask
  • 1