Communication - PowerPoint PPT Presentation

1 / 32
About This Presentation
Title:

Communication

Description:

RPC enhances access transparency by hiding communication ... Persistent communication of letters back in the days of the Pony Express. ... – PowerPoint PPT presentation

Number of Views:41
Avg rating:3.0/5.0
Slides: 33
Provided by: cse92
Category:

less

Transcript and Presenter's Notes

Title: Communication


1
Communication
Part II Message-Oriented Communication
2
Giving credit where credit is due
CSCE455/855 Distributed Operating Systems
  • 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

3
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

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

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

6
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

7
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

8
Persistent Asynchronous Communication
2-22.1
9
Persistent Synchronous Communication
2-22.1
10
Transient Asynchronous Communication
2-22.2
11
Transient Synchronous Communication (1)
2-22.2
12
Transient Synchronous Communication (2)
  • Delivery-based transient synchronous
    communication at message delivery
  • Response-based transient synchronous communication

13
Message-Oriented Transient Communication
  • Berkley (UNIX) Sockets
  • An abstraction of the actual communication
    endpoints
  • Message Passing Interface (MPI)
  • a standard for message passing
  • Makes applications platform independent
  • Short-term storage for messages
  • Milliseconds to seconds transfer time

14
Berkeley Sockets (1)
Java
  • Socket primitives for
    TCP/IP.

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

16
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

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

18
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

19
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)

20
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 communication servers
  • Persistence a message will eventually be
    inserted into the recipients queue

21
Loosely-Coupled Communication
  • Receiver not necessarily executing when the
    message is added to its queue
  • Sender not necessarily executing when message
    is picked up by the receiver

Sender
Receiver
4 execution modes while transmitting messages
22
Execution Modes
2-26
  • Four combinations for loosely-coupled
    communications using queues.

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

24
General Architecture of a Message-Queuing System
(1)
A
B
  • Nearby the sender
  • Messages can be put to this queue only

25
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)

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

27
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

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

29
Integrating Differing Message-Based Systems
A-specific message format
B-specific message format
30
Message Brokers
2-30
  • The general organization of a message broker in a
    message-queuing system.

31
In-Class Exercises
1. C has a construction called a union, in which
a field of a record (called a struct in C) can
hold any one of several alternatives. At run
time, there is no sure-fire way to tell which one
is in there. Does this feature of C have any
implications for remote procedure call? Explain
your answer. 2. One way to handle parameter
conversion in RPC systems is to have each machine
send parameters in its native representation,
with the other one doing the translation, if need
be. The native system could be indicated by a
code in the first byte. However, since locating
the first byte in the first word is precisely the
problem, can this actually work?
32
In-Class Exercises
3. With persistent communication, a receiver
generally has its own local buffer where messages
can be stored when the receiver is not executing.
To create such a buffer, we may need to specify
its size. Give an argument why this is
preferable, as well as one against specification
of the size. 4. Explain why transient
synchronous communication has inherent
scalability problems.
Write a Comment
User Comments (0)
About PowerShow.com