chenBright commented on PR #2722:
URL: https://github.com/apache/brpc/pull/2722#issuecomment-2271591068

   目前brpc内部继承并实现google::protobuf::Message的原因:
   1. 序列化和打包的时候,通过Protobuf的反射机制来确定request和response具体类型,确保是具体协议要求的类型;
   2. CallMethod要求request和response是google::protobuf::Message类型。
   
   针对这两个问题,或许我们可以通过以下方法来接触对Protobuf的依赖。以下是初步的想法(可能还有其他未关注到得细节):
   1. 实现内部的Message抽象类,并提供必要的反射机制;
   2. 增加CallMethod重载函数,支持内部Message类型;
   3. 协议注册机制支持内部Message类型。


-- 
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-unsubscr...@brpc.apache.org

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


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

Reply via email to