Boost logo

Boost Users :

Subject: [Boost-users] [message_queue.hpp]is it possible to use a boost message queue without data getting interleaved from multiple processes
From: rohini chandra pallapothu (rohinichandrap_at_[hidden])
Date: 2010-12-30 04:30:59


Hi,

I have used boost message queues to setup IPC between a command client and a
server on Linux. The client is a command which sends the command options
and the server fetches the data and sends it to the client. The client
prints the output received from server on the console. The data sent from
the command is small but the data sent by the server to the command is
huge(~11Mb). Server need to send the data to multiple command clients
simultaneously as it is common to execute commands with different options at
the same time from different terminals.

The commands take quite some time to complete as the data sent from the
server is huge. So more than one command running simultaneously is common.

I do not see data missing when only one command is executed at a time. But
when I execute two commands simultaneously, it seems that the data addressed
to the two commands gets interleaved. I need to make sure that
data addressed to multiple command clients is not interleaved. Only data
addressed to that client should be received by a client.

Since the same boost message queue with the same name is used for all the
command clients, how can this problem be addressed. I read that Windows
Named pipes handle this problem inherently .

Could this be a problem with my implementation or is this a limitation of
the boost message queues?

Please let me know if you need more details

Regards,
Rohini Chandra



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net