DOC PREVIEW
FSU COP 5611 - Communication Primitives

This preview shows page 1-2-3-24-25-26-27-49-50-51 out of 51 pages.

Save
View full document
Premium Document
Do you want full access? Go Premium and unlock all 51 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Outline Communication Primitives continued Message passing model Remote procedure calls Theoretical Foundations 01 14 19 COP5611 1 Communication Primitives Communication primitives are the high level constructs Programs use the underlying network by calling these primitives Communication primitives play a significant role in the effective usage of distributed systems 01 14 19 COP5611 2 The Message Passing Model The message passing model provides two basic communication primitives Send and receive Send has two logical parameters a message and its destination Receive has two logical parameters the source and a buffer for storing the message 01 14 19 COP5611 3 Semantics of Send and Receive Primitives There are several design issues regarding SEND and RECEIVE primitives Blocking vs non blocking primitives With blocking primitives the SEND does not return control until the message has been sent or received and the RECEIVE does not return control until a message is copied to the buffer With non blocking primitives the SEND returns control as the message is copied and the RECEIVE signals its intention to receive a message and provide a buffer for it 01 14 19 COP5611 4 Semantics of Send and Receive Primitives cont Synchronous vs asynchronous primitives With synchronous primitives a SEND primitive is blocked until a corresponding RECEIVE primitive is executed With asynchronous primitives a SEND primitive does not block even if there is no corresponding execution of a RECEIVE primitive Buffered or un buffered This is largely determined by the other two choices 01 14 19 COP5611 5 General Organization 01 14 19 COP5611 6 Asynchronous SEND Persistent communication of letters back in the days of the Pony Express 01 14 19 COP5611 7 Semantics of Send and Receive Primitives cont 01 14 19 COP5611 8 Semantics of Send and Receive Primitives cont 01 14 19 COP5611 9 Semantics of Send and Receive Primitives cont 01 14 19 COP5611 10 Problems with Message Passing Model While it is highly flexible programmers must handle the details using such a model Pairing of responses with request messages Data representation Naming the address of the remote machine or the server Taking care of communication and system failures The programs can be time dependent making it impossible to reproduce errors and debug 01 14 19 COP5611 11 Remote Procedure Call RPC is designed to hide all the details from programmers Overcome the difficulties with message passing model It extends the conventional local procedure calls to calling procedures on remote computers 01 14 19 COP5611 12 Conventional Procedure Call a b Parameter passing in a local procedure call the stack before the call to read The stack while the called procedure is active 01 14 19 COP5611 13 Client and Server Stubs Principle of RPC between a client and server program 01 14 19 COP5611 14 Steps of a Remote Procedure Call 1 2 3 4 5 6 7 8 9 10 Client procedure calls client stub in normal way Client stub builds message calls local OS Client s OS sends message to remote OS Remote OS gives message to server stub Server stub unpacks parameters calls server Server does work returns result to the stub Server stub packs it in message calls local OS Server s OS sends message to client s OS Client s OS gives message to client stub Stub unpacks result returns to client 01 14 19 COP5611 15 Steps of a Remote Procedure Call cont 01 14 19 COP5611 16 Remote Procedure Call cont Design issues Structure Mostly based on stub procedures Binding Through a binding server The client specifies the machine and service required Parameter and result passing Representation issues By value and by reference 01 14 19 COP5611 17 Passing Value Parameters 1 Steps involved in doing remote computation through RPC 2 8 01 14 19 COP5611 18 Passing Value Parameters 2 a b c Original message on the Pentium The message after receipt on the SPARC The message after being inverted The little numbers in boxes indicate the address of each byte 01 14 19 COP5611 19 Parameter Specification and Stub Generation a b A procedure The corresponding message 01 14 19 COP5611 20 Remote Procedure Call cont Design issues continued Error handling semantics and correctness At least once semantics Exactly once semantics At most once semantics Correctness conditions Other issues 01 14 19 COP5611 21 Error Handling a b c A server in client server communication Normal case Crash after execution Crash before execution 01 14 19 COP5611 22 Asynchronous RPC 1 a b The interconnection between client and server in a traditional RPC The interaction using asynchronous RPC 01 14 19 COP5611 23 Asynchronous RPC 2 A client and server interacting through two asynchronous RPCs 01 14 19 COP5611 24 Example DCE RPC Distributed Computing Environment DCE By Open Software Foundation OSF now called Open Group DCE is a true middleware system Designed as a layer of abstraction between existing operating systems and distributed applications Provide a number of services Distributed file service directory service security service distributed time service Support UNIX Windows NT A highly representative RPC system 01 14 19 COP5611 25 Writing a Client and a Server 01 14 19 COP5611 26 Binding a Client to a Server Client to server binding in DCE 2 15 01 14 19 COP5611 27 Remote Object Invocation Extend RPC principles to objects The key feature of an object is that it encapsulates data called state and the operations on those data called methods Methods are made available through an interface The separation between interfaces and the objects implementing these interfaces allows us to place an interface at one machine while the object itself resides on another machine 01 14 19 COP5611 28 Distributed Objects Common organization of a remote object with client side proxy 01 14 19 COP5611 29 Binding a Client to an Object Distr object obj ref obj ref obj ref do something Declare a systemwide object reference Initialize the reference to a distributed object Implicitly bind and invoke a method a Distr object obj ref Local object obj ptr obj ref obj ptr bind obj ref proxy obj ptr do something Declare a systemwide object reference Declare a pointer to local objects Initialize the reference to a distributed object Explicitly bind and obtain a pointer to the local Invoke a method on the local proxy b a b An example with implicit binding using only global references An example with explicit binding using global and local references 01 14 19 COP5611 30 Parameter Passing The


View Full Document

FSU COP 5611 - Communication Primitives

Documents in this Course
Load more
Download Communication Primitives
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Communication Primitives and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Communication Primitives and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?