Interprocess Communication (IPC) enables processes running on different network machines to exchange data and coordinate their operations.
- Occurs between processes located on separate physical nodes
- Relies on network protocols for data transmission
- Supports interaction among independent system components

Need and Core Communication Characteristics of IPC
- Used to share memory directly for the processes that run on different machines.
- Each communication process is identified using a unique endpoint.
- Depends on message-based communication to coordinate tasks across multiple nodes.
- Data must be serialized into a transferable format before being transmitted over the network.
- Communication can be synchronous or asynchronous, depending on system design.
IPC Mechanisms Used in Distributed Systems
1. Message Passing
It is a communication mechanism in which processes exchange information by sending and receiving structured messages over a network.
- Processes communicate without sharing memory.
- It supports both synchronous and asynchronous operations.
- Messages contain data along with control information.
- It is the fundamental communication model in distributed systems.
2. Remote Procedure Call (RPC)
This is a mechanism that allows a process to invoke a function on a remote machine as if it were a local procedure call.
- It follows a request–response communication model.
- The system handles parameter conversion and message formatting automatically.
- It hides low-level networking complexity from developers.
- It simplifies client–server application development.
- It is widely used in distributed services and microservices.
3. Sockets
It is a network communication endpoint that enables data exchange between applications running on different machines.
- It operates over transport protocols such as TCP or UDP.
- UDP sockets provide faster but connectionless communication.
- Applications must manage connections and data transfer explicitly.
- It is commonly used in web servers and network applications.
4. Message Queuing
It is a communication mechanism where messages are stored in a queue until they are processed by the receiving application.
- It enables asynchronous communication between components.
- Messages remain stored until successfully delivered.
- It improves system reliability and fault tolerance.
- It supports load distribution among multiple consumers.
5. Publish–Subscribe Model
This is a messaging pattern where publishers send messages to topics, and subscribers receive messages based on their topic subscriptions.
- Messages are organized into logical categories called topics.
- Multiple subscribers can receive the same message.
- It supports dynamic addition of publishers and subscribers.
- It enhances scalability in distributed systems
Advantages
- Allows the development of distributed applications where components work across different machines.
- It make system scalable by adding new nodes and services without redesigning the complete system.
- Distributes workload by allowing tasks to proceed on different machines simultaneously.
- Maintains and deploys system components without affecting the complete system.
Disadvantages
- Message transmission and system responsiveness can be slow down due to network latency and limited bandwidth.
- Coordination between processes is disrupted due to message loss, duplication or node crash.
- Securing transmitted data is necessary to prevent unauthorized access, interception, or tampering.
- Due to concurrent operations, data consistency in multiple nodes may be disturbed.
Applications
- A web client sends a request to a remote application server through the network.
- The server receives the request and forwards it to the appropriate service or process for execution.
- The requested operation, such as fetching data from a database, is performed on the server machine.
- The processed result is converted into a transferable format and prepared for transmission.
- The response is sent back over the network to the client, which then displays or uses the received data.