云原生CAx软件:gRPC

gRPC是Google基于HTTP/2协议开发的一套开源、跨平台的高性能RPC框架,可用于连接微服务架构内的各种服务,亦可以连接客户端与后端服务。

Ref. from gRPC 

gRPC is a modern open source high performance Remote Procedure Call (RPC) framework that can run in any environment. It can efficiently connect services in and across data centers with pluggable support for load balancing, tracing, health checking and authentication. It is also applicable in last mile of distributed computing to connect devices, mobile applications and browsers to backend services.

Qt 6.5 LTS版本已经引入Qt GRPC、Qt Protobuf用于支持gRPC;Nginx 1.13.10新增了对gRPC的原生支持。

一、编译安装

本部分记录在Windows 10下使用Visual Studio 2019编译安装gRPC的过程。

  1. 安装依赖

  下载Go 1.20.4开发包。

  2. 下载代码

git clone https://github.com/grpc/grpc
cd ./grpc/
git checkout -b v1.55.0 v1.55.0
git submodule update --init

  3. 构建项目

打开cmake-gui,完成以下配置,然后构建项目

Where si the source code D:/YouQuan/CaeFrameworks/gRPC/grpc
Where to build the binaries D:/YouQuan/CaeFrameworks/gRPC/BUILD
CMAKE_INSTALL_PREFIX D:/YouQuan/CaeFrameworks/gRPC/INSTALL
GO_EXECUTABLE C:/Program Files/Go/bin/go.exe
CMAKE_ASM_NASM_COMPILER C:/Program Files/Go/pkg/tool/windows_amd64/asm.exe

  4. 编译安装

  打开构建生成的"grpc.sln",构建"ALL_BUILD"完成编译,构建"INSTALL"完成安装。

网络资料

gRPChttps://grpc.io/

GitHub: gRPChttps://github.com/grpc/grpc

Gohttps://golang.google.cn/

猜你喜欢

转载自blog.csdn.net/qq_26221775/article/details/130773008