IPC message-queues: msgrcv() vs pipes/sockets? ACE?

M

Matt

I want to implement a complex, multi-process (and multiple threads per
process) network server system. I suspect that socket- or pipe-based
interprocess communication (IPC) will incur too much overhead.

Will the following message-queueing mechanisms (via the msg*()
functions) support the same capability (as sockets or pipes) with less
overhead (ie, make the overall system go faster)?

http://www.opengroup.org/onlinepubs/007908799/xsh/ipc.html

Any other suggestions/alternatives?

Free/open-source alternatives work best. I also prefer a
cross-platform solution between Linux and BSD solutions, possibly
Windows as well (but we can live without Windows support).

My software development team is also trying to get a similar mechanism
to work with ACE ( http://www.cs.wustl.edu/~schmidt/ACE.html ), and
while ACE's thread-pool management seems to work ok, we do not as of
yet see a means to manage shared-memory message queues in ACE.

Thanks for any help,
-Matt
 
G

Gianni Mariani

Matt said:
I want to implement a complex, multi-process (and multiple threads per
process) network server system. I suspect that socket- or pipe-based
interprocess communication (IPC) will incur too much overhead.

Will the following message-queueing mechanisms (via the msg*()
functions) support the same capability (as sockets or pipes) with less
overhead (ie, make the overall system go faster)?

http://www.opengroup.org/onlinepubs/007908799/xsh/ipc.html

The golden rule is "test it".

I suspect that pipes will be fastest since they are the most used.
Any other suggestions/alternatives?

Shared memory and pipes.
 
B

Barry Margolin

Matt said:
I want to implement a complex, multi-process (and multiple threads per
process) network server system. I suspect that socket- or pipe-based
interprocess communication (IPC) will incur too much overhead.

Will the following message-queueing mechanisms (via the msg*()
functions) support the same capability (as sockets or pipes) with less
overhead (ie, make the overall system go faster)?

Message queues are beneficial if you'll have multiple receiving
processes/threads. They're automatically delimited, so you don't have
to worry about one receiver getting part of a message intended for
another. You can also use the msgtype field to indicate which receiver
a message is intended for.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top