Chapter 2. Communication - PowerPoint PPT Presentation

1 / 26
About This Presentation
Title:

Chapter 2. Communication

Description:

Title: Introduction Author: Steve Armstrong Last modified by: Created Date: 5/7/2001 8:12:22 PM Document presentation format: – PowerPoint PPT presentation

Number of Views:77
Avg rating:3.0/5.0
Slides: 27
Provided by: SteveA317
Category:

less

Transcript and Presenter's Notes

Title: Chapter 2. Communication


1
Chapter 2. Communication
2
Layered Protocol
Not always 7-layered Protocol But some other
protocols if necessary
3
Client-Server Model
Client-Server Model
4
Basic Operations of Client-Server Model(Send and
Receive Protocol)
Server While(1) waitMessage(FromAny,rxmsg)
sourcerxmsg.source opcoderxmsg.opcode
paramrxmsg.params resultfunctionsopcode(para
m) txmsg.resultresult txmsg.sourceme
sendMessage(source,txmsg)
Client txmsg.opcodeopcode
txmsg.sourceme txmsg.paramparam
sendMessage(serverID,txmsg) waitMessage(serverI
D,rxmsg) checkAndProcess(rxmsg)
Client
Client
5
Steps of RPC
  • 1. Client procedure calls client stub in normal
    way
  • 2. Client stub builds message, calls local OS
  • 3. Client's OS sends message to remote OS
  • 4. Remote OS gives message to server stub
  • 5. Server stub unpacks parameters, calls server
  • 6. Server does work, returns result to the stub
  • 7. Server stub packs it in message, calls local
    OS
  • 8. Server's OS sends message to client's OS
  • 9. Client's OS gives message to client stub
  • 10. Stub unpacks result, returns to client

6
RPC Remote Procedure Call
Server
Client txmsg.opcodeopcode
txmsg.sourceme txmsg.paramparam
sendMessage(serverID,txmsg) waitMessage(serverI
D,rxmsg) checkAndProcess(rxmsg)
resultfuncA(param)
STUB
7
Binding a Client to a Server
  • Binding in DCE (Distributed Computing Environment)

8
Middleware
Client
Server
Stub for Client
Stub for Server
Binding (Dynamic)
Middleware
9
Middleware Protocol
10
Some Issues Reliable vs. Non-Reliable
Client
Server
Process
Process
OS
OS
If reply message is lost?
1. Blocking
2. Acknowledge
3. Idempotent
11
Some Issues Blocking vs. Non-Blocking
  • Blocking (No Buffer, Synchronous)

Send
Client
Server
12
Some Issues Blocking vs. Non-Blocking
  • Non-Blocking (No Buffer, Asynchronous)

Send
Client
Server
13
Asynchronous RPC
  • If client does not receive return value,
  • No reason to be blocked.
  • Asynchronous RPC

14
Asynchronous RPC
  • Even though client does receive return value,
  • Two asynchronous RPC

15
Some Issues Parameter Passing
16
Parameter Passing for Objects
  • Two types of Object Parameter Passing
  • Object Copy vs. Reference Copy
  • Should it be transparent ?

17
Remote Object Invocation
  • Generalization of RPC to Object Invocation

18
Marshalling
System A
System B
Object in Main Memory
Object in Main Memory
Object
Marshalling
Demarshalling
When objects in memory are to be passed across a
network to another host or persisted to storage,
their in-memory representation must be converted
to a suitable out-of-memory format. This process
is called marshalling, and converting back to an
in memory representation is called demarshalling
19
Extended RPC Door for Single Machine
  • Client and Server are located in a single machine
  • RPC for processes on the same machine

20
RMI Object Binding
  • Implicit Binding
  • Distr_object obj_ref //Declare a system-wide
    object referenceobj_ref // Initialize the
    reference to a distributed objectobj_ref-gt
    do_something() // Implicitly bind and invoke a
    method
  • Explicit Binding
  • Distr_object objPref //Declare a system-wide
    object referenceLocal_object obj_ptr
    //Declare a pointer to local objectsobj_ref
    //Initialize the reference to a distributed
    objectobj_ptr bind(obj_ref) //Explicitly bind
    and obtain a pointer to the local proxyobj_ptr
    -gt do_something() //Invoke a method on the local
    proxy

21
Stream-Oriented Communication
  • In distributed environment
  • Continuous Media e.g. video
  • Discrete Media e.g. Simple File Transfer
  • Temporal Aspects of Data Stream
  • Asynchronous Transmission
  • Synchronous Transmission
  • Isochronous Transmission
  • Composition of Stream
  • Simple Stream
  • Complex Stream composed of simple or complex
    streams
  • Synchronization is very important

22
Data Streaming
23
QoS Quality of Service
  • Timeline, Volume and Reliability

24
Group Communication
  • Send to multiple receivers

Send to a machine
Send to a group
25
Group Communication Design Issues
  • Closed or Open
  • Peer or Hierarchical
  • Addressing
  • Multi-Casting or Broadcasting
  • Uni-casting
  • Predicate Addressing

Open to outside
Closed to outside
26
Group Communication Design Issues
  • Group Membership
  • Send/Receive Protocol
  • How to distinguish it from single receive
  • Atomicity
  • Message ordering
  • Scalability
Write a Comment
User Comments (0)
About PowerShow.com