communication part ii message-oriented communication chapter 4
TRANSCRIPT
![Page 1: Communication Part II Message-Oriented Communication Chapter 4](https://reader035.vdocument.in/reader035/viewer/2022062221/56649da05503460f94a8b26b/html5/thumbnails/1.jpg)
Communication
Part II
Message-Oriented Communication
Chapter 4
![Page 2: Communication Part II Message-Oriented Communication Chapter 4](https://reader035.vdocument.in/reader035/viewer/2022062221/56649da05503460f94a8b26b/html5/thumbnails/2.jpg)
Most of the lecture notes are based on slides by Prof. Jalal Y. Kawash at Univ. of Calgary
I have modified them and added new slides
Giving credit where credit is due:
CSCE455/855 Distributed Operating Systems
![Page 3: Communication Part II Message-Oriented Communication Chapter 4](https://reader035.vdocument.in/reader035/viewer/2022062221/56649da05503460f94a8b26b/html5/thumbnails/3.jpg)
RPC and Message Passing
• RPC enhances access transparency by hiding communication
• RPC is inherently synchronous and is not always appropriate
• What if the receiving side is not executing when the request is sent?
• Sometimes, we need to resort to message-passing
![Page 4: Communication Part II Message-Oriented Communication Chapter 4](https://reader035.vdocument.in/reader035/viewer/2022062221/56649da05503460f94a8b26b/html5/thumbnails/4.jpg)
Persistence and Synchronicity in Communication (1)
General organization of a communication system in which hosts are connected through a network
2-20
![Page 5: Communication Part II Message-Oriented Communication Chapter 4](https://reader035.vdocument.in/reader035/viewer/2022062221/56649da05503460f94a8b26b/html5/thumbnails/5.jpg)
Persistence and Synchronicity in Communication (2)
Persistent communication of letters back in the days of the Pony Express.
![Page 6: Communication Part II Message-Oriented Communication Chapter 4](https://reader035.vdocument.in/reader035/viewer/2022062221/56649da05503460f94a8b26b/html5/thumbnails/6.jpg)
Persistence in Communication
• Persistence: A (sent) message is stored by the communication system until it is delivered.
• Transient: A (sent) message is stored by the communication system as long as both the sender and receiver applications are executing
![Page 7: Communication Part II Message-Oriented Communication Chapter 4](https://reader035.vdocument.in/reader035/viewer/2022062221/56649da05503460f94a8b26b/html5/thumbnails/7.jpg)
Synchrony in Communication
• Asynchronous: The sender does not block until the message is delivered, blocks until stored in a buffer at the sending host, or the first communication server
• Synchronous: The sender blocks until the message is stored in a buffer at the receiving host, or delivered to the receiver
![Page 8: Communication Part II Message-Oriented Communication Chapter 4](https://reader035.vdocument.in/reader035/viewer/2022062221/56649da05503460f94a8b26b/html5/thumbnails/8.jpg)
Persistent Asynchronous Communication
2-22.1
A message is stored: • until delivered
• at A’s host
• at the first comm server
• e.g.: email
![Page 9: Communication Part II Message-Oriented Communication Chapter 4](https://reader035.vdocument.in/reader035/viewer/2022062221/56649da05503460f94a8b26b/html5/thumbnails/9.jpg)
Persistent Synchronous Communication
2-22.1
A message is stored: • until delivered
• at B’s host
• at B’s comm server
![Page 10: Communication Part II Message-Oriented Communication Chapter 4](https://reader035.vdocument.in/reader035/viewer/2022062221/56649da05503460f94a8b26b/html5/thumbnails/10.jpg)
Transient Asynchronous Communication
2-22.2
A message is stored: • at A’s host
• at the first comm server
• If B is not running, messageis dropped
• e.g.: asynch. RPC, UDP
![Page 11: Communication Part II Message-Oriented Communication Chapter 4](https://reader035.vdocument.in/reader035/viewer/2022062221/56649da05503460f94a8b26b/html5/thumbnails/11.jpg)
Transient Synchronous Communication (1)
2-22.2
Weakest: Receipt-based
![Page 12: Communication Part II Message-Oriented Communication Chapter 4](https://reader035.vdocument.in/reader035/viewer/2022062221/56649da05503460f94a8b26b/html5/thumbnails/12.jpg)
Transient Synchronous Communication (2)
Moderate: Delivery-based Strongest: Response-based
![Page 13: Communication Part II Message-Oriented Communication Chapter 4](https://reader035.vdocument.in/reader035/viewer/2022062221/56649da05503460f94a8b26b/html5/thumbnails/13.jpg)
![Page 14: Communication Part II Message-Oriented Communication Chapter 4](https://reader035.vdocument.in/reader035/viewer/2022062221/56649da05503460f94a8b26b/html5/thumbnails/14.jpg)
![Page 15: Communication Part II Message-Oriented Communication Chapter 4](https://reader035.vdocument.in/reader035/viewer/2022062221/56649da05503460f94a8b26b/html5/thumbnails/15.jpg)
![Page 16: Communication Part II Message-Oriented Communication Chapter 4](https://reader035.vdocument.in/reader035/viewer/2022062221/56649da05503460f94a8b26b/html5/thumbnails/16.jpg)
![Page 17: Communication Part II Message-Oriented Communication Chapter 4](https://reader035.vdocument.in/reader035/viewer/2022062221/56649da05503460f94a8b26b/html5/thumbnails/17.jpg)
![Page 18: Communication Part II Message-Oriented Communication Chapter 4](https://reader035.vdocument.in/reader035/viewer/2022062221/56649da05503460f94a8b26b/html5/thumbnails/18.jpg)
![Page 19: Communication Part II Message-Oriented Communication Chapter 4](https://reader035.vdocument.in/reader035/viewer/2022062221/56649da05503460f94a8b26b/html5/thumbnails/19.jpg)
![Page 20: Communication Part II Message-Oriented Communication Chapter 4](https://reader035.vdocument.in/reader035/viewer/2022062221/56649da05503460f94a8b26b/html5/thumbnails/20.jpg)
![Page 21: Communication Part II Message-Oriented Communication Chapter 4](https://reader035.vdocument.in/reader035/viewer/2022062221/56649da05503460f94a8b26b/html5/thumbnails/21.jpg)
![Page 22: Communication Part II Message-Oriented Communication Chapter 4](https://reader035.vdocument.in/reader035/viewer/2022062221/56649da05503460f94a8b26b/html5/thumbnails/22.jpg)
Appendix
![Page 23: Communication Part II Message-Oriented Communication Chapter 4](https://reader035.vdocument.in/reader035/viewer/2022062221/56649da05503460f94a8b26b/html5/thumbnails/23.jpg)
General Architecture of a Message-Queuing System (1)
SourceQueue
DestinationQueue
• Nearby the sender
• Messages can be put to this queue only
• Nearby the receiver
• Message contains information about this queue
• How the message travels between A and B is the responsibility of the queuing system
A B
![Page 24: Communication Part II Message-Oriented Communication Chapter 4](https://reader035.vdocument.in/reader035/viewer/2022062221/56649da05503460f94a8b26b/html5/thumbnails/24.jpg)
General Architecture of a Message-Queuing System (2)
• The collection of queues is distributed across multiple machines
• The system must maintain a (possibly distributed) database of queues (queuing tables)
Queue Name Network Address
Queuing table entry
![Page 25: Communication Part II Message-Oriented Communication Chapter 4](https://reader035.vdocument.in/reader035/viewer/2022062221/56649da05503460f94a8b26b/html5/thumbnails/25.jpg)
General Architecture of a Message-Queuing System (3)
The relationship between queue-level addressing and network-level addressing.
![Page 26: Communication Part II Message-Oriented Communication Chapter 4](https://reader035.vdocument.in/reader035/viewer/2022062221/56649da05503460f94a8b26b/html5/thumbnails/26.jpg)
General Architecture of a Message-Queuing System (4)
• Queues are managed by queue managers
• A queue manager interacts directly with the sending/receiving application
• Some (special) queue managers act like routers or relays
![Page 27: Communication Part II Message-Oriented Communication Chapter 4](https://reader035.vdocument.in/reader035/viewer/2022062221/56649da05503460f94a8b26b/html5/thumbnails/27.jpg)
General Architecture of a Message-Queuing System (5)
• Routing is static• Medium-level scalability (manually configure the routing tables)
2-29
![Page 28: Communication Part II Message-Oriented Communication Chapter 4](https://reader035.vdocument.in/reader035/viewer/2022062221/56649da05503460f94a8b26b/html5/thumbnails/28.jpg)
Integrating Differing Message-Based Systems
System A System B
A-specific message format
B-specific message format
MessageBroker
![Page 29: Communication Part II Message-Oriented Communication Chapter 4](https://reader035.vdocument.in/reader035/viewer/2022062221/56649da05503460f94a8b26b/html5/thumbnails/29.jpg)
Message Brokers
The general organization of a message broker in a message-queuing system.
2-30