Application of gRPC in Spring Cloud

1. Foreword In microservice development, there are generally two ways to call between services: Feign and RestTemplate. However, in actual use, especially Feign, there are various restrictions and limitations, such as: HTTP request method, return type, etc. Sometimes it makes you feel that everything is awkward. In microservice projects, calls between services are very common […]

gRPC gateway integrates swagger

1. Gateway integrates swagger 1. In order to simplify the actual combat process, the services exposed by gRPC-Gateway do not use https, but http, but swagger-ui The calling service provided by The service is https, so you need to specify swagger in the proto file to call the service with http. When specifying files will […]

Browsers can directly access Dubbo and gRPC back-end microservices. The first alpha version of Dubbo-js is here!

Author: Cai Jianyi Based on the Triple protocol defined by Dubbo3, you can easily write browser and gRPC-compatible RPC services, and have these services run on HTTP/1 and HTTP/2 at the same time. Dubbo TypeScript SDK [ 1] supports defining services using IDL or programming language-specific methods, and provides a set of lightweight APIs to […]

gRPC proto data verification

1. proto data verification This article will introduce grpc_validator, which can verify the input and output of gRPC data. The code from the previous article is reused here. 1.1 Create proto file and add verification rules Here, a third-party plug-in go-proto-validators is used to automatically generate verification rules. Address: https://github.com/mwitkow/go-proto-validators $ go get github.com/mwitkow/go-proto-validators 1.1.1 […]

Springboot integrates Grpc to realize communication between services

1. Introduction to Grpc In gRPC, the client applicationcan directly call the method of the server application on a different machine just like calling a local object, allowing you to Make it easier to create distributed applications and services. Similar to many RPC systems, gRPC is also based on the following concept: define a service […]

gRPC Middleware

1. gRPC Middleware go-grpc-middlewareProject address: https://github.com/grpc-ecosystem/go-grpc-middleware gRPC itself can only set up one interceptor, and it would be messy to write all the logic together. This article briefly introduces the use of go-grpc-middleware, including grpc_zap, grpc_auth and grpc_recovery. 1.1 Introduction to go-grpc-middleware go-grpc-middleware encapsulates authentication (auth), log (logging), message (message), Validation (validation), repeat Interceptors such […]