[zeromq-dev] keep alive ping in ZeroMQ?

Martin Sustrik sustrik at 250bpm.com
Tue May 4 18:35:48 CEST 2010


What I am missing is that 0MQ doesn't have a notion of disconnect. So 
even if there are heartbeats what should happen when the peer doesn't 
respond?

Btw, I'm cc-ing the mailing list.

Martin

Pieter Hintjens wrote:
> This is worth discussing on the dev list IMO.
> 
> The HyBi thread may also be relevant, the optimum solution appears to
> be quite tricky.  I'm not sure if it would not need some 0MQ protocol
> support.  It's a topic that will definitely come up when we start to
> deploy 0MQ on mobile devices.  However a good solution may be to
> simply bridge 0MQ over WebSocket.
> 
> -Pieter
> 
> On Tue, May 4, 2010 at 3:12 PM, Jianhua Cao <jianhua.cao at mashmobile.com> wrote:
>> The mobile client is connected to the server (e.g. subscribe to a channel).
>>
>> Due to that there hasn't been any traffic for a while,  all kinds of
>> weird things can happen
>> - the mobile network/ e.g. WCDMA protocol stack may move to the IDLE
>> state and put radio into sleep mode
>> - The NAT gateway may drop connection on either side.
>> once something like above happen, the application won't be notice
>> immediately. As result the down link message to the mobile will be
>> dropped b/c the server believes that the client has been disconnected.
>>
>> By sending keep alive pinging at the application level seems  do the
>> trick (at the cost of battery).
>>
>>
>> /Jianhua
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> On Tue, May 4, 2010 at 10:08 AM, Martin Sustrik <sustrik at 250bpm.com> wrote:
>>> I mean, what problem would it solve exactly?
>>>
>>> I am not familiar with details of how NAT works, so explaining the use
>>> case would help.
>>>
>>> Martin
>>>
>>> Jianhua Cao wrote:
>>>> running a ZeroMQ node in a mobile device.
>>>>
>>>> On Tue, May 4, 2010 at 6:32 AM, Martin Sustrik <sustrik at 250bpm.com> wrote:
>>>>> Hi Jianhua,
>>>>>
>>>>>> I just came across one email by Pieter to the hybi ietf wg concerning
>>>>>> keep alive ping in AMQP.
>>>>>> http://www.ietf.org/mail-archive/web/hybi/current/msg01758.html
>>>>>>
>>>>>> I am wondering how is the issue (NAT reset discovery/recovery) handled
>>>>>> by ZeroMQ?
>>>>> It is not. What would it be good for?
>>>>>
>>>>> Martin
>>>>>
>>>>
>>>>
>>>
>>
>>
>> --
>> Jianhua
>>
>>




More information about the zeromq-dev mailing list