chenzhangyi commented on issue #2769:
URL: https://github.com/apache/brpc/issues/2769#issuecomment-2374095772

   > > 如果 A2 依赖 A1 的结果是不是 client A 在收到 A1 回复后再调用 A2?如果不依赖结果,只要求顺序执行,也可以合并 A1、A2 
为新的 RPC 来处理吧。
   > 
   > 十分感谢您的回复,您的建议十分的有启发性! 
我已经测试过完全同步的方式(即Client在收到前一个RPC的响应再发送后一个),业务逻辑的确是可以正确执行的。
   > 
   > 只是我的场景有一些额外约束:
   > 
   > 1. 对时延的要求十分的高,如果每一个RPC都需要等待前者响应,那么时延就长到不可接受,所以我采用了异步的模式,也引入了这个问题。
   > 2. 我的业务逻辑中**RPC之间的依赖关系的数量和次序可能并不固定**(举例说明,即有一些场景是A1->A2, 
有一些场景是A1->A2->A3->A4,另外一个场景是A1->A2->A4)。所以如果要合并多个RPC,就会面临组合数爆炸的问题。理论上我可以再剪枝掉一些不可能的组合,但估计剪枝的效益并不明显。
   
   听你的描述是需要一个动态的DAG执行引擎,这个引擎来决定没有数据依赖的RPC能并发,有依赖的等前者,这个可能需要包装一下。


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