[zeromq-dev] [request] IPC on windows

Steven McCoy steven.mccoy at miru.hk
Fri Aug 5 08:03:59 CEST 2011


On 5 August 2011 13:54, blp330 <blp330 at msn.com> wrote:

> Martin Sustrik <sustrik <at> 250bpm.com> writes:
>
> >
> > On 08/04/2011 06:49 AM, blp330 wrote:
> >
> > > I am looking for ZeroMQ’s windows IPC support for a long time.
> >
> > You can use TCP for inter-process communication at the moment.
> >
> > If you need NamedPipes, you need to implement IOCP polling mechanism
> > first (select doesn't handle NamedPipes). Have a look at
> > select_t/poll_t/epoll_t/devpoll_t/kqueue_t classes for example of how
> > polling mechanism is to be implemented. Also check the mailing list
> > archives for the discussions of IOCP.
> >
> > Martin
>
> Is IOCP polling the only way to implement ipc:// in ZeroMQ?
> I did not dig into zeromq's code yet, so I can't make sure how to implement
> ipc:// properly.
>
> How about use shared memory to emulate that? Shared memory seems like the
> most
> efficient mechanism for IPC.
>
>
Shared memory suffers the same problem of requiring a proactor model.  My
plan for implementing name pipe support was to first add IOCP support via
changing the core 0mq engine to be proactor instead of reactor.  It is easy
to change POSIX to proactor, you can already see Windows performance is
terrible when shoe horned into a reactor model.

Once you have named pipes running moving to shared memory is easy.

1)  Change zmq_engine from reactor to proactor.
2)  Fake proactor POSIX by simply calling recv or send in the completion
event.
3)  Slot in IOCP into the new model, also easy to emulate on POSIX for
testing.  There is an implementation from Intel available on Google.
4)  Add named pipe support.
5)  Add shared memory support.

I've started each of the stages but it only shows that adding to the current
model is the wrong design.  Then I got distracted with IPv6 and some other
stuff.

-- 
Steve-o
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20110805/e943161c/attachment.htm>


More information about the zeromq-dev mailing list