David G' Messerschmitt - PowerPoint PPT Presentation

1 / 24
About This Presentation
Title:

David G' Messerschmitt

Description:

Allow modules to interact in the same way across different hosts as on a single host ... Disestablish. Session protocol. Conversation ... – PowerPoint PPT presentation

Number of Views:51
Avg rating:3.0/5.0
Slides: 25
Provided by: davidg268
Category:

less

Transcript and Presenter's Notes

Title: David G' Messerschmitt


1
Chapter 12
  • by
  • David G. Messerschmitt

2
Communication services
  • by
  • David G. Messerschmitt

3
Example communication services
  • Messages
  • Queuing and multiplexing
  • Message with reply
  • Remote method invocation
  • Conversation
  • Broadcast

4
Some objectives
  • Allow modules to interact in the same way across
    different hosts as on a single host
  • Make it easier to develop applications by
    capturing common generic needs
  • Support a range of applications with distinct
    needs

5
Message
  • The smallest unit of information meaningful to
    the sender and recipient
  • Recipient must be ready and listening
  • Directs or informs the recipient
  • Pure push model
  • Employs a send-receive protocol

6
Supporting deferred applications
  • Queuing
  • Queuing allows a message to be sent even though
    the recipient is not waiting
  • The message sits in a queue somewhere in the
    infrastructure until it is actively retrieved by
    the recipient
  • Combines send-receive and request-reply protocols

7
Participants in message with queuing
Sender
Recipient
Send/ receive
Queue
Request/ response
Sender can send message whenever it wants
Recipient can access message whenever it wants
Infrastructure
8
Multiplexing
  • Multiplexing
  • Allows recipient to receive messages from two or
    more senders
  • How are the senders identified?
  • Presumes queuing what if two messages are sent
    simultaneously?
  • Supported by Message Oriented Middleware (MOM)

9
Multiplexing and queuing
Sender1
Recipient
Mux queue
Sender2
Recipient deals with one message at a time even
if coming from many senders
Infrastructure
10
Example application workflow
Receiving
Administrative assistants
Purchasing
Workers
11
What message is not
  • Delivery may not be guaranteed
  • No shared context of messages from same sender to
    recipient
  • Application is free to create that context on its
    own
  • Messages may not be delivered in the same order
    as sent

12
Message with reply
  • Service couples two messages
  • Request and coupled response message
  • Sender freed of burden of associating response
  • Requests information or a service
  • Pure pull model
  • Immediate
  • Recipient presumes sender is waiting for reply
    and responds as quickly as possible

13
RMI
method parameters return_values
An action object-oriented programming is called a
method
Method invocation
method parameters return_values
Remote method invocation (RMI)
14
Sender is blocked waiting for response
method parameters -gt return_values
Client object
Server object
method,parameters
Computes method()
Blocked cant do anything else
returns
Time
Blocked waiting for response
Working on request
15
Comparison
Sender
Recipient
Queue
Sender
Recipient
Send/receive
Send/receive
Message waiting
Request/ response
Request/ response
Work on message or request
Blocked waiting for response
16
Conversation
  • Two-way exchange of messages
  • Messages in one direction are influenced by
    messages in the other
  • To maintain conversation
  • Messages should be delivered reliably
  • Messages should be delivered in the same order as
    sent
  • No coupling of replies with messages

17
Session protocol
A session typically provides guaranteed ordered
delivery to maintain proper context
Establish
Conversation
Disestablish
18
Some advantages of sessions
  • Aids application by managing a shared context for
    a conversation
  • Identification, ordering, reliable delivery
  • Reduces overhead
  • Example only one name server query
  • Security (Chapter 8)
  • Quality of service (Chapter 11)

19
Examples
  • What are examples of applications that would
    naturally leverage
  • Messages?
  • Queuing and multiplexing?
  • Message with reply?
  • Conversation?

20
Multimedia record-store-playback
Audio coder
Audio decoder
Record
Playback
One (big) message
Storage
Storage
Video coder
Video decoder
21
Streaming multimedia
Audio coder
Audio decoder
Video coder
Video decoder
22
A session supports streaming multimedia
Accumulate audio in message
Send message
Time
Receive message
Playback audio in message
Delay
23
Delay and latency
Message latency time from sending of message
until it is received in its entirety
Time
Delay time elapsing between an event (or series
of events) and its (their) representation
24
Relationship of delay and latency
Latency
Time
Delay
Delay latency (of network) message
accumulation time
If delay is important, keep the messages short!
Write a Comment
User Comments (0)
About PowerShow.com