Comments (4)
感谢反馈。
1。 这个设计目标并不单指连接不可用时,而且是在连接繁忙,占用的情况采用异步的方式发送,以提前吞吐能力的。
2。 这个设计只针对长链接的方式才有效。
3。 validateObject是使用者可设置开启或关闭的, 这一块应用的common-pool的实现
from jprotobuf-rpc-socket.
感谢反馈。
1。 这个设计目标并不单指连接不可用时,而且是在连接繁忙,占用的情况采用异步的方式发送,以提前吞吐能力的。
2。 这个设计只针对长链接的方式才有效。
3。 validateObject是使用者可设置开启或关闭的, 这一块应用的common-pool的实现
感谢解答!还有点疑问:
1.连接繁忙,占用 是指建立连接的过程繁忙吗?如果是的话
// Wait until the connection is made successfully.
future.awaitUninterruptibly();
上面这个是会同步等待到整个连接建立完成/失败吧?
from jprotobuf-rpc-socket.
不是建立链接过程繁忙,因为我们使用的是连接池的方案,已经建立完成的链接,有可能出现短时不可用的情况,这个影响因素很多
from jprotobuf-rpc-socket.
嗯嗯,其实我疑问的根源是,这个队列的消费是注册在future的回调的,这个future是建立连接这个操作的future吧?建立链接完成后出现短时不可用,我们把请求丢在缓存队列中,这个链接恢复后,这个future还会去回调去消费吗?
@Override
public PooledObject<Connection> wrap(Connection connection) {
InetSocketAddress address;
if (host == null) {
address = new InetSocketAddress(port);
} else {
address = new InetSocketAddress(host, port);
}
ChannelFuture future = this.rpcClient.connect(address);
// Wait until the connection is made successfully.
future.awaitUninterruptibly();
if (!future.isSuccess()) {
LOGGER.log(Level.SEVERE, "failed to get result from stp", future.cause());
} else {
connection.setIsConnected(true);
}
// 建立网络链接完成后,短时不可用恢复后,这个future还会有回调吗?
future.addListener(new RpcChannelFutureListener(connection));
connection.setFuture(future);
return new DefaultPooledObject<Connection>(connection);
}
from jprotobuf-rpc-socket.
Related Issues (20)
- ChannelPoolObjectFactory.wrap方法的实现问题 HOT 1
- 升级到3.5.9还是不行,赶紧解决吧! HOT 15
- 不能支持Proxy对象的服务发布 HOT 3
- idle时间使用默认的60s,严格的按照每60s调用一次,偶发性发现服务连不上 HOT 2
- 无效端口判断应该是小于最小,大于最大吧 HOT 4
- 协议打jar包后缺少XXX程序包 #27问题类似 HOT 2
- 是否有打算对reactive和连接多路复用等进行支持 HOT 1
- byte数组转String时未指定编码
- 增加StrategyInterceptor属性可设置
- RpcClient#shutdown 极端情况可能会出现hang死情况 HOT 2
- Double-Checked Locking
- 修正 发布服务为void返回值方法时, 使用interceptor机制,会异步重复触发调用问题
- There is a vulnerability in netty 4.0.56.Final ,upgrade recommended
- There is a vulnerability in spring-boot 1.5.14.RELEASE ,upgrade recommended
- 不支持内部类的序列化和反序列化,是否可以支持? HOT 1
- ProtobufIDLProxy.create针对long double float 在设置default值,不加类型符里出错
- Springboot使用时,必须要依赖spring-boot-starter-web吗? HOT 3
- minEvictableIdleTimeMillis is useless with default timeBetweenEvictionRunsMillis
- 可不可以直接使用proto 里定义的pojo对象,而不定义用@Protobuf 定义的对象? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jprotobuf-rpc-socket.