SKR 5302: Advanced Distributed Computing
4. Chapter 4: Inter-process Communication
4.10. UDP datagram communication
UDP datagram communication
UDP datagrams are sent without acknowledgement or retries
Issues relating to datagram communication
- Message size: not bigger than 64k in size, otherwise truncated on arrival
- blocking: non-blocking sends (message could be discarded at destination if there is not a socket bound to the port ) and blocking receives (could be timeout)
- Timeout: receiver set on socket
- Receive from any: not specify an origin for messages
Failure model
- omission failure: message be dropped due to checksum error or no buffer space at sender side or receiver side
- ordering: message be delivered out of sender order
- application maintains the reliability of UDP communication channel by itself
TCP stream communication
The API to the TCP
- Provide the abstraction of a stream of bytes to which data may be written and from which data may be read
Hidden network characteristics
- message sizes
- lost messages
- flow control
- message duplication and ordering
- message destinations
Issues related to stream communication
- Matching of data items: agree to the contents of the transmitted data
- Blocking: send blocked until the data is written in the receiver’s buffer, receive blocked until the data in the local buffer becomes available
- Threads: server create a new thread when it accept a connection
Failure model
- Integrity and validity have been achieved by checksum, sequence number, timeout and retransmission in TCP protocol
- Connection could be broken due to unknown failures
- Can’t distinguish between network failure and the destination process failure
- Can’t tell whether its recent messages have been received or not