You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2022/05/20 10:41:22 UTC

[GitHub] [dubbo] owen200008 opened a new issue, #10063: #9536 改动json类dubbo3.x序列化都会失败

owen200008 opened a new issue, #10063:
URL: https://github.com/apache/dubbo/issues/10063

   我目前看代码 #9536 改动json类dubbo3.x序列化都会失败,比如fst序列化invoke的时候最终对象是JSONObject类型的一定是失败的
   
   我是支持去掉下面这个语句的
   1.  ClassUtils.forName(clz);
   从泛型到3.0好几次的性能问题都是由这个引起,如果加入的话大概率这边也会有较大的消耗
   
   目前从invocation成员来说argsType是知道的
   从性能和必要性上来分析,感觉是可以去掉TripleWapper里面的argsType的
   
   
   另外序列化来说从接口定义实际是想直接返回最终类型的,所以传递类型给序列化是应该说,所有这个
   readObject()定义为    @Deprecated是对的
   因此我觉得#9536这个改动是不对的
   
   @xiaochangbai @AlbumenJ @wangchengming666 


-- 
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: notifications-unsubscribe@dubbo.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] owen200008 commented on issue #10063: #9536 改动json类dubbo3.x序列化都会失败

Posted by GitBox <gi...@apache.org>.
owen200008 commented on issue #10063:
URL: https://github.com/apache/dubbo/issues/10063#issuecomment-1136594002

   > 不wrapper 里携带参数类型是为了方便非 Dubbo 客户端做统一处理,比如 envoy 网关,他们本身是不需要感知的。另外一种可选的方式是把参数类型列表放在header 里,但是这种方式在payload是protobuf的时候会产生冗余字段。
   
   你误解了,我上面的意思是argsTypes带的,是序列化数据里面是不是自描述类型,看下系列化的接口


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] owen200008 commented on issue #10063: #9536 改动json类dubbo3.x序列化都会失败

Posted by GitBox <gi...@apache.org>.
owen200008 commented on issue #10063:
URL: https://github.com/apache/dubbo/issues/10063#issuecomment-1133655990

   回归这个主题实际序列号目前感觉需要定下来
   1. 确定序列号是否数据带自描述类型(包括request和response)
   个人建议是不带,兼容性更好,比如数据转化,泛型的支持
   弊端是序列号依赖方法信息(感觉序列化之前invoke增加方法查找的invoke,然后利用invocation进行传递)
   
   
   这个改变导致的兼容问题的话,只能通过序列化id做区分
   
   
   
   


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] owen200008 commented on issue #10063: #9536 改动json类dubbo3.x序列化都会失败

Posted by GitBox <gi...@apache.org>.
owen200008 commented on issue #10063:
URL: https://github.com/apache/dubbo/issues/10063#issuecomment-1133656815

   上面的改动是架构调整不大,序列化实现改动是极大的 序列化需要支持继续Type类型,比如hession2实现都是没有的,不然泛型对象都会异常(比如Response<T>里面的T data是不支持类型的,不根据Type使用class的话,这个data类型最终反序列化是个Map)


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] owen200008 commented on issue #10063: #9536 改动json类dubbo3.x序列化都会失败

Posted by GitBox <gi...@apache.org>.
owen200008 commented on issue #10063:
URL: https://github.com/apache/dubbo/issues/10063#issuecomment-1133637491

   > > 目前从invocation成员来说argsType是知道的
   > > 从性能和必要性上来分析,感觉是可以去掉TripleWapper里面的argsType
   > 
   > 这句话是不对的,因为目前支持了重载,对于 wrapper ,需要根据 type 去找对应的重载方法,
   > 
   > 如果去除重载支持,只根据方法名称能够唯一确定方法,那去掉是可以的
   
   棒棒,采用类似dubbo里面实现 method加desc 参数不用去就做为查找的参数解决多态问题


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] owen200008 commented on issue #10063: #9536 改动json类dubbo3.x序列化都会失败

Posted by GitBox <gi...@apache.org>.
owen200008 commented on issue #10063:
URL: https://github.com/apache/dubbo/issues/10063#issuecomment-1134051836

   #6232 
   关联到这个问题


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] EarthChen commented on issue #10063: #9536 改动json类dubbo3.x序列化都会失败

Posted by GitBox <gi...@apache.org>.
EarthChen commented on issue #10063:
URL: https://github.com/apache/dubbo/issues/10063#issuecomment-1133642082

   > > > 目前从invocation成员来说argsType是知道的
   > > > 从性能和必要性上来分析,感觉是可以去掉TripleWapper里面的argsType
   > > 
   > > 
   > > 这句话是不对的,因为目前支持了重载,对于 wrapper ,需要根据 type 去找对应的重载方法,
   > > 如果去除重载支持,只根据方法名称能够唯一确定方法,那去掉是可以的
   > 
   > 棒棒,采用类似dubbo里面实现 method加desc 参数不用去就做为查找的参数解决重载问题
   
   其实是可以的,但是区别不大。其实放在url上或者header中更为合适,但是目前已经有用户在使用了,再修改有兼容性问题了


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] guohao commented on issue #10063: #9536 改动json类dubbo3.x序列化都会失败

Posted by GitBox <gi...@apache.org>.
guohao commented on issue #10063:
URL: https://github.com/apache/dubbo/issues/10063#issuecomment-1134618741

   不wrapper 里携带参数类型是为了方便非 Dubbo 客户端做统一处理,比如 envoy 网关,他们本身是不需要感知的。另外一种可选的方式是把参数类型列表放在header 里,但是这种方式在payload是protobuf的时候会产生冗余字段。


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] owen200008 commented on issue #10063: #9536 改动json类dubbo3.x序列化都会失败

Posted by GitBox <gi...@apache.org>.
owen200008 commented on issue #10063:
URL: https://github.com/apache/dubbo/issues/10063#issuecomment-1132755870

   应该是改动为 基于class类型序列化和反序列化
   我还是支持类型原始dubbo方式pts(pts也是从method的arg获取到的type,类似invocation里面的argsType)


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] EarthChen commented on issue #10063: #9536 改动json类dubbo3.x序列化都会失败

Posted by GitBox <gi...@apache.org>.
EarthChen commented on issue #10063:
URL: https://github.com/apache/dubbo/issues/10063#issuecomment-1133631221

   >目前从invocation成员来说argsType是知道的
   从性能和必要性上来分析,感觉是可以去掉TripleWapper里面的argsType
   
   这句话是不对的,因为目前支持了重载,对于 wrapper ,需要根据 type 去找对应的重载方法,
   
   如果去除重载支持,只根据方法名称能够唯一确定方法,那去掉是可以的


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] owen200008 closed issue #10063: #9536 改动json类dubbo3.x序列化都会失败

Posted by "owen200008 (via GitHub)" <gi...@apache.org>.
owen200008 closed issue #10063: #9536 改动json类dubbo3.x序列化都会失败
URL: https://github.com/apache/dubbo/issues/10063


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org