1 / 29

Communication

Communication. Chapter 2. Part III Message-Oriented Communication. RPC, ROI, and Message Passing. RPC and ROI enhance access transparency by hiding communication RPC and ROI are inherently synchronous RPC and ROI are not always appropriate

Download Presentation

Communication

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Communication Chapter 2 Part III Message-Oriented Communication

  2. RPC, ROI, and Message Passing • RPC and ROI enhance access transparency by hiding communication • RPC and ROI are inherently synchronous • RPC and ROI are not always appropriate • What if the receiving side I not executing when the request is sent • Sometimes, we need to resort to message-passing

  3. Persistence and Synchronicity in Communication (1) 2-20 • General organization of a communication system in which hosts are connected through a network

  4. Persistence and Synchronicity in Communication (2) • Persistent communication of letters back in the days of the Pony Express.

  5. 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

  6. Synchrony in Communication • Asynchronous: The sender does not block until the message is 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 to the receiver

  7. Persistence Asynchronous Communication • A message is stored: • until delivered • at A’s host • at the first comm server • e.g.: email 2-22.1

  8. Persistence Synchronous Communication • A message is stored: • until delivered • at the B’s host • weaker: stored at B’s • Comm server • stronger: delivered to B 2-22.1

  9. Transient Asynchronous Communication • A message is stored: • at A’s host • at the first comm server • If B is not running, message • Is dropped • e.g.: UDP asynch. RPC 2-22.2

  10. Transient Synchronous Communication (1) Weakest: Receipt-based Moderate: Delivery-based Strongest: Response-based 2-22.2

  11. Transient Synchronous Communication (2) • Delivery-based transient synchronous communication at message delivery • Response-based transient synchronous communication

  12. Message-Oriented Transient Communication • Berkley (UNIX) Sockets: • An abstraction of the actual communication endpoints • Message Passing Interface (MPI): • a standard for message passing • Makes hardware-independent applications • Short-term storage for messages • Seconds to milliseconds transfer time

  13. Berkeley Sockets (1) Java Constructors accept() Constructor I/O streams close() • Socket primitives for TCP/IP.

  14. Berkeley Sockets (2) ServerSocket() Socket() • Connection-oriented communication pattern using sockets.

  15. MPI (1) • Processes are grouped (non-disjoint groups) • A process is identified by (groupID, processID) • Used instead of a transport-level address • Offers communication primitives for all kinds forms of communication • Except receipt-based transient synchronous communication

  16. MPI (2) • Some of the most intuitive message-passing primitives of MPI.

  17. Message-Oriented Persistent Communication • Message Queuing systems • Offers intermediate-term storage capacity for messages: • Without requiring any of the sender or receiver to be active during transmission • Intermediate-term: minutes of transfer time

  18. Message-Queuing Model (1) • Applications communicate by inserting messages into queues • Each application has a private queue • Other applications send message to that queue • The private queue can be read only by the associated application • [Applications can share a queue] • A queue has a system-wide name (address)

  19. Message-Queuing Model (2) • A messages travels through communication servers to get to its destination • It is popular to have direct connections between each pair of comm servers • Persistence: a message will eventually be inserted into the recipient’s queue

  20. Loosely-Coupled Communication Sender Receiver Running Running Passive Passive • Receiver: not necessarily executing when the message is added to its queue • Sender: not necessarily executing when message is picked up by the receiver 4 execution modes while transmitting messages

  21. Execution Modes 2-26 • Four combinations for loosely-coupled communications using queues.

  22. Queuing System Interface • Basic interface to a queue in a message-queuing system.

  23. General Architecture of a Message-Queuing System (1) A B Source Queue Destination Queue • Nearby the receiver • Message contains information about this queue • How the message travels between A and B is the responsibility of the queuing system • Nearby the sender • Messages can be put to the queue only

  24. General Architecture of a Message-Queuing System (2) Queuing table entry Queue Name Network Address • The collection of queues is distributed across multiple machines • The system must maintain a (possibly distributed) database of queues (queuing tables)

  25. General Architecture of a Message-Queuing System (3) • The relationship between queue-level addressing and network-level addressing.

  26. 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

  27. General Architecture of a Message-Queuing System (5) 2-29 • Routing is static • Medium-level scalability (manually configure the routing tables)

  28. Integrating Differing Message-Based Systems Message Broker A-specific message format System A System B B-specific message format

  29. Message Brokers 2-30 • The general organization of a message broker in a message-queuing system.

More Related