1 / 31

Chapter 4: Communication*

Chapter 4: Communication*. Message-Oriented Communication & Stream-Oriented Communication. *Referred to slides by Manhyung Han at Kyung Hee University, Hitesh Ballani at Cornell University, and Mary Ellen Weisskopf at University of Alabama in Huntsville . Review.

mickey
Download Presentation

Chapter 4: 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. Chapter 4: Communication* Message-Oriented Communication & Stream-Oriented Communication *Referred to slides by Manhyung Han at Kyung Hee University, Hitesh Ballani at Cornell University, and Mary Ellen Weisskopf at University of Alabama in Huntsville

  2. Review In a distributed system, processes run on different machines exchange information through message passing Successful distributed systems depend on communication models that hide or simplify message passing

  3. Middleware Communication Techniques Remote Procedure Call Message-Oriented Communication Stream-Oriented Communication Multicast Communication

  4. Types of Communication Persistent versus transient Synchronous versus asynchronous Discrete versus streaming

  5. Persistent versus TransientCommunication Persistent: messages are held by the middleware comm. service until they can be delivered (e.g., email) Sender can terminate after executing send Receiver will get message next time it runs Transient: messages exist only while the sender and receiver are running Communication errors or inactive receiver cause the message to be discarded Transport-level communication is transient RPC?

  6. Asynchronous v Synchronous Communication Asynchronous: (non-blocking) sender resumes execution as soon as the message is passed to the communication/middleware software Synchronous: sender is blocked until The OS or middleware notifies acceptance of the message, or The message has been delivered to the receiver, or The receiver processes it & returns a response

  7. Evaluation Fully synchronous primitives may slow processes down, but program behavior is easier to understand In multithreaded processes, blocking is not as big a problem because a special thread can be created to wait for messages

  8. Discrete versus Streaming Communication Discrete: communicating parties exchange discrete messages Streaming: one-way communication; a “session” consists of multiple messages from the sender that are related either by send order (TCP streams), temporal proximity (multimedia streams), etc.

  9. Message Oriented Communication RPC supports access transparency, but is not always appropriate Message-oriented communication is more flexible

  10. Message Passing Interface (MPI) Designed for parallel applications using transient communication MPI is a standardized and portable message-passing system designed by a group of researchers from academia and industry used in many environments, e.g., clusters platform independent

  11. Message Primitives Asynchronous: e.g. MPI_bsend Synchronous: e.g. MPI_send, MPI_ssend, MPI_sendrecv:

  12. MPI Apps versus C/S Processes in an MPI-based parallel system act more like peers (or peer slaves to a master processor) Communication may involve message exchange in multiple directions C/S communication is more structured

  13. Message-Oriented Middleware (MOM) - Persistent Processes communicate through message queues Queues are maintained by the message-queuing system Sender appends to queue, receiver removes from queue Neither the sender nor receiver needs to be on-line when the message is transmitted

  14. 4.4 Stream-Oriented Communication RPC and message-oriented communication are based on the exchange of discrete messages Timing might affect performance, but not correctness In stream-oriented communication the message content (multimedia streams) must be delivered at a certain rate, as well as correctly e.g., music or video

  15. Discrete and Continuous Media • Media: means by which information is conveyed • Types of media • Discrete media • No temporal dependence between data items • ex) text, still images, object code or executable files • Continuous media • Temporal dependence between data items • ex) Motion - series of images

  16. Data Streams Data stream = sequence of data items Can apply to discrete, as well as continuous media e.g. UNIX pipes or TCP/IP connections which are both byte oriented (discrete) streams Messages are related by send order Audio and video require continuous time-based data streams

  17. Data Streams Asynchronous transmission mode: the order is important, and data is transmitted one after the other, no restriction to when data is to be delivered Synchronous transmission mode defines a maximum end-to-end delay for individual data packets Isochronous transmission mode has a maximum and minimum end-to-end delay requirement (jitter is bounded) Not too slow, but not too fast either

  18. Distributed System Support Data compression, particularly for video Quality of the transmission Synchronization

  19. Figure. 2-36 An example of multicasting a stream to several receivers

  20. The Internet only provides best-effort services and has no guarantees on the QoS for multimedia data transmission.

  21. The Internet only provides best-effort services and has no guarantees on the QoS for multimedia data transmission. So, distributed system support is needed, for instance,

  22. Figure 4-28. The effect of packet loss in (a) non interleaved transmission and (b) interleaved transmission.

  23. Stereo audio with CD quality (two sequences of 16 bit samples) • Sampling rate 44.1 KHz -> synchronize 22.6 micro sec • Lip synchronization of audio and video streams • Video stream: NTSC standard of 30Hz (a frame every 33.33 ms), • Audio stream: CD Quality sound • Synchronized every 1470 sound samples

  24. Figure. 2-40 The principle of explicit synchronization on the data units • Synchronization Mechanisms(1) • read&write data units of several simple streams • adhere to specific timing and synchronization constraints

  25. For example, a movie composed of A video stream of low-quality images of 320x240 pixels, i.e., 76,800 bytes video data units; A audio stream: audio samples group into units of 11,760 bytes, each corresponding to 33 ms of audio; If the input process can handle 2.5 MB/sec, lip synchronization is achieved by alternating between reading an image and reading a block of audio samples every 33 ms.

  26. Figure. 2-41 The principle of synchronization as supported by high-level interfaces • Synchronization Mechanisms(2) • Synchronization achieved by middleware according to application instructions, e.g., desired image display rate

  27. Figure. 2-41 The principle of synchronization as supported by high-level interfaces

More Related