EarthChen commented on issue #11447: URL: https://github.com/apache/dubbo/issues/11447#issuecomment-1422032479
> > > > hi chen,感谢你的修复。我刚刚测试过,不使用stub方式是可以达到我的目的。我还有两个疑问想向你咨询一下: > > 1. 我想问一下,客户端使用stub和proxy方式有什么不同吗,客户端的stub是不是为了方便stream流接口? > 2. “服务端的async”,我的目的是为了服务端内部调用其他服务的时候不阻塞业务线程,采用了completableFuture形式返回响应?请问在triple协议下,有什么好的实现方法吗?是不是要采用stream接口呢? 1. stub 模式主要是没有反射的,他是没有 proxy 这层的,纯 native 2. 这个问题在于你没有理解 rpc 层面的异步是什么逻辑,在rpc 场景下,所有的异步都是对客户端来说的,你调了服务端的 async 接口,服务端的async 接口其实是对 sync 接口的同步包装,其实也就是调用了sync 接口,对于你的需求,调用其他服务不阻塞业务线程直接调用 async 方法就可以了 -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
