You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by GitBox <gi...@apache.org> on 2021/07/01 06:33:17 UTC

[GitHub] [incubator-brpc] qqsun8819 opened a new issue #1454: brpc支持pb3

qqsun8819 opened a new issue #1454:
URL: https://github.com/apache/incubator-brpc/issues/1454


   **Is your feature request related to a problem? (你需要的功能是否与某个问题有关?)**
   我们在把brpc引入tensorflow,提高整个TF的通讯性能。在POC中我们可以得到稳定20%以上的性能提升
   现在有个问题:
   
   现在brpc虽然引用的pb是3.x版本,但是使用的proto文件还是用的proto2来生成 。(proto文件里面syntax="proto2")
   
   而TF里面是proto3生成 的pb,(proto文件里面syntax="proto3")
   https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/framework/attr_value.proto#L1
   
   这样在把brpc链入tf的时候,我们遇到 了一些PB不兼容的问题。
   
   **Describe the solution you'd like (描述你期望的解决方法)**
   现在我们希望把brpc里面的pb都改成syntax=proto3,由于pb2和pb3在语法上的一些不同(最大的不同就是去除了required 和optional 关键字,同时所有基础类型不再提供hasxxx方法,详见https://stackoverflow.com/questions/31801257/why-required-and-optional-is-removed-in-protocol-buffers-3 
    https://developers.google.com/protocol-buffers/docs/proto3#default
   
   所以我们对brpc有一定动作的改动,
   
   由于 我们想把tf加入brpc这个功能提交给社区,所以brpc这块对pb3的支持我们也希望能合并进brpc的master。
   
   所以我想和社区的同学商量一下,看看你们觉得是brpc直接默认就全改为pb3,还是加一个选项之类的。我这边愿意推动这个PR,因为我这边内部已经有一个能work的patch,我希望能大家一起讨论一个方案推进这个功能。
   
   **Describe alternatives you've considered (描述你想到的折衷方案)**
   
   
   **Additional context/screenshots (更多上下文/截图)**
   
   


-- 
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: dev-unsubscribe@brpc.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] xuxiangqian commented on issue #1454: brpc支持pb3

Posted by GitBox <gi...@apache.org>.
xuxiangqian commented on issue #1454:
URL: https://github.com/apache/incubator-brpc/issues/1454#issuecomment-1075848505


   麻烦问下这个是怎么修改的?可以分享下最近也遇到这个问题。


-- 
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: dev-unsubscribe@brpc.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] qqsun8819 commented on issue #1454: brpc支持pb3

Posted by GitBox <gi...@apache.org>.
qqsun8819 commented on issue #1454:
URL: https://github.com/apache/incubator-brpc/issues/1454#issuecomment-894332280


   > 一直在用proto3,没出任何问题……
   
   不是pb3有问题,而是brpc链入tf有问题。我没有说过pb3有问题


-- 
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: dev-unsubscribe@brpc.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] qqsun8819 commented on issue #1454: brpc支持pb3

Posted by GitBox <gi...@apache.org>.
qqsun8819 commented on issue #1454:
URL: https://github.com/apache/incubator-brpc/issues/1454#issuecomment-872788703


   @cdjingit  好的,细节有些多,我们可以线下沟通一下不。我的qq是815326512


-- 
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: dev-unsubscribe@brpc.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] guodongxiaren commented on issue #1454: brpc支持pb3

Posted by GitBox <gi...@apache.org>.
guodongxiaren commented on issue #1454:
URL: https://github.com/apache/incubator-brpc/issues/1454#issuecomment-891127531


   一直在用proto3,没出任何问题……


-- 
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: dev-unsubscribe@brpc.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] cool-colo commented on issue #1454: brpc支持pb3

Posted by GitBox <gi...@apache.org>.
cool-colo commented on issue #1454:
URL: https://github.com/apache/incubator-brpc/issues/1454#issuecomment-873747722


   > @cdjingit 好的,细节有些多,我们可以线下沟通一下不。我的qq是815326512
   
   求patch啊, 我们也有这样的需求。 顺便提一下,protobuf3.15以上版本,又把optional和has_xxx加回来了。


-- 
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: dev-unsubscribe@brpc.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] qqsun8819 commented on issue #1454: brpc支持pb3

Posted by GitBox <gi...@apache.org>.
qqsun8819 commented on issue #1454:
URL: https://github.com/apache/incubator-brpc/issues/1454#issuecomment-885995051


   > 具体不兼容的细节是啥? 我之前也做过把tf和brpc结合相关的事情,好像没遇到类似的问题.
   
   @chenzhangyi 方便的话加一下微信,我们探讨一下。
   我在tf1.12没遇到这个问题,tf1.15却遇到了。


-- 
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: dev-unsubscribe@brpc.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] cdjingit commented on issue #1454: brpc支持pb3

Posted by GitBox <gi...@apache.org>.
cdjingit commented on issue #1454:
URL: https://github.com/apache/incubator-brpc/issues/1454#issuecomment-874739941


   各个协议的Request Response提供ByteSizeLong的接口,protobuf::message升级后把ByteSize()改成了ByteSizeLong()


-- 
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: dev-unsubscribe@brpc.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] chenzhangyi commented on issue #1454: brpc支持pb3

Posted by GitBox <gi...@apache.org>.
chenzhangyi commented on issue #1454:
URL: https://github.com/apache/incubator-brpc/issues/1454#issuecomment-874435596


   具体不兼容的细节是啥? 我之前也做过把tf和brpc结合相关的事情,好像没遇到类似的问题.


-- 
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: dev-unsubscribe@brpc.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] GOGOYAO commented on issue #1454: brpc支持pb3

Posted by GitBox <gi...@apache.org>.
GOGOYAO commented on issue #1454:
URL: https://github.com/apache/incubator-brpc/issues/1454#issuecomment-875492890


   这个pr不错


-- 
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: dev-unsubscribe@brpc.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] cdjingit commented on issue #1454: brpc支持pb3

Posted by GitBox <gi...@apache.org>.
cdjingit commented on issue #1454:
URL: https://github.com/apache/incubator-brpc/issues/1454#issuecomment-872113664


   可以详细列一下你们内部方案可能改动的点吗?我认为框架层面需要兼容protobuf2的。


-- 
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: dev-unsubscribe@brpc.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] chenzhangyi commented on issue #1454: brpc支持pb3

Posted by GitBox <gi...@apache.org>.
chenzhangyi commented on issue #1454:
URL: https://github.com/apache/incubator-brpc/issues/1454#issuecomment-874435596


   具体不兼容的细节是啥? 我之前也做过把tf和brpc结合相关的事情,好像没遇到类似的问题.


-- 
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: dev-unsubscribe@brpc.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] cdjingit commented on issue #1454: brpc支持pb3

Posted by GitBox <gi...@apache.org>.
cdjingit commented on issue #1454:
URL: https://github.com/apache/incubator-brpc/issues/1454#issuecomment-873761594


   > @cdjingit 好的,细节有些多,我们可以线下沟通一下不。我的qq是815326512
   
   加我微信吧mojie865805


-- 
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: dev-unsubscribe@brpc.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org