Summary of message-based IPC
Unix sockets are used most often because they offer all that is needed, except perhaps message priority. They are implemented on most operating systems, and so they confer maximum portability.
FIFOs are less used, mostly because they lack an equivalent to a datagram. On the other hand, the API is very simple, being the normal open(2), close(2), read(2), and write(2) file calls.
Message queues are the least commonly used of this group. The code paths in the kernel are not optimized in the way that socket (network) and FIFO (filesystem) calls are.
There are also higher-level abstractions, in particular, D-Bus, which are moving from mainstream Linux to embedded devices. D-Bus uses Unix sockets and shared memory under ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access