[nanomsg] Re: weird extra byte in header for IPC

  • From: Garrett D'Amore <garrett@xxxxxxxxxx>
  • To: "nanomsg@xxxxxxxxxxxxx" <nanomsg@xxxxxxxxxxxxx>
  • Date: Sun, 20 Apr 2014 10:49:17 -0700

So I understand the idea. But I think this feels like a different protocol than 
the IPC we have today.  I'd argue this is like some new shmem protocol.  It 
might even be possible to use some form of rdma for such in the future to allow 
it to operate outside of a singe host.   For now I would have preferred to keep 
that extra byte out and invent the new transport later.  With a different URL 
scheme as well. 

Oh well.  I fixed my implementation to be compatible.  

Sent from my iPhone

> On Apr 20, 2014, at 4:33 AM, Martin Sustrik <sustrik@xxxxxxxxxx> wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi Garrett,
> 
>> You can't make that work generally I think.
>> 
>> You'd have to have another region of shared memory established.
>> That feels like it should be a totally different transport.
>> Indeed with shared memory you would really like to establish a
>> protocol for placing data in the shared memory regions.
> 
> I was following the system often used in high-perf networking: The
> actual memory managements mechanism is determined based on the message
> size. Typically, you get three different levels here:
> 
> 1. Very small messages - don't even attempt to do zero-copy.
> 2. Middle-sized messages - allocate the message within a pre-allocated
> dedicated pinned-down memory chunk.
> 3. Large messages - allocte a new pinned-down memory chunk per message.
> 
> Anyway, the point is that all 3 compose a single transport mechanism,
> and the actual thresholds to switch between the different allocation
> options is just a policy to apply to the transport.
> 
>> Anyway nanomsg doesn't have anything like this at present.
> 
> True, but the protocol, hopefully, should out-live the current
> implementation.
> 
> Martin
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
> 
> iQEcBAEBAgAGBQJTU7CVAAoJENTpVjxCNN9YodIH/2904BrBw5s+v3IM2zGnfZVf
> IaGQOhxiaBlqq/9Cjn5zRu9tf47ydEoKEYIWjvl2iqsoQS4ZIgwhcQe9zypX4rlc
> aHcs8egJcYxMIkiIPFIREb2AlsrxSXQdkLzVWu3FxWNVGqwroHT3JEyfJEooCmV/
> DjH85nYffi2ygStT3BjT1claLwYS/P8ReJz7HDLPl+wo0oQYP481VpYmbihlM82q
> 1niIOGRCehtJ3/D3035tns/hxbU7HqmhkYTRFwc4DER3ALOXyh8dATtdTCAsTeHz
> pXeub43j1uLU9bzSydjzoWC8cLxsU8l9KbpdNFSd7UnnkC0USRghl2E2Vl/qPVo=
> =61JI
> -----END PGP SIGNATURE-----
> 

Other related posts: