yl-yue commented on issue #9342:
URL: https://github.com/apache/dubbo/issues/9342#issuecomment-986411232


   > @yl-yue
   > 
   > * tri 协议由于使用了 pb 序列化,对异常的序列化支持不好,同时对于异常使用了 http2的 header 进行传输,header 
的大小有限制,不能够将异常进行序列化放入 header 中,故不支持完整的异常重放。
   > * 由于 http2 header 的限制,内容只支持 AsciiString,对于其他编码建议进行 base64后放入 header
   > * 如果想实现上述功能,建议参考 [[Dubbo 3.0.1] use triple protocol cant return real 
exception #8363](https://github.com/apache/dubbo/issues/8363)
   
   ### 回复与新疑惑
   - 测试了 #8363 issues中提供的demo,最终的结果只是把`13 INTERNAL`换成了`2 UNKNOWN`,不过`Exception 
in invoker chain :`这串dubbo定义的前缀没了,但中文乱码任然存在。
   - 关于是`2 UNKNOWN`还是`13 INTERNAL`,更适合携带业务异常,或许dubbo可以从规范入手,做个规约说明。
   - 如果中文需要经过base64编码,这样对前端调试解析并不友好,意味着需要base64解码。
   
   ### 更多想法
   站在我现在的角度,其实我只粗浅的觉得,dubbo tri协议最大的亮点是,不需要写下面这两行糟糕的代码:
   ```java
   responseObserver.onNext();
   responseObserver.onCompleted();
   ```
   
   那么是否可以考虑,dubbo tri协议是对grpc协议的缺陷或不优雅进行补足,并做增强,而不是改变,导致不能平滑迁移(只改controller层)


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to