mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-08-18 04:28:40 +00:00
Merge branch 'main' of https://github.com/zfoo-project/zfoo
This commit is contained in:
@@ -35,6 +35,14 @@ SignalAttachment的signalId就是用于RPC的同步和异步的信号,通过
|
||||
|
||||
---
|
||||
|
||||
#### zfoo的RPC协议格式为什么没有dubbo复杂
|
||||
|
||||
- duboo没有自己实现的比较好的协议所以要支持其它协议,zfoo有自己实现的协议已经最快,只需要专注自己的协议和protobuf,兼容就比较简单
|
||||
- zfoo作为rpc协议是,length | packet | attachment,当作普通服务器协议就是,length | packet
|
||||
- attachment能装很多东西,算是协议上的多态,就不需要dubbo那么复杂的设计了
|
||||
|
||||
---
|
||||
|
||||
#### protocol的实现原理
|
||||
|
||||
- 通过递归解析对象的结构,用字节码增强生成顺序的序列化和反序列化函数,可以自己线生成C#协议,就能看到Javassist生成的是什么样的结构
|
||||
|
||||
Reference in New Issue
Block a user