cvictory opened a new pull request #495: URL: https://github.com/apache/dubbo-go/pull/495
现在dubbo和getty耦合度很高,所以先进行第一轮抽象,部分逻辑后续待优化。 做的改动: 1. 增加exchange层做中转,连接dubbo协议和网络交互。exchange入参出参是invocation和result, 网络层入参出参是request和response 2. 在dubbo_protocol中增加共用相同连接(客户端访问server,当ip和端口相同,就共用exchange) 3. 将getty相关的逻辑移到remoting/getty下, 将addr和requestTimeout删除,getty服务管理连接,每个请求的超时,都是请求的入口传入,方便前面提到的连接共享 4. 抽象codec接口 5.requestId变成全局,PendingResponse也变成全局 待优化的小的功能点: 1. codec和remoting.client下后续可以抽象成扩展。现在还是编码形式存在。 2. codec中的hessian编解码,期望能对hessian进行抽象 3. getty中的逻辑尽量保持了和原来的逻辑一直,没有做调整,后续看下getty和remoting/getty之间的api层是否可以抽象。 ----- 代码主干流程完成,部分异常和分支流程待完善,单元测试待完善。 先提交给大家看下 ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
