Distributed Systems

Inter-Process Communication (IPC)

Saw this from Unix Domain Socket.

This is fundamental knowledge, thanks to Hemal Shah for really teaching it to me. See Distributed Systems for more motivation.

Resources

IPC are the mechanisms provided by an operating system for processes to manage shared data.

IPC is very important to the design process for microkernels and nanokernels, which reduce the number of functionalities provided by the kernel.

The most important thing is to understand how memory works with IPC, that different processes cannot access the same memory unless the OS creates Shared Memory. And there is the same idea for GPUs.

How this applies in ROS

Same Hardware

When the nodes reside on the same hardware, ROS often uses inter-process communication (IPC) mechanisms like shared memory to pass messages. Shared memory is a fast and efficient method for communication between processes running on the same machine because it avoids the overhead of data serialization and network transmission.

Different Hardware

In contrast, when nodes are on different machines, ROS commonly employs standard network protocols like TCP/IP or UDP to facilitate communication. These protocols work well for both wired and wireless connections.