Boost logo

Boost :

From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2006-07-08 13:46:52


> But at the current moment I'm very interesting in adding of more
> features to shared_message_queue class. As I understood this queue
> supplies only one client-server connection. So one message can be
> received only one time despite of many processes that want to read it.
> It seems to have internal client number counter will be a good idea.

You want the queue to have an internal client number so that a message
should be read N times before it's removed from the queue? I've based my
model on POSIX mq_xxx functions that offer this possibility. I a
reference counted message quite dangerous because a process crash would
block the queue indefinitely. I don't see an strong reason to do this.
If you want a robust server<->multi-client communication, I would create
N message queues just like a web server has a connection with each web
client. If a client crashes, the server and the other clients are still
fine. If a timeout expires you could even erase the used message queue
system wide erasing the shared memory that was used for that message
queue. This multiplies the number of sent/received messages, and makes
the application more complicated, though.

> Second feature I want to ask you it add more service methods - like to
> get number of messages in queue (useful for profiling applications at
> hard data traffic).

Interesting, I will try to add it.


Boost list run by bdawes at, gregod at, cpdaniel at, john at