gRPC learning and practice

I believe everyone has heard of RPC, HTTP, Socket and other protocols. They can all be used in business for data communication. According to the characteristics of their respective protocols, the application scenarios are also more diverse and complicated. Have you heard or understood gRPC? What is it used for? Let's take a look at gRPC and its uses.

Introduction

Introduce gRPC in one sentence on the official website

A high-performance, open source universal RPC framework.

即:高性能、开源的通用型RPC框架

Speaking of RPC, people often compare it with HTTP. The two are basically the same in the underlying data transmission, that is, they are all based on TCP to achieve a safe and reliable connection for data communication, but there are some differences at the application layer.

RPC , namely Remote Procedure Call (remote procedure call), mainly works on top of the TCP protocol;

HTTP , namely HyperText Transfer Protocol (HyperText Transfer Protocol), mainly works on top of HTTP protocol.

In terms of protocol, RPC is more efficient.

gRPC structure diagram:
gRPC
gRPC is basically based on the idea of ​​defining services, specifying remote

Guess you like

Origin blog.csdn.net/reaburoa/article/details/109426323