gRPC资源列表,系统的介绍了gRPC的使用生态,包括文档,官方库,多语言对于gRPC的实现,CLI,Web客户端及其他一些非常好用的工具。
文档
- Website - 官方文档,库,资源,示例,以及FAQ。
- Technical documentation - 有用的技术文档集合。
- gRPC status codes - gRPC的状态码以及使用方式。
- gRPC status code mapping - HTTP到gRPC状态码映射。
- grpc-errors - 在不同语言中如何返回和处理错误状态的代码示例。
- API Design Guide - Google云API设计指南,有利于理解gRPC API。
社群
- Community links - Mailing list, Gitter, Twitter, Reddit
官方库和工具
- gRPC Core - C, C++, Ruby, Node.js, Python, PHP, C#, Objective-C关于gRPC的实现都是以src/core为基础,在底层都是对于C语言核心库的调用。
- gRPC Java - gRPC的JAVA实现,基于
HTTP/2
。 - gRPC Node.js - gRPC的NodeJs实现。
- gRPC Go - gRPC的Go实现,基于
HTTP/2
。 - gRPC Swift - gRPC的Swift实现。
- gRPC Dart - gRPC的Dart实现。
- gRPC C# - gRPC的C#实现。
- gRPC Web - 提供了能够让浏览器访问gRPC服务的Js库。
- gRPC Ecosystem - 丰富gRPC了生态系统。
- gRPC contrib - github上已知的有用的贡献列表。
- Homebrew gRPC - Homebrew下载的gRPC项目。
- grpc_cli - gRPC客户端。
工具
CLI
- polyglot - 使用
java
实现的gRPC命令行客户端。 - grpcc - 使用
Nodejs
实现的gRPC命令行客户端。 - gcall - 使用
Nodejs
实现的简单的gRPC命令行客户端。 - Evans - 功能丰富更加且通用的gRPC命令行客户端。
- grpcurl - 类似cURL,但是只适用于gRPC: 和gRPC服务端交互的命令行工具。
- protodot - 将
.proto
文件中函数的调用关系图形化,生成.dot
,.svg
,.png
等文件,前提是安装graphviz
。
什么是graphviz呢,有什么作用呢?推荐两篇文章:
GUI
- letmegrpc - 生成符合规则的Web类型的GUI。
- omgRPC (废除) - 就像使用Postman模拟请求HTTP REST接口一样,这是一个与gRPC后端服务交互的GUI客户端。
- grpcui - 一个交互式的gRPC Web客户端,与Postman一样(还有一个Go库,用于将这些web UI嵌入Go HTTP服务器)。
- BloomRPC - 一个友好和简单的GUI客户端。实现灵感来自
GraphQL-Playground
和Postman
,和gPRC交互从未如此简单。 - gRPCox - 类似cURL,但只适用于gRPC,基于Web页面的GUI客户端,真的非常好用。
- MuninRPC - 建立在gRPC系统之上的用于测试
Protobuf
请求和响应的应用。 - Delivery - gRPC的一个简单的应用程序,使用gRPCurl自动检测所有端点/方法及其请求,需要做的只是修改
JSON
文件内容。 - (Yodelay.io) - 基于浏览器的客户端,确保你的输入输出匹配。
测试
- ghz - 基于
hey
和grpcurl
的简单gRPC基准测试和负载测试工具。 - gatling-grpc - 用于gRPC的Gatling压力测试插件。
- strest-grpc - gPRC的压力测试工具。
- hazana - 用于创建负载测试工具的Go包,支持gRPC。
- fortio - 来自
Istio
项目的微服务(http,grpc)负载测试库和工具。 - grpc-swagger - 使用
swagger-ui
调试gPRC应用程序。 - grpc-tools - gRPC调试工具,类似
Fiddler
/Charles
,仅仅针对gRPC。 - jmeter-grpc-plugin - 通过使用
Jmeter
支持负载测试gRPC服务的插件。
其他
- kafka-pixy - kafka的gRPC/REST代理。
- grpc-proxy - gRPC反向代理,旨在便捷地暴露gPRC服务。
- ratelimit - Go/gRPC服务,旨在支持应用中不同的速率方案。
- ProfaneDB - 建立在
RocksDB
之上的,一种基于gRPC API Protocol Buffers数据库。 - danby - 浏览器上的gRPC代理。
- docker-protoc - 与Google API库捆绑在一起的容器化protoc、gPRC网关和grpc_cli命令。
- grpc-json-proxy - 能够让Postman,curl等与gRPC服务器交互的工具。
- protoc-gen-gotemplate - 基于golang模板系统的通用生成器。
- grpc-http-proxy - 基于
protoreflect
的能够将HTTP请求转换为gRPC调用的反向代理服务。 - grpc-mate - 将
JSON HTTP
请求转换为gRPC调用的动态代理服务器。 - jawlb - 一个简单的用于Kubernetes和gRPC的
grpclb
负载均衡器的实现。 - pbhbs - 基于protobuf定义和模板生成文件。
特定语言实现
Go
- go-GRPC Micro - Micro基于gRPC的微服务框架。
- go-kit gRPC - Go Kit以gRPC作为数据传输。
- gRPC over NATS - nRPC是一种RPC框架,就像gRPC一样, 但是只是针对
NATS
。 - grpc-web - 用于Golang和TypeScript的gRPC Web实现。
- grpc-web-devtools - Chrome浏览器扩展以帮助
gRPC Web
开发。 - rpcx - 基于net/RPC的RPC服务框架,就像
alibaba Dubbo
和weibo Motan
。 - grpclb - Go编写的gRPC外部负载平衡服务解决方案。
- grpc-proxy - GRPC代理是一个GO反向代理,以最小开销实现丰富路由的GRPC调用。
- go-microservice-helpers - 简单的创建gRPC客户端和服务端的代码集合。
- lile - 在Go中快捷地创建gRPC服务。
- proteus - 通过Go的源代码创建
.proto
文件。 - protoc-gen-cobra - 用于生成Go gRPC的命令行工具。
- gRPC over WebSocket - 使用预先建立的
WebSocket
连接访问防火墙后面的gRPC服务器。 - yarpc - Go的消息传递平台,支持gRPC。
- promgrpc - 基于gRPC服务的
Prometheus
仪表。 - protoreflect - Go Protbuf Buffers的反射(富描述符)。
- grpchan - gRPC的通道:自定义传输,如进程内和HTTP 1.1。
- grpcui - 将gRPC web UI嵌入Go gRPC/HTTP服务器。
- clay - gRPC+REST+Swagger API的最小服务器平台。
- grpc-consul-resolver - 针对Consul中注册的服务,易于使用的端点解析器
- kuberesolver - 带有Kubernetes解析器的gRPC负载均衡器。
- ttrpc - 适用于小内存环境的gRPC。
- grapi - 在gRPC和Go中的一个极其简单的API服务器和生成器。
- gripmock - gRPC模拟服务器。
- grpc-gateway-boilerplate - 在Go中编写gRPC网关支持的REST服务所需的样板文件。
- protoc-gen-struct-transformer - protocol buffers的转换函数生成器。
- cmux - Golang中的多路连接器:在同一端口上提供不同的服务,支持gRPC。
- goprotoc - 用于在Go中编写
protoc
插件的库;包括纯Go的protoc替换。 - gRPC for production - 提供了可用于生产的,满足gRPC通信的核心需求的Go项目。
- protoc-gen-mock - 从proto文件生成gRPC模拟服务的proto插件。
Node.js
- Mali - A minimalistic gRPC microservice framework for Node.js
- grpc-host-builder - Lightweight library for building gRPC services with server side interceptors support
- grpc-caller - An improved Node.js gRPC client
- grpc-create-metadata - Helper utility for creating gRPC
Metadata
- grpc-create-error - Utility function for creating
Errors
for gRPC responses - grpc-error -
GRPCError
class that wrapscreate-grpc-error
- grpc-inspect - gRPC protocol buffer inspection utility
- Node.js Proto Files - All of the Google API's protocol buffer files
- grpc-bus - Call gRPC services (even streams!) from the browser over any two-way socket to Node and soon Go
- grpc-errors - A quick and easy way of generating errors for use with grpc
- grpc-dynamic-gateway - Like grpc-gateway, but written in node and dynamic.
- node-protoc-plugin - Create protoc code-generation plugins easily in nodejs.
- grpc-promise - GRPC promisify module for all Request/Response types: standard and stream
- firecomm - Feature library for gRPC-Node
- grpc-web-gateway – HTTP & WebSocket proxy gateway for gRPC services
Java
- gax-java - Google API Extensions for Java
- Armeria - Asynchronous RPC/REST library built on top of Java 8, Netty, HTTP/2, Thrift and gRPC
- grpc-spring-boot-starter - Spring Boot starter module for gRPC framework
- grpc-spring-boot-starter Spring Boot starter module for gRPC framework from LogNet.
- reactive-grpc - Integrates reactive programming with grpc-java
- grpc-java-contrib - Useful extensions for the grpc-java library
- rejoiner - Generates a GraphQL schema from gRPC microservices
- hoverfly-java-grpc - MITM proxy for recording and simulating gRPC services
Ruby
- gruf - gRPC Ruby Framework
- gapic-generator-ruby - Generates Ruby gRPC client libraries from protocol buffer definitions of an API.
Python
- grpclib - Pure-Python gRPC implementation, based on hyper-h2 project
- pytest-grpc - pytest plugin which allow test gRPC services
- grpcalchemy - The Python micro framework for building gPRC application
- django-grpc - Django application to build gRPC services with access to ORM, settings and everything else
- garuda - Automagically Exposing Djagno ORM over gRPC for microservices written in any other languages
C#
- MagicOnion - gRPC based HTTP/2 RPC Streaming Framework for .NET, .NET Core and Unity
- Grpc.Tools - gRPC and Protocol Buffer compiler for managed C# and native C++ projects. See Introduction to gRPC on .NET Core tutorial.
Rust
- grpc-rs - The gRPC library for Rust built on C Core library and futures
- grpc-rust - Rust implementation of gRPC
- tower-grpc - A client and server gRPC implementation based on Tower
- tonic - A native gRPC client & server implementation with async/await support
Haskell
- grpc-haskell - gRPC library binding for Haskell
Erlang
- Erlang grpc - Erlang library for gRPC
- grpcbox - Erlang grpc client and server
- bert - Erlang Google Protobuf V3 generator from HRL files
Elixir
- grpc-elixir - The Elixir implementation of gRPC
Elm
- elm-protobuf - Protoc plugin generating elm code from proto definitions
TypeScript
- ts-protoc-gen - Protoc Plugin for TypeScript Declarations
- protoc-gen-tstypes - Configurable Protoc Plugin to generate TypeScript types.
Scala
- ScalaPB - Protocol Buffer Compiler for Scala
- Akka-gRPC - Akka gRPC provides support for building streaming gRPC servers and clients on top of Akka Streams.
- Mu - Mu RPC is a purely functional library for building RPC endpoint-based services with support for gRPC and HTTP/2
Dart
- grpc-dart - Protocol Buffer Compiler for Dart
Kotlin
- kroto-plus - gRPC Coroutines Integration and Protobuf message DSL support
- grpc-kotlin - A protoc plugin for generating native Kotlin bindings using coroutine primitives for gRPC services
- gapic-generator-kotlin - Generates coroutine-based gRPC Kotlin client libraries from a protocol buffer description of an API
- grpc-kapt - Annotation driven gRPC clients & servers in Kotlin with coroutines
Perl
- grpc-perl - Experimental Perl gRPC library supporting grpc client
资源
教程
- Building a gRPC service with Node.js - 谷歌云平台代码实验室。
- Getting Started with Microservices using Go, gRPC and Kubernetes
- gRPC in Production
- gRPC Go: Beyond the basics - Gopher学院文章。
- Building High Performance APIs In Go Using gRPC - 使用gRPC和Go创建简单API的小教程。
- Bidirectional gRPC streaming for Go
- How We Build gRPC Services At Namely - 来自实验室的文章。
- Our experience designing and building gRPC services - Bugsnag关于使用gRPC如何构建新版本仪表盘的系列博客。
- Writing gRPC Interceptors in Go - 关于gRPC拦截器的一个简短教程。
- An introduction to gRPC
- How we use gRPC to build a client/server system in Go - 关于如何使用gRPC(和Protobuf)构建健壮的客户端/服务端系统的技术演示。
- Serving gRPC and HTTP services on the same port - 关于Go语言如何在的同一端口上实现http和gRPC功能的小教程。
- Take a REST with HTTP/2, Protobufs, and Swagger - 另一个关于Go语言如何在的同一端口上实现http和gRPC功能的小教程。
- OpenCensus for Go gRPC developers - 关于如何在gRPC和Go中使用
OpenCensus
的教程。 同样适用于 Java和Python。 - How to develop Go gRPC microservice with HTTP/REST endpoint, middleware, Kubernetes deployment, etc - 使用Golang开发gRPC的博客系列 Source code.
- GopherJS Client and gRPC Server - 通过gRPC网关将后端的gRPC服务暴露给HTTP以供
Gopherjs
使用的指南,同样适用于 related gRPC-Web with GopherJS tutorial. - The G-Unit Stack: Go, GraphQL, and gRPC - 关于使用Go、GraphQL和gRPC的博客文章和教程。也可参看repo.
- Envoy, gRPC, and Rate Limiting - 关于如何使用gRPC和构建速率限制服务的教程。
- Seamless Cloud-Native Apps with gRPC-Web and Istio - 使用gRPC-Web和Istio构建的云原生的webapp的教程。
- Backward and Forward Compatibility, Protobuf Versioning, Serialization - 修改gRPC API的一篇小文章。
- Node, gRPC, and Postgres - 本教程介绍如何使用Node、gRPC和Postgres实现API。
- Building High Performance APIs In Go Using gRPC And Protocol Buffers - 入门级别的gRPC教程。
- Understanding gRPC - 入门级别的gRPC教程,Go语言实现示例。
- Part 1: Demystifying gRPC - 一个简单的gRPC服务,具有上下文取消和SSL/TLS上的安全连接。
- Part 2: Demystifying gRPC - 使用gRPC流和Python后端扩展服务。
- Part 3: Demystifying gRPC - 将单一的流式的GRPC拦截器添加到服务中,并用GRPC网关提供REST端点。
- gRPC in Microservices - 在微服务架构中使用gRPC的教程。
视频
- gRPC: Google's high-performance, open-source RPC framework - GothamGo 2015 by Sameer Ajmani
- Introduction to gRPC: A general RPC framework that puts mobile and HTTP/2 first - Devoxx by Mete Atamel
- gRPC: The Story of Microservices at Square - Apigee webcast
- Scalable Realtime Microservices with Kubernetes and gRPC - Mark Mandel @ Google
- Text to Speech server with gRPC and Kubernetes - justforfunc #12
- GRPC Microservices 101 - Google Developer Group Washington by Ray Tsang
- Efficient Microservices w/ Binary Protocol - gRPC 101 - By Ray Tsang
- grpc: From Tutorial to Production - GopherCon 2017 by Alan Shreve
- Scalable Microservices with gRPC, Kubernetes, and Docker - Node Interactive 2016 by Sandeep Dinesh
- Building Microservices w/gRPC & Kubernetes - Philly ETE 2016 #49 by Kelsey Hightower
- Building high performance microservices with Kubernetes, Go, and gRPC - Google Cloud Next '17 by Andrew Jessup
- Modifying gRPC Services Over Time - Eric Anderson, Google at KubeCon + CloudNativeCon 2017 - Austin
- Next Generation Services at Indeed Using gRPC - Jaye Pitzeruse, Indeed.com at KubeCon + CloudNativeCon 2017 - Austin
- Generating Unified APIs with Protocol Buffers and gRPC - A video on Protocol Buffers, gRPC and Envoy from Lyft.
- Intro to gRPC: A Modern Toolkit for Microservice Communication - A video from Twilio's Signal Conference
- gRPC and Go: Developing Efficient and Type-Safe Services
- Best Practices for (Go) gRPC Services
- Creating GopherJS Apps with gRPC-Web - At FOSDEM
- justforfunc #31: gRPC Basics - JustForFunc: Programming in Go series Episode 31 covering gRPC
- Efficient service communication with gRPC - Talk at microXchg 2018 Berlin
- gRPC Java Course on Udemy - Online Course (4 hours) that walks through several examples and implementations of gRPC using the Java Language
- HTTP and JSON for your gRPC Services - Michael Hamrah - from Full Stack Fest
- Types All the Way Down — gRPC and Go Infrastructure at Lyft - Christopher Burnett at Istanbul Tech Talks
- Using gRPC for Long-lived and Streaming RPCs - Eric Anderson, Google at KubeCon North America 2018
- Intro: gRPC-Web - Stanley Cheung & Wenbo Zhu, Google at at KubeCon North America 2018
- gRPC Loadbalancing on Kubernetes - Presentation at KubeCon Europe 2018. Source.
- Putting gRPC in Practice - Presentation on working with gRPC.
- The Story of Why We Migrate to gRPC and How We Go About It - Matthias Grüter, Spotify at KubeCon + CloudNativeCon Europe 2019
- Authentication and Security in gRPC Microservices - Jan Tattermusch, Google at KubeCon + CloudNativeCon Europe 2019
- JustFootball’s Journey to gRPC + Linkerd in Production - Ben Lambert, & Kevin Lingerfelt at KubeCon + CloudNativeCon Europe 2019
- gRPC load balancing and Service Mesh - Vishal Powar, Google at KubeCon + CloudNativeCon Europe 2019
- Adopting gRPC: Overcoming Team and Technical Hurdles - GOTO 2019 • Adopting gRPC: Overcoming Team and Technical Hurdles • Josh Humphries
- Moving to gRPC Java - Mya Pitzeruse at Indeed.com
幻灯片
- gRPC Overview - An overview at gRPC: Talk at Slack by Varun Talwar
- gRPC Design and Implementation - April 2016 talk at Stanford by Varun Talwar
- gRPC - boilerplate to high-performance scalable APIs - code.talks 2015 by Robert Kubis
- HTTP2 and gRPC - A simple introduction about HTTP2 and gRPC by Xin Gong Chang
- gRPC and Microservices - Overview of Google's open source microservices framework - gRPC, based on HTTP2 and protocol buffers. Presented at Golang Melbourne, June 2016 by Jonathan Gomez
- gRPC and Microservices - Golang Melbourne - June 2016 Go Hack Night by Jonathan Gomez
- Scalable Microservices with gRPC, Kubernetes, and Containers - DevFest Ukraine
- OpenAPI and gRPC Side by-Side - APIStrat Conference - Tim Burks
- Go+Microservices at Mercari - Taichi Nakashima at Go Conference 2017
- gRPC - RPC rebirth? - Presentation about gRPC at the 23. NetPonto community meeting in Porto by Luís Barbosa
示例
- gifinator - A sample application demonstrating Kubernetes, gRPC, Go and cute Gophers demoed at Google GCP Next 2017
- Text to Speech server with gRPC and Kubernetes - justforfunc #12
- Multiplayer Simon Says - A Game using gRPC and Kubernetes - Sample app with Go server and clients using Node.js (on Arduino and web), and Java (Android and CLI)
- Go Microservices Example - HTTP up front, Protobufs in the rear
- Streaming RPC's using gRPC - A quick demo of bi-directional streaming RPC's using grpc, Go and Python
- gRPC Java Examples - A collection of useful/essential gRPC Java Examples
- gRPC/OpenCensus Demo - Export metrics and traces from gRPC servers and clients using Java, Go and Prometheus
- go-micro-services - An demonstration of Golang micro-services that expose a HTTP/JSON frontend and then leverages gRPC for inter-service communication
- Colossus - An example multi-language gRPC microservice architecture built by Bazel and targeting Kubernetes
- coolstore-microservices - A containerized polyglot gRPC microservices based on .NET Core, Nodejs and more running on Istio
- gRPC Microservices with Go and Kubernetes - A sample application use gRPC in microservice and deploy in kubernetes.
未归类
- gRPC with Load Balancer or Proxy or on AWS - Various notes on doing gRPC behind a load balancer or proxy or on AWS
- gRPC service upgrade, versioning - A short possibly useful discussion on gRPC service upgrade and versioning
- Packaging Generated Code for gRPC Services - An article demonstrating a strategy on how to version and package gRPC libraries
- Migrating APIs from REST to gRPC at WePay - A blog post on migrating from REST to gRPC
Protocol Buffers
文档
- Website - 官方网站和文档。
- Third-Party Add-ons for Protocol Buffers - Protocol Buffers主仓库之外的附加资源列表。
工具
- buf - Protobuf工具,功能包括格式和破坏性变更检测。允许多种类型的输入,包括直接检查远程存储库和
tarball
,并且还具有内置的编译器。 - prototools - 用于protobuf/gRPC的文档生成器和其他工具。
- protoc-gen-doc - 关于Google Protocol Buffers的文档生成器插件。
- Protoxygen - Doxygen 为protobuf/gRPC生成文档的插件。
- openapi2proto - 根据OpenAPI规范生成Protobuf v3架构和gRPC服务定义的工具。
- Wireshark Protobuf Dissector - 一个Wireshark Lua插件,用于解码Google protobuf数据包。
- protoc-gen-lint - 内置于Google's Protocol Buffers编译器的插件,防止
.proto
文件样式冲突 - prototool - 编译,整理和格式化Protobuf文件,并为任何语言/插件生成存根,以及Vim/IDE集成。
- protoc-gen-validate - 用于生成多语言消息校验器的Protoc插件。
- go-proto-validators - 根据
.proto
批注生成消息验证器,用于grpc_validator
gRPC中间件中。 - protolock - 跟踪您的.proto文件,并防止对影响API兼容性的消息和服务进行更改。
- protoc-gen-map - 用于
Protocol Buffers
的SQL数据映射器框架。 - api-linter - 用于
protocol buffers
中定义的API的linter。 - protoc-gen-struct-transformer -
Protocol Buffers
的转换函数生成器。
类似的协议文件
- gogoprotobuf - 带有额外代码生成功能的
golang/protobuf
的分支。 - MessagePack - 类似
JSON
,但是更快,更小。 - Thrift - IDL(接口定义语言)定义,二机制通信协议。
- TChannel - 具备网络复用和帧协议的RPC。
- Cap’n Proto - 看看
Protocol Buffers
吧, 这个更快。 - FlatBuffers - 一个高效的跨平台序列化库。
- RSocket - 提供反应式流语义的应用协议。
- Twirp - 具有protobuf服务定义的简单的RPC框架。
- Greenpack - 序列化格式类似
MessagePack
,但是增加了添加字段版本控制和类型注释功能。
备注
- 内容基于awesome-grpc的commitId为
daba9b9183fe8ebb60018cb87c3508007e24e692
整理。
欢迎关注公号:程序员的金融圈
一个探讨技术,金融,赚钱
的小圈子,为你提供最有味道
的内容!
