Skip to content

fFee-ops/Lightweight-RPC-Framework

Repository files navigation

Lightweight-RPC-Framework

轻量级rpc框架

架构图

image

简要流程图

V1 0 RPC流程

自定义数据格式

+---------------+---------------+-----------------+-------------+
|  Magic Number |  Package Type | Serializer Type | Data Length |
|    4 bytes    |    4 bytes    |     4 bytes     |   4 bytes   |
+---------------+---------------+-----------------+-------------+
|                          Data Bytes                           |
|                   Length: ${Data Length}                      |
+---------------------------------------------------------------+

Magic Number:标识这是我的协议包
Package Type:标明这是一个调用请求还是调用相应
Serializer Type:标明使用的序列化器,这个客户端和服务端应当保持一致
Data Length:实际数据的长度,设置这个字段主要防止粘包
Data Bytes:经过序列化后的实际数据

一些概念的解释

查看这里

About

轻量级rpc框架

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages