Presentation is loading. Please wait.

Presentation is loading. Please wait.

An adapted reference model for networked communication.

Similar presentations


Presentation on theme: "An adapted reference model for networked communication."— Presentation transcript:

1 An adapted reference model for networked communication.
Middleware Protocols RPC, Message oriented Communication, etc. 2-5 An adapted reference model for networked communication.

2 Remote Procedure Call Conventional Procedure Call i. e
Remote Procedure Call Conventional Procedure Call i.e. read(fd,buf,bytes) a) Parameter passing in a local procedure call: the stack before the call to read b) The stack while the called procedure is active

3 Client and Server Stubs
Principle of RPC between a client and server program.

4 Remote Procedure Call (1)
Steps in making a remote procedure call the stubs are shaded gray

5 Steps of a Remote Procedure Call (RPC)
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

6 Remote Procedure Call (2)
Implementation Issues Cannot pass pointers call by reference becomes copy-restore (but might fail) Weakly typed languages client stub cannot determine size Not always possible to determine parameter types Cannot use global variables

7 RPC protocol definition
Define message format Define data representation Define transport service type (i.e. TCP)

8 Asynchronous RPC (1) useful when there is no result to return
2-12 a) The interconnection between client and server in a traditional RPC b) The interaction using asynchronous RPC

9 Asynchronous RPC (2) 2-13 A client and server interacting through two asynchronous RPCs (deferred synchronous RPC)

10 Message oriented communication
RPCs, i.e., enhance access transparency but they are not always appropriate to distributed system. Persistence and Synchronicity Different types of communications

11 Persistent communication
2-20 General organization of a communication system in which hosts are connected through a network Example : system. If the target server is unreachable, the local one continue to store messages ( in contrast with a transient communication method).

12 Persistence and Synchronicity in Communication
2-22.1 Persistent asynchronous communication Persistent synchronous communication

13 Persistence and Synchronicity in Communication
2-22.2 Transient asynchronous communication (one way RPC) Receipt-based transient synchronous communication

14 Persistence and Synchronicity in Communication
Delivery-based transient synchronous communication at message delivery(asynchronous RPCs) Response-based transient synchronous communication (RPCs)

15 Message passing communication
The need for persistent communication services is clear in developing middleware for large-scale distributed applications. Only transient or persistent communications, like only synchronous or asynchronous communications, are not sufficient! Message passing communication

16 Message oriented transient communications Berkeley Sockets
Primitive Meaning Socket Create a new communication endpoint Bind Attach a local address to a socket Listen Announce willingness to accept connections Accept Block caller until a connection request arrives Connect Actively attempt to establish a connection Send Send some data over the connection Receive Receive some data over the connection Close Release the connection Socket primitives for TCP/IP. With new high performance multicomputer systems standard socket primitives are insufficient. Primitives have to be at a good level of abstraction and suitable for new high speed interconnection protocols

17 The Message-Passing Interface (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 Some of the most intuitive message-passing primitives of MPI. MPI uses the underlying network and it assumes communication take place within a known group of processes MPI supports all the previous transient communication diagrams except for (d)

18 Four combinations for loosely-coupled communications using queues.
Message oriented persistent communications Message-Queuing Model basic idea: applications communicate by inserting messages in specific queues 2-26 Four combinations for loosely-coupled communications using queues.

19 Message-Queuing Model
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. Basic interface to a queue in a message-queuing system.

20 General Architecture of a Message-Queuing System (1)
The collection of queues is distributed across multiple machines queue names db The relationship between queue-level addressing and network-level addressing.

21 General Architecture of a Message-Queuing System (2)
2-29 A message-queuing system with routers (or relays) can solve the problem of a static large scale system queue-to-location mapping

22 Message Brokers it converts incoming messages to a format compatible with the destination application 2-30 The general organization of a message broker in a message-queuing system. It is generally not considered an integral part of the queuing system.

23 Setting up a stream between two processes across a network.
Data Stream (1) Sometime timing is crucial for communication… asynchronous, synchronous and isochronous mode for data stream Setting up a stream between two processes across a network.

24 Setting up a stream directly between two devices.
Data Stream (2) 2-35.2 Setting up a stream directly between two devices.

25 An example of multicasting a stream to several receivers.
Data Stream (3) An example of multicasting a stream to several receivers.

26 Specifying QoS (1) Time dependent requirements are expressed as 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 A flow specification.

27 The principle of a token bucket algorithm
Specifying QoS (2) The principle of a token bucket algorithm A token is a fixed number of bytes that an application can pass to the network. Tokens are buffered in buckets

28 Resource reSerVation Protocol
Setting Up a Stream Resources required for streaming: bandwidth, buffers, processing capacity Resource reSerVation Protocol The basic organization of RSVP for resource reservation in a distributed system. Receiver-initiated protocol

29 Synchronization Mechanisms (1)
The principle of explicit synchronization on the level data units. The application is responsible for synchro.

30 Synchronization Mechanisms (2)
2-41 The principle of synchronization as supported by high-level interfaces.


Download ppt "An adapted reference model for networked communication."

Similar presentations


Ads by Google