Skip to content

Commit

Permalink
Update ch4-01-rpc-intro.md
Browse files Browse the repository at this point in the history
fix word "PPC" to "RPC"
  • Loading branch information
Jay committed Mar 22, 2019
1 parent ff21df4 commit 69ad6ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ch4-rpc/ch4-01-rpc-intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ func main() {

标准库的RPC默认采用Go语言特有的gob编码,因此从其它语言调用Go语言实现的RPC服务将比较困难。在互联网的微服务时代,每个RPC以及服务的使用者都可能采用不同的编程语言,因此跨语言是互联网时代RPC的一个首要条件。得益于RPC的框架设计,Go语言的RPC其实也是很容易实现跨语言支持的。

Go语言的RPC框架有两个比较有特色的设计:一个是RPC数据打包时可以通过插件实现自定义的编码和解码;另一个是RPC建立在抽象的io.ReadWriteCloser接口之上的,我们可以将RPC架设在不同的通讯协议之上。这里我们将尝试通过官方自带的net/rpc/jsonrpc扩展实现一个跨语言的PPC
Go语言的RPC框架有两个比较有特色的设计:一个是RPC数据打包时可以通过插件实现自定义的编码和解码;另一个是RPC建立在抽象的io.ReadWriteCloser接口之上的,我们可以将RPC架设在不同的通讯协议之上。这里我们将尝试通过官方自带的net/rpc/jsonrpc扩展实现一个跨语言的RPC

首先是基于json编码重新实现RPC服务:

Expand Down

0 comments on commit 69ad6ed

Please sign in to comment.