[zeromq-dev] subports

Martin Sustrik sustrik at 250bpm.com
Wed Jul 27 17:03:50 CEST 2011

On 07/27/2011 03:48 PM, Pieter Hintjens wrote:

> Here's my immediate reaction as user:

Yes. My initial take on the problem was exactly the same: Implement it 
in-process and make it as simple to use as tcp transport.

However, it turns out that tcp transport is as simple as it is because 
it is implemented in kernel space.

Specifically, port is a system-wide entity and thus needs a shared 
system-wide table of bound ports. For TCP this table resides in kernel 
space, so it's automatically set up when system boots.

As for subports the possible solutions are either to move the table to 
the kernel space (possibly a reasonable long-term solution) or run a 
system-wide daemon holding the table (which is what I did).

> too complex

The suggestion to use a fixed port for vtcp is trying to address the 
complexity issue.

The idea is that you can start the vtcp daemon in the init script (no 
parameters needed) and then stop caring about it.

 From 0MQ's point of view it would mean that 'port' part of the address 
can be ommitted which would make addresses look exactly the same as tcp 

     zmq_bind (s, "vtcp://*:5555"); // 5555 is a subport!

> not complete

Yes. Binding to specific interfaces is missing. My guess is that it can 
be implemented without having to mess with the kernel. I'll check it out 
and report back.


More information about the zeromq-dev mailing list