asynchronous messaging design

I want to design asynchronous messaging over QNX synchronous message passing. Will anybody suggest some hints to approach it ?

Lingaraj … queue.html

You need to be more specific about what’s your intention if you want to design your own asynchronous messaging.


As PeterHuber said mqueue (not mq) will do that for you.

Or you might want to modify QNX source code to add that capability at the kernel/qnet level.

Just to ask, why bother with message passing if you want asynchronous? Wouldn’t a pipe be easier?


We are trying hard to find the best solution - but we don’t know the problem, do we? ;-)

I think when a pipe gets full the sender will block until there is enough room. Unless maybe you can make it NON_BLOCK?

i want my asynchronous message passing design to provide services like UDP … and it should also be used across network…Is this design possible using QNX ipc primitives ?

Not really.

You can simulate it. Just immediately reply nothing to every received message. Make sure that the receiver is never busy doing anything other than waiting for messages. If this is not sufficient then there are obvious other ways to get the desired results without using QNX IPC, eg. use UDP, or invent your own raw packets.

I said not really but I was being pesimistic.

What you can do is have each process that should receive the data create a thread which job is only to receive messages. Put these messages in a circular buffer and notify the main thread with a pulse that there are messaging waiting in the buffer. If the buffer gets full the message is dropped just like UDP.

Compare to UDP only feature you won’t get is broadcast/multicast.