[nanomsg] Re: Broadcast protocol

  • From: Nico Williams <nico@xxxxxxxxxxxxxxxx>
  • To: nanomsg@xxxxxxxxxxxxx
  • Date: Wed, 11 Sep 2013 12:04:06 -0500

On Wed, Sep 11, 2013 at 04:13:22PM +0300, Paul Colomiets wrote:
> 1. There are many watchers
> 
> 2. Watcher subscribes to a channel at the start
> 
> 3. When subscribing watcher gets current data on a channel
> 
> 4. When channel data changes, all its watchers get new value
> 
> 
> Combination of pubsub and reqrep can't be used here, because when pubsub
> temporarily disconnects some updates can be lost.

Sounds like pubsub with reliability -- I'd call it "reliable pubsub" :)

Should be possible to implement as a layer above pubsub that:

 - adds sequence numbers to messages,
 - keeps N messages buffered for making them available via reqrep,
 - and has subscribers detect message loss and respond by requesting the
   missing messages.

You might want to add a heartbeat message so that subscribers can
distinguish long runs of message loss from infrequent publication of new
data (publishers should publish the heartbeat interval / frequency).

Note that this is a building block for some secure pubsub protocols as
well.

Nico
-- 

Other related posts: