1 / 30

Middleware Protocols

Middleware Protocols. RPC, Message oriented Communication, etc. 2-5. An adapted reference model for networked communication. 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

stan
Download Presentation

Middleware Protocols

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  2. Remote Procedure CallConventional 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 : E-mail 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. 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 communicationsBerkeley Sockets 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 • Socket primitives for TCP/IP.

  17. The Message-Passing Interface (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) • Some of the most intuitive message-passing primitives of MPI.

  18. Message oriented persistent communicationsMessage-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 • 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 Brokersit 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. 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. Data Stream (2) 2-35.2 • Setting up a stream directly between two devices.

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

  26. Specifying QoS (1)Time dependent requirements are expressed as QoS • A flow specification.

  27. 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. Setting Up a StreamResources 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.

More Related