[nanomsg] Re: issue with "received" message size

  • From: Paul Colomiets <paul@xxxxxxxxxxxxxx>
  • To: "nanomsg@xxxxxxxxxxxxx" <nanomsg@xxxxxxxxxxxxx>
  • Date: Tue, 11 Mar 2014 16:20:44 +0200

Hi Martin,

On Tue, Mar 11, 2014 at 12:32 PM, Martin Sustrik <sustrik@xxxxxxxxxx> wrote:
> Still sounds the same to me:
>
> Scenario A (simulating send priorities using 2 sockets):
>
> 1. Open 2 sockets
> 2. Send message to first socket in a non-blocking way
> 3. In case of EAGAIN error send the message to the second socket.
>
> Scenario B (simulating recv priorities using 2 sockets):
>
> 1. Open 2 sockets
> 2. Rec message from first socket in a non-blocking way
> 3. In case of EAGAIN error receive the message from the second socket.
>
> Comment: In reality both scenarious would require to poll on both
> sockets. Above version is simplified for readability sake.
>

Yes. That kinda makes sense. But I still have two reasons not to return
nn_recv priorities back:

1. There are possible stalled data for ages in low-priority pipe.
That's not the case for priorities on nn_send side.

2. The way I wan't nn_recv failover to work is following:

We have two REQ sockets A and B, and a REP socket C.
I'd like low-priority connection B-C to be established only
if higher-priority A-C is not connected.

The latter makes much more sense for low-latency systems
which usually never under pushback.

-- 
Paul

Other related posts: