Sunday, January 28, 2024

[SOLVED] Fastest technique to pass messages between processes on Linux?

Issue

What is the fastest technology to send messages between C++ application processes, on Linux? I am vaguely aware that the following techniques are on the table:

  • TCP
  • UDP
  • Sockets
  • Pipes
  • Named pipes
  • Memory-mapped files

are there any more ways and what is the fastest?


Solution

I would suggest looking at this also: How to use shared memory with Linux in C.

Basically, I'd drop network protocols such as TCP and UDP when doing IPC on a single machine. These have packeting overhead and are bound to even more resources (e.g. ports, loopback interface).



Answered By - Sam
Answer Checked By - Cary Denson (WPSolving Admin)