inter-process communicationhome.eng.iastate.edu/~guan/course/cpre-450-550/slides... ·...

Post on 24-Mar-2020

7 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

CprE 450-550

Dr. Yong Guan

Department of Electrical and Computer Engineering& Information Assurance CenterIowa State University

Inter-process Communication: Message-Oriented and Stream-Oriented Communication

CprE 450-550

Outline for Today’s TalkInter-process Communication

Message PassingSynchronization, QoS, etc.

CprE 450-550

Readings for Today’s Lecture

Chapter 4 of “Distributed Systems: Principles and Paradigms”

CprE 450-550

Message-oriented CommunicationTypes of Communication

RPCWhat about the receiving side is not executing at the time a request is issued?Messaging!

CprE 450-550

Persistence and Synchronicity in Communication (1)

General organization of a communication system in which hosts are connected through a network

2-20

CprE 450-550

Persistence and Synchronicity in Communication (2)

Persistent communication of letters back in the days of the Pony Express.

CprE 450-550

Persistence and Synchronicity in Communication (3)

a) Persistent asynchronous communicationb) Persistent synchronous communication

2-22.1

CprE 450-550

Persistence and Synchronicity in Communication (4)

c) Transient asynchronous communicationd) Receipt-based transient synchronous communication

2-22.2

CprE 450-550

Persistence and Synchronicity in Communication (5)

e) Delivery-based transient synchronous communication at message delivery

f) Response-based transient synchronous communication

CprE 450-550

Connection-oriented communication pattern using sockets.

Message-oriented Transient Communication

Berkeley Sockets

CprE 450-550

Some of the most intuitive message-passing primitives of MPI.

Primitive Meaning

MPI_bsend Append outgoing message to a local send buffer

MPI_send Send a message and wait until copied to local or remote buffer

MPI_ssend Send a message and wait until receipt starts

MPI_sendrecv Send a message and wait for reply

MPI_isend Pass reference to outgoing message, and continue

MPI_issend Pass reference to outgoing message, and wait until receipt starts

MPI_recv Receive a message; block if there are none

MPI_irecv Check if there is an incoming message, but do not block

Message-oriented Transient Communication (2)

Message-Passing Interface (MPI)

CprE 450-550

Four combinations for loosely-coupled communications using queues.

2-26

Message-oriented Persistent Communication

Message Queuing Model

CprE 450-550

Primitive Meaning

Put Append a message to a specified queue

Get Block until the specified queue is nonempty, and remove the first message

Poll Check a specified queue for messages, and remove the first. Never block.

Notify Install a handler to be called when a message is put into the specified queue.

Message-oriented Persistent Communication (2)

Basic interface to a queue in a message-queuing system

CprE 450-550

The relationship between queue-level addressing and network-level addressing.

Message-oriented Persistent Communication (3)

General Architecture of a Message-Queuing System

CprE 450-550

The general organization of a message-queuing system with routers.

Message-oriented Persistent Communication (4)

General Architecture of a Message-Queuing System

CprE 450-550

The general organization of a message broker in a message-queuing system.

Message-oriented Persistent Communication (5)

Message Brokers

CprE 450-550

Stream-oriented CommunicationCommunications discussed so far

Focus on exchanging more-or-less independent and complete units of informationTiming has no effect on correctness

There are forms of communication where timing plays a crucial role.

E.g., Audio/Video streamNeed the support for continuous media

CprE 450-550

Data StreamData Stream

Continuous (representation) stream: temporal relationships between different data items are fundamentally to correctly interpreting what the data actually meansDiscrete (representation) stream: temporal relationships not fundamental to correctly interpreting data.

Transmission modes:Asynchronous transmission mode: No timing contrainstSynchronous transmission mode: Maximum delayIsochronous transmission mode: Max and min delay

Simple stream vs. Complex Stream

CprE 450-550

Data Stream (2)

A general architecture for streaming stored multimedia data over a network.

CprE 450-550

Data Stream (3)

An example of multicasting a stream to several receivers.

CprE 450-550

Streams and Quality of ServiceQoS: Timing and other non-functional requirementsProperties for Quality of Service

The required bit rate at which data should be transported.The maximum delay until a session has been set up The maximum end-to-end delay .The maximum delay variance, or jitter.The maximum round-trip delay for Quality of Service

Specifying QoS

Characteristics of the Input Service Required

maximum data unit size (bytes)Token bucket rate (bytes/sec)Toke bucket size (bytes)Maximum transmission rate (bytes/sec)

Loss sensitivity (bytes)Loss interval (sec)Burst loss sensitivity (data units)Minimum delay noticed (sec)Maximum delay variation (sec)Quality of guarantee

CprE 450-550

Streams and Quality of Service (2)Enforcing QoS

The principle of a token bucket algorithm

CprE 450-550

Streams and Quality of Service (3)Enforcing QoS

Using a buffer to reduce jitter.

CprE 450-550

Streams and Quality of Service (4)Enforcing QoS

The effect of packet loss in (a) non interleaved transmission and (b) interleaved transmission.

CprE 450-550

Setting Up a Stream

The basic organization of RSVP for resource reservation in a distributed system.

CprE 450-550

Stream SynchronizationComplex stream

Synchronization of streams deals with maintaining temporal relationships between streamsE.g. 1, Slide show (with audio) on the webE.g. 2, On-demand movie (audio and video)

CprE 450-550

Stream Synchronization (2)Synchronization Mechanisms

The principle of explicit synchronization on the level data units.

CprE 450-550

Stream Synchronization (3)Synchronization Mechanisms

The principle of synchronization as supported by high-level interfaces.

CprE 450-550

Questions?

Thanks and See you next time

top related