Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Written by Prashant Basnet
Prashant Basnet, a software engineer at Unisala.com, focuses on software development and enjoys building platforms to share knowledge. Interested in system design, data structures, and is currently learning NLP
All communication in distributed systems is based on explicit message exchange (sending and receiving messages).
When process P wants to communicate with process Q, it
Construct a message in its own address space.
Execute a system call, which sends the message through the network to process Q.
What if the network is unreliable, and message is lost?
Then receiving process Q handles the messsage asynchronously or synchronously based on the communication model .
IF a server receives the connection message, server must responds with the acknowledgment.
Distributed system with no shared memory.
Types of communication:
An analogy of Email vs Phone Call:
In distributed systems if a message is lost during network communication between processes P and Q, several key challenges arise:
The key challenge is that in a distributed system with only message-passing (no shared memory), it's impossible to definitively determine why a message wasn't received, making failure handling complex but essential.
Common IPC methods in distributed systems:
Yes, a socket is an interface/abstraction that sits between the transport layer (TCP/UDP) and application layer. It provides APIs for applications to use transport layer services:
Socket is the door to the application. We can have different types of socket. Which OS uses pid to identify which door to supply the requested information.
Yes, without sockets you'd need to manually handle raw network protocols like constructing TCP/IP packet headers, managing IP addressing, setting checksum values, handling network byte ordering.
We also need to deal with low-level operations likes buffer management, packet fragmentation/assembly, error detection/correction, flow control
Not only that but also deal with direct network device access, memory management, interrupt handling.
Whom should we thank for Socket Development?
Berkeley Sockets (BSD Sockets) were developed at UC Berkeley in the early 1980s as part of BSD Unix. Key developers included Bill Joy and Sam Leffler. The API became standardized as part of POSIX and is now the standard networking interface across most operating systems.
This standardization helped drive widespread adoption of TCP/IP and influenced modern internet development.