Lecture 3 Communication
Total Page:16
File Type:pdf, Size:1020Kb
Lecture 3 Communication Prof. Wilson Rivera University of Puerto Rico at Mayaguez Electrical and Computer Engineering Department Outline z Layered protocols (OSI Model) z Remote Procedure Call z Message Oriented Communication z Streaming Oriented Communication z Multicasting Parallel and Distributed Computing Laboratory @ UPRM Communication Concepts z In traditional network systems communication is often based on low-level message passing primitives offered by the transport protocol (lack of transparency) z Middleware must provide a higher level of abstraction to allow the development of large scale distributed applications Parallel and Distributed Computing Laboratory @ UPRM Layered Protocols (1) z Layers, interfaces, and protocols in the OSI model. Parallel and Distributed Computing Laboratory @ UPRM Layered Protocols (2) z OSI (Open Systems Interconnection) Reference Model Designed to allow open systems to communicate by using standard rules (protocols) z Low Level Protocols Physical layer (electrical, mechanical and signal interfaces; eg. RS-232-C) Data link layer (mechanisms to correct errors; eg. Checksum) Network layer (routing, connectionless; eg. IP (Internet Protocol) Parallel and Distributed Computing Laboratory @ UPRM Layered Protocols (3) z Transport Protocols Reliable connection (can be built on the top of connection-oriented or connectionless protocols) » TCP (Transmission Control Protocol) Æ overhead » UDP (Universal Datagram Protocol) Æ Non reliable » RTP (Real Time Transport Protocol) z High Level Protocols In the Internet protocol suite everything above the transport layer is grouped together Session & Presentation Layer » Low level synchronization Application layer » Container for all applications » FTP (File Transfer Protocol) » HTTP (Hyper Text Transfer Protocol) Parallel and Distributed Computing Laboratory @ UPRM Layered Protocols (4) z A typical message as it appears on the network. Parallel and Distributed Computing Laboratory @ UPRM Middleware Protocols (1) z An adapted reference model for networked communication. Parallel and Distributed Computing Laboratory @ UPRM Middleware Protocols (2) z Application specific protocols (eg. FTP, HTTP) z Middleware Protocols General purposes (application independent ) protocols » Middleware services (eg. authentication) » High level communication RPC MOM Stream Multicast Parallel and Distributed Computing Laboratory @ UPRM Conventional Procedure Call a) Parameter passing in a local procedure call: the stack before the call to read b) The stack while the called procedure is active Parallel and Distributed Computing Laboratory @ UPRM Client and Server Stubs z Principle of RPC between a client and server program. Parallel and Distributed Computing Laboratory @ UPRM Steps of a Remote Procedure Call 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 Parallel and Distributed Computing Laboratory @ UPRM Passing Value Parameters (1) z Steps involved in doing remote computation through RPC Parallel and Distributed Computing Laboratory @ UPRM RPC Usage considerations z RPC is appropriate for client/server applications z When recovery mechanisms, such as retransmissions, are employed by an RPC application, the resulting load on a network may increase, making the application inappropriate for a congested network. z RPC uses static routing tables established at compile-time, the ability to perform load balancing across a network is difficult. z RPC implementations are nominally incompatible with other RPC implementations. Vendor Features that may affect the design and cost of a RPC-based application include the following: » support of synchronous and/or asynchronous processing » support of different networking protocols » support for different file systems » whether the RPC mechanism can be obtained individually, or only bundled with a server operating system Parallel and Distributed Computing Laboratory @ UPRM Asynchronous RPC (1) a) The interconnection between client and server in a traditional RPC b) The interaction using asynchronous RPC Parallel and Distributed Computing Laboratory @ UPRM Asynchronous RPC (2) z A client and server interacting through two asynchronous RPCs (deferred synchronous RPC) Parallel and Distributed Computing Laboratory @ UPRM RPC Systems z Sun RPC (ONC RPC) z DCE-RPC z DCOM z CORBA (Common Object Request Architecture) z Java RMI z XML-RPC z SOAP (Simple Object Access Protocol) z AJAX (Asynchronous Javascript And XML) z REST (REpresentational State Transfer) z Thrift (Facebook) Parallel and Distributed Computing Laboratory @ UPRM DCE RPC (1) z Distributed Computing Environment (DCE) Developed by the Open Software Foundation Adopted in Microsoft’s base system for distributed computing, DCOM Uuidgen (program to generate a prototype IDL (Interface Definition Language) file containing a unique interface identifier IDL file can be modified to support other constructs IDL compiler » Header (unique identifiers, type definitions, and function prototypes) » Client stub » Server stub Application writer to write the client and server codes Parallel and Distributed Computing Laboratory @ UPRM DCE RPC (2) Parallel and Distributed Computing Laboratory @ UPRM DCE RPC (3) z Client-to-server binding in DCE. Parallel and Distributed Computing Laboratory @ UPRM Message-Queuing Model (1) z Four combinations for loosely-coupled communications using queues. Parallel and Distributed Computing Laboratory @ UPRM Message-Queuing Model (2) z Basic interface to a queue in a message-queuing system. Parallel and Distributed Computing Laboratory @ UPRM General Architecture of a Message-Queuing System (1) z Figure 4-19. The relationship between queue-level addressing and network-level addressing. Parallel and Distributed Computing Laboratory @ UPRM General Architecture of a Message-Queuing System (2) A message-queuing system with routers. Parallel and Distributed Computing Laboratory @ UPRM Message Brokers z Figure 4-21. The general organization of a message broker z in a message-queuing system. Parallel and Distributed Computing Laboratory @ UPRM MQM Use Considerations z Persistent asynchronous communication z Provide intermediate term storage capacity z Do not require either sender or receiver to be active during message transmission z Support message transfers taking in the order of minutes instead seconds z Applicable to email, groupware, workflow and batch processing applications z Very suitable for integrating a collection of databases and applications into a federated information system Parallel and Distributed Computing Laboratory @ UPRM MQM Protocol Implementations z Java Message Service (API level available in Java EE) z IBM’s WebSphere MQ z JBOSS Message z ActiveMQ z Advanced Message Queuing Protocol (AMQP) OpenAMQ StormMQ RabbitMQ Apache Qpid RedHat MRG Parallel and Distributed Computing Laboratory @ UPRM IBM’s WebSphere Message-Queuing System z Figure 4-22. General organization of IBM’s message- queuing system. Parallel and Distributed Computing Laboratory @ UPRM Channels z Some attributes associated with message channel agents. Parallel and Distributed Computing Laboratory @ UPRM Message Transfer z Figure 4-24. The general organization of an MQ queuing network using routing tables and aliases. Parallel and Distributed Computing Laboratory @ UPRM Data Stream z Figure 4-26. A general architecture for streaming stored multimedia data over a network. Parallel and Distributed Computing Laboratory @ UPRM Streams and Quality of Service z Properties for Quality of Service: z The required bit rate at which data should be transported. z The maximum delay until a session has been set up z The maximum end-to-end delay . z The maximum delay variance, or jitter. z The maximum round-trip delay. Parallel and Distributed Computing Laboratory @ UPRM Enforcing QoS (1) z Figure 4-27. Using a buffer to reduce jitter. Parallel and Distributed Computing Laboratory @ UPRM Enforcing QoS (2) z Figure 4-28. The effect of packet loss in (a) non interleaved transmission and (b) interleaved transmission. Parallel and Distributed Computing Laboratory @ UPRM Synchronization Mechanisms (1) z Figure 4-29. The principle of explicit synchronization on the level data units. Parallel and Distributed Computing Laboratory @ UPRM Synchronization Mechanisms (2) z Figure 4-30. The principle of synchronization as supported by high-level interfaces. Parallel and Distributed Computing Laboratory @ UPRM Overlay Construction z Figure 4-31. The relation between links in an overlay and actual network-level routes. Parallel and Distributed Computing Laboratory @ UPRM Information Dissemination Models (1) z Anti-entropy propagation model Node P picks another node Q at random Subsequently exchanges updates with Q z Approaches to exchanging updates P only pushes its own updates to Q P only pulls in new updates from Q P and Q send updates to each other Parallel and Distributed Computing Laboratory @ UPRM Information Dissemination Models (2) z Figure 4-32. The relation between the fraction s of update-ignorant nodes and the parameter k in pure gossiping. The graph displays ln(s) as a function of k. Parallel and Distributed Computing Laboratory @ UPRM.