Re: [Proposal] A proposal to use IdleStateHandler to replace using Timer to send HeartBeat.

2019-01-22 Thread Jun Alpha
@ yuhang xiu I have review your pr, and I think maybe something need to change about the close method, also I have left a comment , could you pls review it? Ian Luo 于2019年1月22日周二 下午2:12写道: > Yuhang, > > Nice catch. Could you pls. review my comments on your pull request? > > Thanks, > -Ian. > >

Re: [Proposal] A proposal to use IdleStateHandler to replace using Timer to send HeartBeat.

2019-01-21 Thread Ian Luo
Yuhang, Nice catch. Could you pls. review my comments on your pull request? Thanks, -Ian. On Tue, Jan 22, 2019 at 11:36 AM yuhang xiu wrote: > Hi, jingfeng, > > I saw beiwei merge your pr, nice work! > > However, I think we still need to consider two things. > > Since we are using a shared

Re: [Proposal] A proposal to use IdleStateHandler to replace using Timer to send HeartBeat.

2019-01-21 Thread yuhang xiu
Hi, jingfeng, I saw beiwei merge your pr, nice work! However, I think we still need to consider two things. Since we are using a shared timer, this timer will not be closed when a client is closed. In this case, we need to control our tasks without unlimited growth. My current practice is to

Re: [Proposal] A proposal to use IdleStateHandler to replace using Timer to send HeartBeat.

2019-01-14 Thread 徐靖峰
Hi folks, Here is my suggestion to improve Dubbo’s HeartBeat Design. - The design of the two-way heartbeat is unnecessary, compatible with the existing logic, allowing the client to send a one-way heartbeat when the connection is idle, and the server periodically detects the connection

Re: [Proposal] A proposal to use IdleStateHandler to replace using Timer to send HeartBeat.

2019-01-14 Thread Ian Luo
Folks, Should we simply close this pull request if it is inappropriate? @carryxyh, @lexburner Thanks, -Ian. On Sat, Jan 12, 2019 at 8:14 PM 徐靖峰 wrote: > Hi > The changes don’t follow my attentions, I will submit my design later. > Maybe we need describe the problem more detailedly, then the

Re: [Proposal] A proposal to use IdleStateHandler to replace using Timer to send HeartBeat.

2019-01-12 Thread 徐靖峰
Hi The changes don’t follow my attentions, I will submit my design later. Maybe we need describe the problem more detailedly, then the problem has solved for a half. > 在 2019年1月12日,下午7:45,Jun Alpha 写道: > > Hello everyone, I have commit a pull request[1] to optimize Dubbo's > heartbeat

Re: [Proposal] A proposal to use IdleStateHandler to replace using Timer to send HeartBeat.

2019-01-12 Thread Jun Alpha
Hello everyone, I have commit a pull request[1] to optimize Dubbo's heartbeat mechanise, witch is mentioned in this email and this issue[2],pls review it. [1] https://github.com/apache/incubator-dubbo/pull/3213 [2] https://github.com/apache/incubator-dubbo/issues/3151 徐靖峰 <250577...@qq.com>

Re: [Proposal] A proposal to use IdleStateHandler to replace using Timer to send HeartBeat.

2019-01-10 Thread 徐靖峰
@Jun Alpha great, I am glad to review your changes and wait for your pull request. > 在 2019年1月10日,下午8:00,Jun Alpha 写道: > > I'll try it. > > Ian Luo 于2019年1月10日周四 下午2:21写道: > >> It is a good suggestion any way, we should give it a try at least. >> >> -Ian. >> >> On Thu, Jan 10, 2019 at

Re: [Proposal] A proposal to use IdleStateHandler to replace using Timer to send HeartBeat.

2019-01-10 Thread Jun Alpha
I'll try it. Ian Luo 于2019年1月10日周四 下午2:21写道: > It is a good suggestion any way, we should give it a try at least. > > -Ian. > > On Thu, Jan 10, 2019 at 10:21 AM yuhang xiu wrote: > > > hi, @jun alpha > > > > I agree. > > If netty can do more precise heartbeat control, we can integrate its >

Re: [Proposal] A proposal to use IdleStateHandler to replace using Timer to send HeartBeat.

2019-01-09 Thread Ian Luo
It is a good suggestion any way, we should give it a try at least. -Ian. On Thu, Jan 10, 2019 at 10:21 AM yuhang xiu wrote: > hi, @jun alpha > > I agree. > If netty can do more precise heartbeat control, we can integrate its design > in our heartbeat. Would you like to try it? > > Jun Alpha

Re: [Proposal] A proposal to use IdleStateHandler to replace using Timer to send HeartBeat.

2019-01-09 Thread yuhang xiu
hi, @jun alpha I agree. If netty can do more precise heartbeat control, we can integrate its design in our heartbeat. Would you like to try it? Jun Alpha 于2019年1月9日周三 下午9:21写道: > Hi,I left a comment in this issue[1],I think it's worth to learn from > netty's heartbeat mechanism. > > [1]

Re: [Proposal] A proposal to use IdleStateHandler to replace using Timer to send HeartBeat.

2019-01-09 Thread Jun Alpha
Hi,I left a comment in this issue[1],I think it's worth to learn from netty's heartbeat mechanism. [1] https://github.com/apache/incubator-dubbo/issues/3151 Ian Luo 于2019年1月7日周一 下午10:47写道: > Thanks > > On Mon, Jan 7, 2019 at 2:50 PM yuhang xiu wrote: > > > Hi, I left some comments in this

Re: [Proposal] A proposal to use IdleStateHandler to replace using Timer to send HeartBeat.

2019-01-07 Thread Ian Luo
Thanks On Mon, Jan 7, 2019 at 2:50 PM yuhang xiu wrote: > Hi, I left some comments in this issue[1] > > Thanks to beiwei for reminding. I forgot that we have some non-netty > servers. In this case, I personally prefer all heartbeats to use the same > set of mechanisms to guarantee. But we can

Re: [Proposal] A proposal to use IdleStateHandler to replace using Timer to send HeartBeat.

2019-01-06 Thread yuhang xiu
Hi, I left some comments in this issue[1] Thanks to beiwei for reminding. I forgot that we have some non-netty servers. In this case, I personally prefer all heartbeats to use the same set of mechanisms to guarantee. But we can learn from netty's heartbeat mechanism to ensure more accurate

Re: [Proposal] A proposal to use IdleStateHandler to replace using Timer to send HeartBeat.

2019-01-06 Thread Ian Luo
It is an interesting topic. It is worthy to give it a try when Dubbo uses Netty, but pls. keep in mind that Dubbo has the ability to use other servers. I am not sure whether this suggestion will introduce unnecessary complexity. JingFeng, would you mind to file an issue and give it a try if you

[Proposal] A proposal to use IdleStateHandler to replace using Timer to send HeartBeat.

2019-01-06 Thread 徐靖峰
Hi all 现状: Dubbo 在应用层面发送心跳包保证连接的可用性,使用了定时器的设计,在客户端和服务端分别设置一个定时器,发送心跳,当发现连接断开时,客户端负责重连,服务端负责 close。使用定时器并不是一个好的设计,在忙通信时,心跳是不必要的。建议使用 Netty 的 IdleStateHandler,仅仅在检测到空闲连接时发送心跳。 修改建议: 使用 IdleStateHandler 代替 Timer 发送心跳 关闭 ChannelOption.SO_KEEPALIVE,网络层面的 TCP 断连需要在机器级别设置,默认是 2