[zeromq-dev] Over Unix Domain Sockets?
Martin Sustrik
sustrik at fastmq.com
Tue Sep 15 10:40:02 CEST 2009
Steven McCoy wrote:
> 2009/9/15 Martin Sustrik <sustrik at fastmq.com <mailto:sustrik at fastmq.com>>
>
> If I was the developer the first thing I would do would be to find out
> which existing IPC mechanism is the most efficient: Pipes? Loopback
> sockets? Shared memory?
>
> From previous experience it can different on every platform. HP/UX for
> example has faster Unix sockets than shared memory, but any luck that
> has since improved.
This is a useful piece of information. The consequence IMO is that the
IPC message transfer should be implemented with an option of switching
to different IPC mechanism on mind - same way as we can use select,
poll, epoll, dev/poll or kqueue as a polling mechanism depending on the
OS platform.
> I would start with Unix sockets by taking the existing TCP sockets and
> simply updating the configuration to support the different naming scheme.
Yup. That seems to be the easiest way to start.
> For shared memory I presume you can implement a lock-less wait-free
> queue using atomic ops, you could also try new system calls on Linux
> like vmsplice() to turn the shared memory into a pipe.
Yes, this can be done later on as an optimisation.
Martin
More information about the zeromq-dev
mailing list