Codacoda
Back to Academy

process thread

Inter-Process Communication

Inter-Process Communication (IPC) is the set of mechanisms that allow separate processes to exchange data. Since processes have isolated memory spaces, they cannot share data directly and must use OS-provided channels such as message passing, shared memory, pipes, sockets, or signals. Choosing the right IPC mechanism depends on the data volume, latency requirements, and coupling between processes.

Use Cases

  • Microservices communicating via message queues (RabbitMQ, Kafka) for decoupled architectures
  • Parent-child process communication using pipes in Unix shell pipelines
  • Node.js cluster workers exchanging messages with the master process via process.send()
  • Shared memory segments for high-performance data transfer between processes (e.g., video streaming)

Visualization

CONCEPTProcess A (writer)data = 'hello'Process B (reader)data = ???Kernel (manages IPC)
Speed:1x
Processes have isolated memory. To exchange data, they need Inter-Process Communication (IPC).Step 1 / 7

Implementation

Output

Click "Run Code" to see output...