I have to port to Windows a UNIX local communication API. On UNIX, it uses =
AF_Unix domain sockets. The common usage of this API is for 20 or 30, maybe=
The discussion i want to start is to know if my choices are right or not, a=
nd if not, what your advices are. I have not a lot of experience in what i'=
m wanting to code but I am not a newbye too. I've already written such IPC =
client / server (named pipes ans shared memory). Now, I want to know what i=
s the best design for my needs above.
So here are my questions and notes :
1) Choice of IPC design
I've searched here and there (stackoverflow, or ) and it seems that what=
is the closest to AF_Unix domain sockets on Windows is named pipes. Is thi=
s a good choice ?
If named pipes are the correct choice, there several possible modes :
a) Synchronous (blocking or not)
b) Overlapped asynchronous
c) Completion Routine
For the needs of my client/server design , I think that a) is not the best.
for b) MSDN has an implementation , but it seems that there is a problem=
for me : in the description, it is said : "Because the same event object i=
s used for read, write, and connect operations for each instance, there is =
no way to know which operation's completion caused the event to be set to t=
he signaled state for simultaneous operations using the same pipe instance.=
" I think it can be a problem.
Does c) seem a good choice ?
3) Notification models
to handle notifications (client which is connecting, messages received) it =
depends on the choice of I/O mode. If c) is chosen, I think that either the=
se models should be used :
b) I/O Completion Ports
I've read on internet (and also in ) that I/O Completion Ports are desig=
ned for high-concurrency programs, with a thousand or more clients (I would=
need ~50 clients, maybe a bit more). Also It adds some overhead and it see=
ms that it is very difficult to get it right.
What would you advice, here ?
I stop here, and wait your advices before writing some code.