본문으로 바로가기

gRPC

category software engineering/backend 2022. 8. 25. 12:29
728x90

Summary of gRPC itself

  • g + RPC
  • RPC
    • Remote Procedure Call
    • Procedure Call
    • Not a new idea
  • Google claimed it as..
    • Modern RPC framework
    • High performance
    • Easily scalable
    • Automatically generate stubs in a variety of languages and platforms
  • Under the hood
    • gRPC - framework and protocol
    • Protocol buffers - wire format and Interface Definition Language
    • HTTP/2 - transport layer
  • Alternatives

Flexibility

Sample

Same code through gRPC

gRPC Client - BloomRPC - you can imagine yet another Postman for gRPC

alternatives

Same code through HTTP

$ curl localhost:8088/v2/vendors/2/products
{"products":[{"id":"1", "name":"", "available":false, "sort":0, "useStock":false, "productLabel":"", "preorderPolicy":"", "releaseDate":null, "publishOn":null, "publishOff":null, "productCode":"", "productType":"", "instockLabel":"", "importedFrom":"", "importVendorId":"0", "importProductId":"0", "weight":"0", "vendor":null, "promotion":null, "images":[], "productVariation":[], "vendorCategories":[]}]}%

Swagger

 

'software engineering > backend' 카테고리의 다른 글

gRPC Error  (0) 2022.08.26
go-pprof  (0) 2022.08.25
Topicctl (Kafka management)  (0) 2022.08.25
Error  (0) 2022.08.25
Slow Query (feat. index)  (0) 2022.08.25