Member-only story

Spring Boot integrated grpc quick start demo

HBLOG
8 min readJul 9, 2024

--

1. What is GRPC?

gRPC is a high-performance, open-source, general-purpose RPC framework, launched by Google, based on:HTTP2The protocol is designed and developed as a standard, and is adopted by defaultProtocol BuffersData serialization protocol that supports multiple development languages. gRPC provides an easy way to precisely define services and automatically generate reliable feature libraries for both the client and the server. In gRPC clients, remote programs on different servers can be directly invoked, and the posture looks like calling local programs, making it easy to build distributed applications and services. As with many RPC systems, the server is responsible for implementing the defined interface and handling the client’s requests, and the client calls the required service directly according to the interface description. The client and server can be implemented in different languages supported by gRPC.

Key features:

  • The powerful IDLgRPC uses ProtoBuf, a data serialization protocol (similar to XML, JSON, hessian) developed by Google to define services. ProtoBuf can serialize data and is widely used in data storage, communication protocols, etc.
  • Multi-language supportgRPC supports multiple languages, and can automatically generate client and server function libraries based on language. At present, the C version grpc, the Java version grpc-java and the Go version grpc-go are available, and other language versions are under active development, among them, grpc supports C, C++, Node.js, Python, Ruby, Objective-C, PHP and C# and other languages, and grpc-java has supported Android development.
  • HTTP2gRPC is designed based on the HTTP2 standard, so compared with other RPC frameworks, gRPC brings more powerful features, such as bidirectional streaming, header compression, and multiplexed requests. These features bring significant benefits to mobile devices, such as bandwidth savings, reduced TCP links, CPU usage savings, and longer battery life. At the same time, gRPC can also improve the performance of cloud services and web applications. gRPC can be applied both on the client side and on the server side, so as to realize the communication between the client and the server side in a transparent way and simplify the…

--

--

HBLOG
HBLOG

Written by HBLOG

talk is cheap ,show me your code

Responses (2)

Write a response