-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
99 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,23 @@ | ||
# 4.1. RPC入门 | ||
# 4.1. RPC入门(Doing) | ||
|
||
TODO | ||
|
||
<!-- | ||
简单的例子 | ||
http 例子 | ||
jsonrpc 例子 | ||
jsonrpc on http?标准库不支持 | ||
手工 json on http | ||
nodejs 调用(跨语言) | ||
缺点,函数名时字符串,容易出错(可编译)。 | ||
手工摸索一个基于接口的规范,手工遵循 | ||
同步/异步 | ||
名字空间 | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,19 @@ | ||
# 4.2. Protobuf简介 | ||
|
||
TODO | ||
|
||
<!-- | ||
pb基本用法,pb其实就是json,我们不关心底层的编码和性能 | ||
pb2和pb3区别 | ||
pb和json的区别,pb有些限制,比如 map 只能嵌套,field名字不能随机变化 | ||
嵌套时,只能时msg或map,到一些限制 | ||
rpc 语法 | ||
扩展语法 | ||
包体系结构 | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,20 @@ | ||
# 4.3. protorpc | ||
|
||
TODO | ||
|
||
<!-- | ||
pb 和 json 是类似的, | ||
唯一的差异的 protoc 工具 | ||
有了代码生成,一切就发生变化了 | ||
pb 的重要性不再时底层的编码,二是 api 的通用语言!!! | ||
但是 pb 个 rest 是无法一一等价的 | ||
生成简单的代码,增加接口约束 | ||
甚至最终回归到 gob 或 json 编码 | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,18 @@ | ||
# 4.4. grpc | ||
|
||
TODO | ||
|
||
<!-- | ||
简单介绍 | ||
同步/异步 | ||
流 | ||
验证/密码 | ||
日志截取器,panic 捕获 | ||
gtpc到rest扩展 | ||
参数的自动验证,在截取器进行 | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,16 @@ | ||
# 4.5. 反向rpc | ||
|
||
TODO | ||
|
||
<!-- | ||
外网如何访问内网的rpc服务 | ||
隐喻:让客服主动打电话给我,然后我反映问题,让客服解决问题 | ||
grpc无法定制协议,只能时http2,但是流特性 | ||
bet/rpc on grpc | ||
掉线,心跳?有必要吗 | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,13 @@ | ||
# 4.6. Protobuf扩展 | ||
|
||
TODO | ||
|
||
<!-- | ||
基于pb扩展,打造一个自定义的rpc | ||
请求/应答 api | ||
比如 青云SDK这类 | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
# 4.7. 基于pb的rpc定制 | ||
|
||
TODO | ||
|
||
<!-- | ||
和上节重复了吗?? | ||
--> |