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 2022/12/23 14:14:53 UTC

[GitHub] [incubator-brpc] leaf-potato commented on issue #2052: 传输大量数据必须用butil::IOBuf 吗?

leaf-potato commented on issue #2052:
URL: https://github.com/apache/incubator-brpc/issues/2052#issuecomment-1363987901

   Q1:在client、server两端都是brpc的前提下,attachment更算是proto message的一种补充。proto官方给出大小是有限制的,默认是64MB,硬制是2GB。在限制范围内,attachment和proto的区别在于序列化和反序列化,如果attachment是传proto序列化后的数据,理论上两者差距不大。
   
   Q2:理论上chunkPB是要大于rpc请求的生命周期
   1. 发送端如何去判断请求已经发送完了呢?同步请求rpc server,_stub函数返回时整个rpc交互已经完成收到response信息;异步请求rpc,_stub函数返回只代表请求提交给了rpc框架,结束时调用用户的回调函数;brpc应该没提供接口告诉用户当前请求已经发送了。
   2. 在调closure前rpc并未结束,chunkPB都是有效的。
   
   个人看法,如有错误还请指教~


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