Finagle 源码分析之Mux.ThriftMux
2018-01-25 16:38
1616 查看
Finagle 服务端实现过程,由于协议无关性,这里以Mux协议为例,Http等流程相同。
ThrifxMux.server 的 trait 的调用时序如下:1 serviceIface
2 使用 thrift 生成的 xxx FinalgeService 进行数据的处理,将Iface转换为Service[Array[Byte],Array[Byte]]
3 调用 serve
4 Byte 转 Mux
5 ServerMuxer serve
6 StackServer 加载默认的filter
7 materialize serviceFactory
8 调用 withParam 创建 copy1
9 newListensingServer
10 newListener 创建 transport
11 listen transport
12 Netty
13 newDispatch transport serviceFactory.service
14 mux.ServerDispatcher
最重要的方法2 ServerIface转Iface到Service[Array[Byte],Array[Byte]] 4 Byte 转 Mux 10 newDispatch 接收 Mux https://github.com/mengyuetao
ThrifxMux.server 的 trait 的调用时序如下:1 serviceIface
2 使用 thrift 生成的 xxx FinalgeService 进行数据的处理,将Iface转换为Service[Array[Byte],Array[Byte]]
3 调用 serve
4 Byte 转 Mux
5 ServerMuxer serve
6 StackServer 加载默认的filter
7 materialize serviceFactory
8 调用 withParam 创建 copy1
9 newListensingServer
10 newListener 创建 transport
11 listen transport
12 Netty
13 newDispatch transport serviceFactory.service
14 mux.ServerDispatcher
最重要的方法2 ServerIface转Iface到Service[Array[Byte],Array[Byte]] 4 Byte 转 Mux 10 newDispatch 接收 Mux https://github.com/mengyuetao
相关文章推荐
- Finagle源码分析之Mux.client
- Thrift之TProtocol类体系原理及源码详细解析之类继承架构分析
- Thrift源码分析(一)-- 基本概念
- Thrift源码分析(六)-- Transport传输层分析
- Spark-ThriftServer源码分析
- golang thrift 源码分析,服务器和客户端究竟是如何工作的
- Storm-源码分析- Thrift的使用
- golang thrift 源码分析,服务器和客户端究竟是如何工作的
- Finagle源码分析之Stack[T]
- Thrift源码分析2-FrameBuffer
- Thrift源码分析(九)-- 扩展Thrift框架来实现Attachable的RPC调用
- 5、thrift源码分析之_TBinaryProtocol(二进制)
- Thrift源码分析(五)-- FrameBuffer类分析
- 4、thrift源码分析之_TProtocol协议
- Thrift之TProtocol类体系原理及源码详细解析之类继承架构分析
- Thrift异步IO服务器源码分析
- Thrift源码分析(七)-- TServer服务器分析
- thrift源码研究-TProtocol类体系架构分析
- Flume NG源码分析(五)使用ThriftSource通过RPC方式收集日志
- 【原创】k8s源码分析-----Mux And Broadcaster