Skip to content

Commit

Permalink
ch4: 统一图片文件编号
Browse files Browse the repository at this point in the history
  • Loading branch information
chai2010 committed Dec 14, 2018
1 parent a9b1cd5 commit 980d281
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
6 changes: 4 additions & 2 deletions ch4-rpc/ch4-04-grpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ GRPC是Google公司基于Protobuf开发的跨语言的开源RPC框架。GRPC基

## 4.4.1 GRPC技术栈

Go语言的GRPC技术栈如图所示
Go语言的GRPC技术栈如图4-1所示

![](../images/ch4.4-1-grpc-go-stack.png)
![](../images/ch4-1-grpc-go-stack.png)

*图4-1 gRPC技术栈*

最底层为TCP或Unix Socket协议,在此之上是HTTP/2协议的实现,然后在HTTP/2协议之上又构建了针对Go语言的GRPC核心库。应用程序通过GRPC插件生产的Stub代码和GRPC核心库通信,也可以直接和GRPC核心库通信。

Expand Down
5 changes: 2 additions & 3 deletions ch4-rpc/ch4-06-grpc-ext.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,9 @@ GRPC服务一般用于集群内部通信,如果需要对外暴露服务一般

grpc-gateway的工作原理如下图:

![](../images/ch4.6-1-grpc-gateway.png)

*图 4.6-1 Grpc-Gateway工作流程*
![](../images/ch4-2-grpc-gateway.png)

*图 4-2 Grpc-Gateway工作流程*

通过在Protobuf文件中添加路由相关的元信息,通过自定义的代码插件生成路由相关的处理代码,最终将REST请求转给更后端的GRPC服务处理。

Expand Down
File renamed without changes
File renamed without changes

0 comments on commit 980d281

Please sign in to comment.