Important Announcement
PubHTML5 Scheduled Server Maintenance on (GMT) Sunday, June 26th, 2:00 am - 8:00 am.
PubHTML5 site will be inoperative during the times indicated!

Home Explore MCA 635_Parallel and Distributed Computing

MCA 635_Parallel and Distributed Computing

Published by Teamlease Edtech Ltd (Amita Chitroda), 2020-12-14 08:50:28

Description: MCA 635_Parallel and Distributed Computing

Search

Read the Text Version

146 Parallel and Distributed Computing Figure 4.10: Service-Oriented Architecture Features of SOA A service-oriented architecture provides the following features:  Distributed Deployment − Expose enterprise data and business logic as loosely, coupled, discoverable, structured, standard-based, coarse-grained, stateless units of functionality called services.  Composability − Assemble new processes from existing services that are exposed at a desired granularity through well defined, published, and standard complaint interfaces.  Interoperability − Share capabilities and reuse shared services across a network irrespective of underlying protocols or implementation technology.  Reusability − Choose a service provider and access to existing resources exposed as services. SOA Operation The following figure illustrates how does SOA operate: CU IDOL SELF LEARNING MATERIAL (SLM)

Introduction to Distributed Systems 147 Figure 4.11: Service-Oriented Architecture Operations Advantages  Loose coupling of service–orientation provides great flexibility for enterprises to make use of all available service recourses irrespective of platform and technology restrictions.  Each service component is independent from other services due to the stateless service feature.  The implementation of a service will not affect the application of the service as long as the exposed interface is not changed.  A client or any service can access other services regardless of their platform, technology, vendors, or language implementations.  Reusability of assets and services since clients of a service only need to know its public interfaces, service composition.  SOA based business application development are much more efficient in terms of time and cost.  Enhances the scalability and provide standard connection between systems.  Efficient and effective usage of ‘Business Services’.  Integration becomes much easier and improved intrinsic interoperability.  Abstract complexity for developers and energize business processes closer to end users. CU IDOL SELF LEARNING MATERIAL (SLM)

148 Parallel and Distributed Computing 4.4 Hardware Concept in Distributed Operation System All distributed systems consist of multiple CPUs. There are several different ways the hardware can be arranged. The important thing related to hardware is that how they are interconnected and how they communicate with each other. It is important to take a deep look at distributed system hardware, in particular, how the machines are connected together and how they interact. Many classification schemes for multiple CPU computer systems have been proposed over the years, but none of them have really implemented. Still, the most commonly used taxonomy is Flynn's (1972), but it was in basic stage. In this scheme, Flynn took only two things to consider i.e. the number of instruction streams and the number of data streams. Single Instruction, Single Data Stream (SISD) A computer with a single instruction stream and a single data stream is called SISD. All traditional uni-processor computers (i.e., those having only one CPU) fall under this category, from personal computers to large mainframes. SISD flow concept is given in the figure below. Figure 4.12: SISD Flow Structure Single Instruction, Multiple Data Stream (SIMD) The next category is SIMD, i.e., single instruction stream, multiple data stream. This type uses an array of processors with only one instruction unit that fetches an instruction, and multiple data units which work in parallel. These machines are used where there need to apply the same instruction for multiple data example, adding up all the elements of 64 independent vectors. Some supercomputers are SIMD. Figure below shows the SIMD flow structure. CU IDOL SELF LEARNING MATERIAL (SLM)

Introduction to Distributed Systems 149 Figure 4.13: SIMD Flow Structure Multiple Instruction, Single Data Stream (MISD) The next category is MISD i.e., multiple instruction streams, single data stream. This structure was worked when there are multiple different instructions to operate on the same type of data. In general MISD architecture is not use more in practical. Figure 4.14: MISD Flow Structure Multiple Instruction, Multiple Data Stream (MIMD) The next category is MIMD, which has multiple instructions performances on multiple data units. This means a group of independent computers; each has its own program counter, program, and data. All distributed systems are MIMD, so this classification system is not more useful for simple purposes. CU IDOL SELF LEARNING MATERIAL (SLM)

150 Parallel and Distributed Computing Figure 4.15: MIMD Flow Structure This was Flynn’s classification. For advance study, let's divide all MIMD computers into two groups: The computers that have a shared memory, usually called multi-processors, and those that have their own local memory, sometimes called multi-computer. The main concept of a multiprocessor is, there is a single virtual address space that is shared by all CPUs. If any CPU writes, for example, if one CPU writes value 44 to address 1000, then any other CPU subsequently reading from its location 1000 will get the value 44 (but they can’t write on same address location simultaneously). All the machines share the same memory. On the other hand in a multi-computer, every machine has its own private memory i.e. distributed memory. If one CPU writes the value 44 to address 1000, when another CPU reads address 1000 it will get whatever value was there before. After writing 44 will not affect its memory at all. A simple example of a multi-computer is a collection of personal computers connected by a network. CU IDOL SELF LEARNING MATERIAL (SLM)

Introduction to Distributed Systems 151 Figure 4.16: Taxonomy of Parallel and Distributed Computer Systems In the above figure, the two categories described can be based on the architecture of the interconnection network. There are two categories at the bottom of the figure, bus and switched. In the bus, there is a single network, backplane, bus, cable, or another medium that connects all the machines. In a cable television system, the cable company runs a wire down the street, and other subscribers have taps running to it from their television sets. Switched systems do not have a single backbone like cable television. But, there are individual wires from machine to machine, having different wiring patterns in use. Messages move through the wires, and the final switching decision is made at each routing stage to route the message to an outgoing destination. The public telephone system for the whole world is organized in this way. The next uppermost dimensions in our taxonomy are that in some systems the machines are tightly coupled, and in others, they are loosely coupled. In a tightly-coupled system, delay is short for message passing, and also the data rate is high; that means, the number of bits per second that can be transferred is large. In the loosely-coupled system, it is just the opposite of it. The inter-machine message delay is large and the data rate is low. CU IDOL SELF LEARNING MATERIAL (SLM)

152 Parallel and Distributed Computing For example, two CPU chips on the same printed circuit board and connected by wires etched onto the board are likely to be tightly coupled, whereas two computers connected by a 2400 bit/sec modem over the telephone system are certain to be loosely coupled. Tightly-coupled systems used in more applications as parallel systems (working on a single problem) and loosely- coupled ones tend to be used as distributed systems (working on many unrelated problems), But this is not always true. One popular example is a project in which hundreds of computers all over the world worked together for factor a huge number (about 100 digits). Each computer was assigned a different range of divisors to try, and they all worked on the problem in their given time and also reporting the results back by email when they finished the task. On the whole, multiprocessors tend to be more tightly coupled than multi-computers, because they can exchange data at memory speeds, but some fiber optic based multi-computer can also work at memory speeds. 4.5 The Software Concept of Distributed Systems The software of the distributed system is nothing but selection of different operating system platforms. The operating system is the interaction between user and the hardware. There are three largely used operating system types: (a) Distributed operating system (b) Network operating system (c) Middleware operating system Distributed Operating System  It is different from multiprocessor and multicomputer hardware.  Multiprocessor- uses different system services to manage resources connected in a system and use system calls to communicate with the processor.  Multicomputer- the distributed Operating system uses a separate uniprocessor OS on each computer for communicating between different computers. CU IDOL SELF LEARNING MATERIAL (SLM)

Introduction to Distributed Systems 153  In distributed OS, a common set of services is shared among multiple processors in such a way that they are meant to execute a distributed application effectively and also provide services to separate independent computers connected in a network as shown in fig below  It communicates with all the computer using message passing interface(MPI).  It follows the tightly coupled architecture pattern.  It uses Data structure like queue to manages the messages and avoid message loss between sender and receiver computer.  E.g., Automated banking system, railway reservation system etc. Disadvantages:  It has a problem of scalability as it supports only limited number of independent computers with shared resources.  There is need to define message passing semantics prior to the execution of messages. Figure 4.17: General Structure of a Multicomputer Operating System Network Operating System  It is specifically designed for hetrogeneous multicomputer system, where multiple hardware and network platforms are supported. CU IDOL SELF LEARNING MATERIAL (SLM)

154 Parallel and Distributed Computing  It has multiple operating system running on different hardware platforms connected in network.  It provides to each computer connected in network.  It follows the loosely coupled architecture pattern which allow user to use services provided by the local machine itself as shown in fig below.  E.g., Remote login where user workstation is used to log in to the remoter server and execute remote commands over the network.  E.g., Centralized file storage system. Advantage: It has scalability feature, where large number of resources and users are supported. Disadvantage: It fails to provide a single coherent view. Network Operating System (1) General Structure of a Network Operating System Figure 4.18: Network Operating System Middle Ware Operating System As distributed operating system has lack of scalability and network operating system fails to provide a single coherent view, therefore a new layer is formed between the distributed and network operating system is called the middleware operating system. It has a common set of CU IDOL SELF LEARNING MATERIAL (SLM)

Introduction to Distributed Systems 155 services is provided for the local applications and independent set of services for the remote applications. It support heterogeneity that is it supports multiple languages and operating system where user gets freedom to write the application using the any of the supported language under any platform. It provide the services such as locating the objects or interfaces by their names, finding the location of objects, maintaining the quality of services, handling the protocol information, synchronization, concurrency and security of the objects etc. Figure 4.19: Middleware Operating System 4.6 Middleware Middleware is the software that connects network-based requests generated by a client to the back-end data the client is requesting. It is a general term for software that serves to \"glue together\" separate, often complex and already existing programs. Middleware programs come in on-premises software and cloud services, and they can be used independently or together, depending upon the use case. While cloud providers bundle middleware into cloud services suites, such as middleware as a service (MWaaS) or integration PaaS (iPaaS), industry researchers note that many businesses still choose independent middleware products that fit their specific needs. CU IDOL SELF LEARNING MATERIAL (SLM)

156 Parallel and Distributed Computing Why is it Called Middleware? With network-based interactions, a client, or requesting program, can make a request. That client is typically an application that resides on the front end, which is where the user interacts with software. Resources such as databases, message queues, NoSQL data stores and file servers are often referred to as being part of the back end. The name middleware stems from the fact that it is the software that sits between the client- side request on the front end and the back-end resource being requested. How Middleware Works All network-based requests are essentially attempts to interact with back-end data. That data might be something as simple as an image to display or a video to play, or it could be as complex as a history of banking transactions. The requested data can take on many different forms and may be stored in a variety of ways, such as coming from a file server, fetched from a message queue or persisted in a database. The role of middleware is to enable and ease access to those back-end resources. Why use Middleware? Middleware serves a variety of functions. First, it manages connectivity to various back-end resources. So, a middleware component might create a connection pool to provide fast and efficient access to a popular back-end database. It might also create connections to message queues and topics. A piece of middleware software might also manage connections to cloud- based resources, like the Amazon Simple Storage Service (S3). Second, middleware software has the capacity to implement logic based upon the request made from the client. For example, a middleware component might recognize that a client browser making a given request has the language header set to English, and, as a result, the queries it makes to the back end might be tweaked to return nothing but English-based results. Or, perhaps a server could identify the geographical location of the client making the request based on the IP address of the client and return data to the client that prioritizes results that are geographically close. The ability to take a request from the user, perform logic and then customize the results is an important job performed by middleware software. CU IDOL SELF LEARNING MATERIAL (SLM)

Introduction to Distributed Systems 157 Third, middleware plays an important role in concurrent processing, load balancing and even transaction management. Middleware software typically has the capacity to scale vertically and horizontally to help distribute incoming client requests over multiple servers, virtual machines or availability zones of the cloud. Middleware software can also deal with concurrency and transaction management issues, such as dealing with problems that may arise when two or more clients attempt to access or update a given back-end resource at the same time. Finally, middleware plays the important role of securing access to back-end resources. Middleware software has the ability to challenge clients, and it requires both a secure connection using a technology like SSL and an authentication using either a username and password combination, or even a digital certificate. This security information is then used to check if the user making the request has rights to access the data in question. If the rights are affirmed, the data is sent from the middleware server to the client using a secure and encrypted connection. Middleware Categories In general, IT industry analysts – such as Gartner Inc. and Forrester Research – put middleware into two categories: enterprise integration middleware and platform middleware.  Enterprise application integration middleware enables programmers to create business applications without having to custom-craft integrations for each new application. Here, middleware helps software and services components work together, providing a layer of functionality for data consistency and multi-enterprise or B2B integration. Typically, integration middleware provides messaging services, so different applications can communicate using messaging frameworks like Simple Object Access Protocol (SOAP), web services, Representational State Transfer (REST) or JavaScript Object Notation (JSON). Other middleware technologies used in this category include Object Request Brokers (ORBs), data representation technologies like XML and JavaScript Object Notation (JSON), and more. Businesses can purchase individual middleware products or on-premises or cloud-based application integration suites. CU IDOL SELF LEARNING MATERIAL (SLM)

158 Parallel and Distributed Computing  Platform middleware supports software development and delivery by providing a runtime hosting environment, such as a container, for application program logic. Its primary components are in-memory and enterprise application servers, as well as web servers and content management. Middleware includes web servers, application servers, content management systems and similar tools that support application development and delivery. Generally, embedded or external communications middleware allows different communications tools to work together. These communications tools enable application and service interaction. Resource management services, such as Microsoft Azure Resource Manager, host application program logic at runtime, another key function in platform middleware. Other components include Trusted Platform Modules (TPMs) and in-memory data grids (IMDGs). Platform middleware products are also available as specific on-premises or cloud service tools, as well as multitool suites. On a cloud suite site, middleware as a service offers an integrated set of platform tools and the runtime environment. Types of Middleware There are many examples of middleware, each created to fulfill specific functions in connecting applications and web and cloud services together. Here are some of the most widely used types of middleware.  Messaging middleware facilitates communications between distributed applications and services.  Object or ORB middleware enables software components or objects to communicate and interact with a programs, such as containers, across distributed systems.  Remote Procedure Call (RPC) middleware provides a protocol that allows a program to request a service from another program located on another computer or network.  Data or database middleware enables direct access to, and interaction with, databases; it typically includes SQL database software.  Transaction or transactional middleware ensures transactions move from one phase to the next via transaction process monitoring. CU IDOL SELF LEARNING MATERIAL (SLM)

Introduction to Distributed Systems 159  Content-centric middleware allows client-side requests for specific content and abstracts and delivers it; it's similar to publish/subscribe middleware like Apache Kafka.  Embedded middleware facilitates communication and integration between embedded apps and real-time operating systems. The Evolution of Middleware From 2000 and until approximately 2010, middleware software was synonymous with the concept of an application server. However, as cloud computing increases in popularity and microservices replace more monolithic SOA-based systems, middleware is changing. 4.7 Models of Middleware The first middle ware model has started with the distributed file system, where the files were stored and distributed over the network. Models of middle ware are as follows: Remote Procedure Call It is one of the successful middle ware models used in modern distributed applications for communication. It uses local call to call a procedure resides on the remote machine to get the result. Hidden communication is done between client and server. For e.g. If a user wants to get the sum of two numbers stored on remote server by using local method call, the user calls method with parameters, in turn server receives a RPC call from the client and returns the appropriate result to the client. Therefore, though the method was executed remotely it appears like a local to the called machine. This is a synchronous technology where both the client and server should be present during the communication. CU IDOL SELF LEARNING MATERIAL (SLM)

160 Parallel and Distributed Computing Message Oriented Middleware (MOM)  It is another model used to send and receive the communication messages between clients and servers.  It uses data structures like queue to store and retrieve messages.  When the client is sending the messages faster than the receiver receiving it or the client is sending the message when the receiver is not available. So it uses queuing mechanism between the client and server to avoid the message been misplaced.  It is asynchronous mechanism where messages can be sent even though the receiver is not available.  For e.g., Email system. Distributed Object Technology The distributed object technology has changed the scope of middleware technologies to one step up where objects are distributed to the remote server to facilitate the client. E.g., RMI and CORBA The distributed object mechanism hides the communication interfaces and their details to provide access to the remote object efficiently. Remote Method Invocation In this objects are distributed and located by using the RMI registry. The client can access remote objects by using the interfaces. Disadvantage  It didnt support the concept of hetrogeneity and is compatible with java platform only. Common object request broker architecture (CORBA).  It is one of the most popular distributed object technologies where objects can be accessible from remote location through ORB.  Server and client communicate with each other through object request broker bus. CU IDOL SELF LEARNING MATERIAL (SLM)

Introduction to Distributed Systems 161  To map the semantics of objects and fetch the appropriate object an interface definition language is used.  It is evolved with service based middle ware where service models are used.  In service model, the services are published by the service providers and consumed by the service consumer.  E.g., Service oriented Architecture (SOA). 4.8 Services Offered by Middleware Middleware in the context of distributed applications is software that provides services beyond those provided by the operating system to enable the various components of a distributed system to communicate and manage data. Middleware supports and simplifies complex distributed applications. It includes web servers, application servers, messaging and similar tools that support application development and delivery. Middleware is especially integral to modern information technology based on XML, SOAP, Web services, and service-oriented architecture. Middleware often enables interoperability between applications that run on different operating systems, by supplying services so the application can exchange data in a standards- based way. Middleware sits \"in the middle\" between application software that may be working on different operating systems. It is similar to the middle layer of a three-tier single system architecture, except that it is stretched across multiple systems or applications. Examples include EAI software, telecommunications software, transaction monitors, and messaging-and-queueing software. The distinction between operating system and middleware functionality is, to some extent, arbitrary. While core kernel functionality can only be provided by the operating system itself, some functionality previously provided by separately sold middleware is now integrated in operating systems. A typical example is the TCP/IP stack for telecommunications, nowadays included in virtually every operating system. CU IDOL SELF LEARNING MATERIAL (SLM)

162 Parallel and Distributed Computing Middleware services provide a more functional set of application programming interfaces to allow an application to:  Locate transparently across the network, thus providing interaction with another service or application.  Filter data to make them friendly usable or public via anonymization process for privacy protection (for example).  Be independent from network services.  Be reliable and always available.  Add complementary attributes like semantics. 4.9 Client-Server Model The Client-server model is a distributed application structure that partitions task or workload between the providers of a resource or service, called servers, and service requesters called clients. In the client-server architecture, when the client computer sends a request for data to the server through the internet, the server accepts the requested process and deliver the data packets requested back to the client. Clients do not share any of their resources. Examples of Client- Server Model are Email, World Wide Web, etc. How the Client-Server Model Works? In this article we are going to take a dive into the Client-Server model and have a look at how the Internet works via, web browsers. This article will help us in having a solid foundation of the WEB and help in working with WEB technologies with ease.  Client: When we talk the word Client, it mean to talk of a person or an organization using a particular service. Similarly in the digital world a Client is a computer (Host) i.e. capable of receiving information or using a particular service from the service providers (Servers). CU IDOL SELF LEARNING MATERIAL (SLM)

Introduction to Distributed Systems 163  Servers: Similarly, when we talk the word Servers, It mean a person or medium that serves something. Similarly in this digital world a Server is a remote computer which provides information (data) or access to particular services. So, its basically the Client requesting something and the Server serving it as long as its present in the database. Figure 4.20: Client-Server Model How the Browser Interacts with the Servers? There are few steps to follow to interacts with the servers a client.  User enters the URL (Uniform Resource Locator) of the website or file. The Browser then requests the DNS (DOMAIN NAME SYSTEM) Server.  DNS Server lookup for the address of the WEB Server.  DNS Server responds with the IP address of the WEB Server.  Browser sends over an HTTP/HTTPS request to WEB Server’s IP (provided by DNS server).  Server sends over the necessary files of the website.  Browser then renders the files and the website is displayed. This rendering is done with the help of DOM (Document Object Model) interpreter, CSS interpreter and JS Engine collectively known as the JIT or (Just in Time) Compilers. CU IDOL SELF LEARNING MATERIAL (SLM)

164 Parallel and Distributed Computing Advantages of Client-Server Model:  Cost efficient requires less maintenance cost and Data recovery is possible.  The capacity of the Client and Servers can be changed separately.  Centralized: Centralized back-up is possible in client-server networks, i.e., all the data is stored in a server.  Security: These networks are more secure as all the shared resources are centrally administered.  Performance: The use of the dedicated server increases the speed of sharing resources. This increases the performance of the overall system.  Scalability: We can increase the number of clients and servers separately, i.e., the new element can be added, or we can add a new node in a network at any time. Disadvantages of Client-Server Model:  Clients are prone to viruses, Trojans and worms if present in the Server or uploaded into the Server.  Server are prone to Denial of Service (DOS) attacks.  Data packets may be spoofed or modified during transmission.  Phishing or capturing login credentials or other useful information of the user are common and MITM (Man in the Middle) attacks are common. 4.10 Summary A distributed system is a system whose components are located on different networked computers, which communicate and coordinate their actions by passing messages to one another. The components interact with one another in order to achieve a common goal. The nodes in the distributed systems can be arranged in the form of client/server systems or peer to peer systems. Details about these are as follows: CU IDOL SELF LEARNING MATERIAL (SLM)

Introduction to Distributed Systems 165 Client/Server Systems In client server systems, the client requests a resource and the server provides that resource. A server may serve multiple clients at the same time while a client is in contact with only one server. Both the client and server usually communicate via a computer network and so they are a part of distributed systems. Peer to Peer Systems The peer to peer systems contains nodes that are equal participants in data sharing. All the tasks are equally divided between all the nodes. The nodes interact with each other as required as share resources. This is done with the help of a network. All distributed systems consist of multiple CPUs. There are several different ways the hardware can be arranged. The important thing related to hardware is that how they are interconnected and how they communicate with each other. It is important to take a deep look at distributed system hardware, in particular, how the machines are connected together and how they interact. 4.11 Key Words/Abbreviations  Access: Hides the way in which resources are accessed and the differences in data platform.  Location: Hides where resources are located.  Technology: Hides different technologies such as programming language and OS from user.  Migration/Relocation: Hide resources that may be moved to another location which are in use.  Replication: Hide resources that may be copied at several location.  Concurrency: Hide resources that may be shared with other users.  Failure Hides: failure and recovery of resources from user.  Persistence: Hides whether a resource (software) is in memory or disk. CU IDOL SELF LEARNING MATERIAL (SLM)

166 Parallel and Distributed Computing 4.12 Learning Activity 1. What is meant by distributed systems? ----------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------- 2. How do distributed systems work? ----------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------- 3. What is distributed system explain with example? ----------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------- 4.13 Unit End Questions (MCQ and Descriptive) A. Descriptive Type Questions 1. Define Distributed System? 2. List The Characteristics Of Distributed System? 3. Mention The Examples Of Distributed System? 4. What Is Mobile And Ubiquitous Computing? 5. Mention The Challenges In Distributed System? 6. What Are The Advantages Of Distributed Systems? 7. What Are The Disadvantages Of Disadvantages Of Distributed Systems? 8. Write The Difference Between Mobile And Ubiquitous Computing? 9. Why We Need Openness? 10. What Is The Security Mechanisms Used In Distributed Computing? 11. How We Provide A Security? 12. Define Scalability? CU IDOL SELF LEARNING MATERIAL (SLM)

Introduction to Distributed Systems 167 13. What Are The Different Types Of System Model? 14. What Is The Use Of Middleware? 15. Define Protocol? 16. What Is Meant By Internet Protocol? 17. Define Mobile Ip? 18. What Is The Architectural Model? 19. What Is The Fundamental Model? 20. Write About The Parts Available In Routing Algorithm? 21. What Is Meant By Inter Process Communication? 22. What Is The Difference Between RMI and RPC? 23. Define Datagram? 24. What Is The Use Of UDP? 25. What Is Meant By Client Server Communication? 26. What Is Meant By Group Communication? 27. What Is The Use Of RMI Registry? 28. Difference Between Synchronous And Asynchronous Communication? 29. What Is Marshalling And Unmarshalling? 30. What Is CDR? 31. Define XML? 32. Define Operating System? 33. List The Core Os Components With Diagram? 34. How Kernel Uses The Address Space? 35. What Is System Call Trap? How It Is Implemented? 36. What Is Execution Environment? What It Contains? 37. List The Two Types Of Thread Scheduling? Explain? CU IDOL SELF LEARNING MATERIAL (SLM)

168 Parallel and Distributed Computing 38. List The Types Of Event That The Kernel Notified To The User Level Scheduler? 39. Difference Between Monolithic And Micro Kernel? 40. Write A Note On LRPC With Diagram? 41. What Is The Goal Of Security? List The Three Broad Classes Of Security Threats? 42. What Are The Two Measures Taken By JVM To Protect The Local Environment? 43. What Is Cryptography? What Is The Use Of It? 44. Write A Note On Digital Signature? 45. What Are Credentials? 46. Write A Note On X.500 Directory Service? 47. What Is Name Space? 48. What Is The Use Of Iterative Navigation? 49. Define Multicast Navigation? 50. Write Short Notes On Directory Services? 51. What Is Clock Skew And Clock Drift? 52. What Are The Two Modes Of Synchronization? Write Their Format? 53. How The Clock Synchronization Done In Christian’s Method? 54. List The Design Aims And Features Of Ntp? 55. With Example Explain About Happened-before Relation? 56. Write The Rules For Updating The Clocks? 57. What Are The Issues Resolved By Berkeley’s Algorithm? 58. What Is Network Partition? 59. Difference Between Reliable And Unreliable Failure Detector? 60. Define Election Algorithm? Mention The Different Algorithm? 61. Define Multicast Communication? 62. List The Requirements Of Consensus Algorithm To Hold For Execution? CU IDOL SELF LEARNING MATERIAL (SLM)

Introduction to Distributed Systems 169 63. Write A Note On Bully Algorithm? 64. What Is Distributed Debugging? B. Multiple Choice/Objective Type Questions 1. In distributed system, each processor has its own ____________. (a) local memory (b) clock (c) both local memory and clock (d) none of the mentioned 2. If one site fails in distributed system then ____________. (a) the remaining sites can continue operating (b) all the sites will stop working (c) directly connected sites will stop workin (d) none of the mentioned 3. Network operating system runs on ____________. (a) server (b) every system in the network (c) both server and every system in the network (d) none of the mentioned 4. Which technique is based on compile-time program transformation for accessing remote data in a distributed-memory parallel system? (a) cache coherence scheme (b) computation migration (c) remote procedure call (d) message passing 5. Logical extension of computation migration is ____________. (a) process migration (b) system migration (c) thread migration (d) data migration CU IDOL SELF LEARNING MATERIAL (SLM)

170 Parallel and Distributed Computing 6. Processes on the remote systems are identified by ____________. (a) host ID (b) host name and identifier (c) identifier (d) process ID 7. Which routing technique is used in a distributed system? (a) fixed routing (b) virtual routing (c) dynamic routing (d) all of the mentioned 8. In distributed systems, link and site failure is detected by ____________. (a) polling (b) handshaking (c) token passing (d) none of the mentioned 9. The capability of a system to adapt the increased service load is called ____________. (a) scalability (b) tolerance (c) capacity (d) none of the mentioned 10. Internet provides ____________ for remote login. (a) telnet (b) http (c) ftp (d) rpc Answers 1. (c), 2. (a), 3. (a), 4. (b), 5. (a), 6. (b), 7. (d), 8. (b), 9. (a), 10. (a) 5.14 References References of this unit have been given at the end of the book. CU IDOL SELF LEARNING MATERIAL (SLM)

Communication 171 UNIT 5 COMMUNICATION Structure: 5.0 Learning Objectives 5.1 Introduction 5.2 Layered Protocols 5.3 Remote Procedure Call 5.4 RMI (Remote Method Invocation) 5.5 Message Oriented Communication 5.6 Stream Oriented Communication 5.7 Summary 5.8 Key Words/Abbreviations 5.9 Learning Activity 5.10 Unit End Questions (MCQ and Descriptive) 5.11 References CU IDOL SELF LEARNING MATERIAL (SLM)

172 Parallel and Distributed Computing 5.0 Learning Objectives After studying this unit, you will be able to:  Describe layered protocols  Elaborate remote procedure call  Able to discuss Remote Object Invocation  Explain message oriented communication  Describe stream oriented communication 5.1 Introduction ll (RPC) is a protocol that one program can use to request a service from a program located in another computer on a network without having to understand the network's details. A procedure call is also sometimes known as a function call or a subroutine call. RPC uses the client-server model. The requesting program is a client and the service providing program is the server. Like a regular or local procedure call, an RPC is a synchronous operation requiring the requesting program to be suspended until the results of the remote procedure are returned. However, the use of lightweight processes or threads that share the same address space allows multiple RPCs to be performed concurrently. 5.2 Layered Protocols Network Protocols are a set of rules governing exchange of information in an easy, reliable and secure way. Before we discuss the most common protocols used to transmit and receive data over a network, we need to understand how a network is logically organized or designed. The most popular model used to establish open communication between two systems is the Open Systems Interface (OSI) model proposed by ISO. CU IDOL SELF LEARNING MATERIAL (SLM)

Communication 173 OSI Model  OSI stands for Open System Interconnection is a reference model that describes how information from a software application in one computer moves through a physical medium to the software application in another computer.  OSI consists of seven layers, and each layer performs a particular network function.  OSI model was developed by the International Organization for Standardization (ISO) in 1984, and it is now considered as an architectural model for the inter-computer communications.  OSI model divides the whole task into seven smaller and manageable tasks. Each layer is assigned a particular task.  Each layer is self-contained, so that task assigned to each layer can be performed independently. Characteristics of OSI Model: Figure 5.1: Characteristics of OSI Model  The OSI model is divided into two layers: upper layers and lower layers.  The upper layer of the OSI model mainly deals with the application related issues, and they are implemented only in the software. The application layer is closest to the end user. Both the end user and the application layer interact with the software applications. An upper layer refers to the layer just above another layer. CU IDOL SELF LEARNING MATERIAL (SLM)

174 Parallel and Distributed Computing  The lower layer of the OSI model deals with the data transport issues. The data link layer and the physical layer are implemented in hardware and software. The physical layer is the lowest layer of the OSI model and is closest to the physical medium. The physical layer is mainly responsible for placing the information on the physical medium. Functions of the OSI Layers There are the seven OSI layers. Each layer has different functions. A list of seven layers are given below: 1. Physical Layer 2. Data-Link Layer 3. Network Layer 4. Transport Layer 5. Session Layer 6. Presentation Layer 7. Application Layer Figure 5.2: Functions of OSI Model CU IDOL SELF LEARNING MATERIAL (SLM)

Communication 175 Physical Layer Figure 5.3: Functions of Physical Layer  The main functionality of the physical layer is to transmit the individual bits from one node to another node.  It is the lowest layer of the OSI model.  It establishes, maintains and deactivates the physical connection.  It specifies the mechanical, electrical and procedural network interface specifications. Functions of a Physical Layer:  Line Configuration: It defines the way how two or more devices can be connected physically.  Data Transmission: It defines the transmission mode whether it is simplex, half-duplex or full-duplex mode between the two devices on the network.  Topology: It defines the way how network devices are arranged.  Signals: It determines the type of the signal used for transmitting the information. CU IDOL SELF LEARNING MATERIAL (SLM)

176 Parallel and Distributed Computing Data-Link Layer Figure 5.4: Functions of Data-Link Layer  This layer is responsible for the error-free transfer of data frames.  It defines the format of the data on the network.  It provides a reliable and efficient communication between two or more devices.  It is mainly responsible for the unique identification of each device that resides on a local network.  It contains two sub-layers: (i) Logical Link Control Layer – It is responsible for transferring the packets to the Network layer of the receiver that is receiving. – It identifies the address of the network layer protocol from the header. – It also provides flow control. CU IDOL SELF LEARNING MATERIAL (SLM)

Communication 177 (ii) Media Access Control Layer – A Media access control layer is a link between the Logical Link Control layer and the network’s physical layer. – It is used for transferring the packets over the network. Functions of the Data-link Layer  Framing: The data link layer translates the physical's raw bit stream into packets known as Frames. The Data link layer adds the header and trailer to the frame. The header which is added to the frame contains the hardware destination and source address. Header Packet Trailer  Physical Addressing: The Data link layer adds a header to the frame that contains a destination address. The frame is transmitted to the destination address mentioned in the header.  Flow Control: Flow control is the main functionality of the Data-link layer. It is the technique through which the constant data rate is maintained on both the sides so that no data get corrupted. It ensures that the transmitting station such as a server with higher processing speed does not exceed the receiving station, with lower processing speed.  Error Control: Error control is achieved by adding a calculated value CRC (Cyclic Redundancy Check) that is placed to the Data link layer's trailer which is added to the message frame before it is sent to the physical layer. If any error seems to occurr, then the receiver sends the acknowledgment for the retransmission of the corrupted frames.  Access Control: When two or more devices are connected to the same communication channel, then the data link layer protocols are used to determine which device has control over the link at a given time. CU IDOL SELF LEARNING MATERIAL (SLM)

178 Parallel and Distributed Computing Network Layer Figure 5.5: Functions of Network Layer  It is a layer 3 that manages device addressing, tracks the location of devices on the network.  It determines the best path to move data from source to the destination based on the network conditions, the priority of service, and other factors.  The Data link layer is responsible for routing and forwarding the packets.  Routers are the layer 3 devices, they are specified in this layer and used to provide the routing services within an internetwork.  The protocols used to route the network traffic are known as Network layer protocols. Examples of protocols are IP and Ipv6. Functions of Network Layer  Internetworking: An internetworking is the main responsibility of the network layer. It provides a logical connection between different devices.  Addressing: A Network layer adds the source and destination address to the header of the frame. Addressing is used to identify the device on the internet. CU IDOL SELF LEARNING MATERIAL (SLM)

Communication 179  Routing: Routing is the major component of the network layer, and it determines the best optimal path out of the multiple paths from source to the destination.  Packetizing: A Network Layer receives the packets from the upper layer and converts them into packets. This process is known as Packetizing. It is achieved by internet protocol (IP). Transport Layer Figure 5.6: Functions of Transport Layer  The Transport layer is a Layer 4 ensures that messages are transmitted in the order in which they are sent and there is no duplication of data.  The main responsibility of the transport layer is to transfer the data completely.  It receives the data from the upper layer and converts them into smaller units known as segments.  This layer can be termed as an end-to-end layer as it provides a point-to-point connection between source and destination to deliver the data reliably. CU IDOL SELF LEARNING MATERIAL (SLM)

180 Parallel and Distributed Computing The Two Protocols used in this Layer are:  Transmission Control Protocol – It is a standard protocol that allows the systems to communicate over the internet. – It establishes and maintains a connection between hosts. – When data is sent over the TCP connection, then the TCP protocol divides the data into smaller units known as segments. Each segment travels over the internet using multiple routes, and they arrive in different orders at the destination. The transmission control protocol reorders the packets in the correct order at the receiving end.  User Datagram Protocol – User Datagram Protocol is a transport layer protocol. – It is an unreliable transport protocol as in this case receiver does not send any acknowledgment when the packet is received, the sender does not wait for any acknowledgment. Therefore, this makes a protocol unreliable. Functions of Transport Layer  Service-point addressing: Computers run several programs simultaneously due to this reason, the transmission of data from source to the destination not only from one computer to another computer but also from one process to another process. The transport layer adds the header that contains the address known as a service-point address or port address. The responsibility of the network layer is to transmit the data from one computer to another computer and the responsibility of the transport layer is to transmit the message to the correct process.  Segmentation and reassembly: When the transport layer receives the message from the upper layer, it divides the message into multiple segments, and each segment is assigned with a sequence number that uniquely identifies each segment. When the message has arrived at the destination, then the transport layer reassembles the message based on their sequence numbers. CU IDOL SELF LEARNING MATERIAL (SLM)

Communication 181  Connection control: Transport layer provides two services Connection-oriented service and connectionless service. A connectionless service treats each segment as an individual packet, and they all travel in different routes to reach the destination. A connection- oriented service makes a connection with the transport layer at the destination machine before delivering the packets. In connection-oriented service, all the packets travel in the single route.  Flow control: The transport layer also responsible for flow control but it is performed end-to-end rather than across a single link.  Error control: The transport layer is also responsible for Error control. Error control is performed end-to-end rather than across the single link. The sender transport layer ensures that message reach at the destination without any error. Session Layer Figure 5.7: Functions of Session Layer  It is a layer 3 in the OSI model.  The Session layer is used to establish, maintain and synchronizes the interaction between communicating devices. CU IDOL SELF LEARNING MATERIAL (SLM)

182 Parallel and Distributed Computing Functions of Session Layer:  Dialog control: Session layer acts as a dialog controller that creates a dialog between two processes or we can say that it allows the communication between two processes which can be either half-duplex or full-duplex.  Synchronization: Session layer adds some checkpoints when transmitting the data in a sequence. If some error occurs in the middle of the transmission of data, then the transmission will take place again from the checkpoint. This process is known as Synchronization and recovery. Presentation Layer Figure 5.8: Functions of Presentation Layer  A Presentation layer is mainly concerned with the syntax and semantics of the information exchanged between the two systems.  It acts as a data translator for a network.  This layer is a part of the operating system that converts the data from one presentation format to another format.  The Presentation layer is also known as the syntax layer. CU IDOL SELF LEARNING MATERIAL (SLM)

Communication 183 Functions of Presentation Layer  Translation: The processes in two systems exchange the information in the form of character strings, numbers and so on. Different computers use different encoding methods, the presentation layer handles the interoperability between the different encoding methods. It converts the data from sender-dependent format into a common format and changes the common format into receiver-dependent format at the receiving end.  Encryption: Encryption is needed to maintain privacy. Encryption is a process of converting the sender-transmitted information into another form and sends the resulting message over the network.  Compression: Data compression is a process of compressing the data, i.e., it reduces the number of bits to be transmitted. Data compression is very important in multimedia such as text, audio, video. Application Layer Figure 5.9: Functions of Application Layer  An application layer serves as a window for users and application processes to access network service. CU IDOL SELF LEARNING MATERIAL (SLM)

184 Parallel and Distributed Computing  It handles issues such as network transparency, resource allocation, etc.  An application layer is not an application, but it performs the application layer functions.  This layer provides the network services to the end-users. Functions of Application Layer:  File transfer, access, and management (FTAM): An application layer allows a user to access the files in a remote computer, to retrieve the files from a computer and to manage the files in a remote computer.  Mail services: An application layer provides the facility for email forwarding and storage.  Directory services: An application provides the distributed database sources and is used to provide that global information about various objects. CP/IP Model  The TCP/IP model was developed prior to the OSI model.  The TCP/IP model is not exactly similar to the OSI model.  The TCP/IP model consists of five layers: the application layer, transport layer, network layer, data link layer and physical layer.  The first four layers provide physical standards, network interface, internetworking, and transport functions that correspond to the first four layers of the OSI model and these four layers are represented in TCP/IP model by a single layer called the application layer.  TCP/IP is a hierarchical protocol made up of interactive modules, and each of them provides specific functionality. Here, hierarchical means that each upper-layer protocol is supported by two or more lower- level protocols. CU IDOL SELF LEARNING MATERIAL (SLM)

Communication 185 Functions of TCP/IP Layers: Figure 5.10: Functions of TCP/IP Layers Network Access Layer  A network layer is the lowest layer of the TCP/IP model.  A network layer is the combination of the Physical layer and Data Link layer defined in the OSI reference model.  It defines how the data should be sent physically through the network.  This layer is mainly responsible for the transmission of the data between two devices on the same network.  The functions carried out by this layer are encapsulating the IP datagram into frames transmitted by the network and mapping of IP addresses into physical addresses.  The protocols used by this layer are ethernet, token ring, FDDI, X.25, frame relay. Internet Layer  An internet layer is the second layer of the TCP/IP model.  An internet layer is also known as the network layer.  The main responsibility of the internet layer is to send the packets from any network, and they arrive at the destination irrespective of the route they take. CU IDOL SELF LEARNING MATERIAL (SLM)

186 Parallel and Distributed Computing Following are the protocols used in this layer are: IP Protocol: IP protocol is used in this layer, and it is the most significant part of the entire TCP/IP suite. Following are the responsibilities of this protocol:  IP Addressing: This protocol implements logical host addresses known as IP addresses. The IP addresses are used by the internet and higher layers to identify the device and to provide internetwork routing.  Host-to-host communication: It determines the path through which the data is to be transmitted.  Data Encapsulation and Formatting: An IP protocol accepts the data from the transport layer protocol. An IP protocol ensures that the data is sent and received securely, it encapsulates the data into message known as IP datagram.  Fragmentation and Reassembly: The limit imposed on the size of the IP datagram by data link layer protocol is known as Maximum Transmission unit (MTU). If the size of IP datagram is greater than the MTU unit, then the IP protocol splits the datagram into smaller units so that they can travel over the local network. Fragmentation can be done by the sender or intermediate router. At the receiver side, all the fragments are reassembled to form an original message.  Routing: When IP datagram is sent over the same local network such as LAN, MAN, WAN, it is known as direct delivery. When source and destination are on the distant network, then the IP datagram is sent indirectly. This can be accomplished by routing the IP datagram through various devices such as routers. ARP Protocol  ARP stands for Address Resolution Protocol.  ARP is a network layer protocol which is used to find the physical address from the IP address. CU IDOL SELF LEARNING MATERIAL (SLM)

Communication 187  The two terms are mainly associated with the ARP Protocol: – ARP request: When a sender wants to know the physical address of the device, it broadcasts the ARP request to the network. – ARP reply: Every device attached to the network will accept the ARP request and process the request, but only recipient recognize the IP address and sends back its physical address in the form of ARP reply. The recipient adds the physical address both to its cache memory and to the datagram header. ICMP Protocol  ICMP stands for Internet Control Message Protocol.  It is a mechanism used by the hosts or routers to send notifications regarding datagram problems back to the sender.  A datagram travels from router-to-router until it reaches its destination. If a router is unable to route the data because of some unusual conditions such as disabled links, a device is on fire or network congestion, then the ICMP protocol is used to inform the sender that the datagram is undeliverable.  An ICMP protocol mainly uses two terms: – ICMP Test: ICMP Test is used to test whether the destination is reachable or not. – ICMP Reply: ICMP Reply is used to check whether the destination device is responding or not.  The core responsibility of the ICMP protocol is to report the problems, not correct them. The responsibility of the correction lies with the sender.  ICMP can send the messages only to the source, but not to the intermediate routers because the IP datagram carries the addresses of the source and destination but not of the router that it is passed to. Transport Layer The transport layer is responsible for the reliability, flow control, and correction of data which is being sent over the network. CU IDOL SELF LEARNING MATERIAL (SLM)

188 Parallel and Distributed Computing The two protocols used in the transport layer are User Datagram protocol and Transmission control protocol. User Datagram Protocol (UDP)  It provides connectionless service and end-to-end delivery of transmission.  It is an unreliable protocol as it discovers the errors but not specify the error.  User Datagram Protocol discovers the error, and ICMP protocol reports the error to the sender that user datagram has been damaged. UDP consists of the following fields:  Source port address: The source port address is the address of the application program that has created the message.  Destination port address: The destination port address is the address of the application program that receives the message.  Total length: It defines the total number of bytes of the user datagram in bytes.  Checksum: The checksum is a 16-bit field used in error detection.  UDP does not specify which packet is lost. UDP contains only checksum; it does not contain any ID of a data segment. Figure 5.11: UDP CU IDOL SELF LEARNING MATERIAL (SLM)

Communication 189 Transmission Control Protocol (TCP)  It provides a full transport layer services to applications.  It creates a virtual circuit between the sender and receiver, and it is active for the duration of the transmission.  TCP is a reliable protocol as it detects the error and retransmits the damaged frames. Therefore, it ensures all the segments must be received and acknowledged before the transmission is considered to be completed and a virtual circuit is discarded.  At the sending end, TCP divides the whole message into smaller units known as segment, and each segment contains a sequence number which is required for reordering the frames to form an original message.  At the receiving end, TCP collects all the segments and reorders them based on sequence numbers. Application Layer  An application layer is the topmost layer in the TCP/IP model.  It is responsible for handling high-level protocols, issues of representation.  This layer allows the user to interact with the application.  When one application layer protocol wants to communicate with another application layer, it forwards its data to the transport layer.  There is an ambiguity occurs in the application layer. Every application cannot be placed inside the application layer except those who interact with the communication system. For example: text editor cannot be considered in application layer while web browser using HTTP protocol to interact with the network where HTTP protocol is an application layer protocol. Following are the main protocols used in the application layer:  HTTP: HTTP stands for Hypertext transfer protocol. This protocol allows us to access the data over the world wide web. It transfers the data in the form of plain text, audio, video. It is known as a Hypertext transfer protocol as it has the efficiency to use in a hypertext environment where there are rapid jumps from one document to another. CU IDOL SELF LEARNING MATERIAL (SLM)

190 Parallel and Distributed Computing  SNMP: SNMP stands for Simple Network Management Protocol. It is a framework used for managing the devices on the internet by using the TCP/IP protocol suite.  SMTP: SMTP stands for Simple mail transfer protocol. The TCP/IP protocol that supports the e-mail is known as a Simple mail transfer protocol. This protocol is used to send the data to another e-mail address.  DNS: DNS stands for Domain Name System. An IP address is used to identify the connection of a host to the internet uniquely. But, people prefer to use the names instead of addresses. Therefore, the system that maps the name to the address is known as Domain Name System.  TELNET: It is an abbreviation for Terminal Network. It establishes the connection between the local computer and remote computer in such a way that the local terminal appears to be a terminal at the remote system.  FTP: FTP stands for File Transfer Protocol. FTP is a standard internet protocol used for transmitting the files from one computer to another computer. 5.3 Remote Procedure Call RPC (Remote Procedure Call) helps in client communication with server. RPC is a process of calling a method from a class however, in this process only difference is that the class is located on a server but not actually the part of client program. There is a problem with RPC, as JavaScript runs in web browser and the RPC call from browser it hangs browser until the response is received. To avoid the browser hanging, GWT RPC call is made “Asynchronous” and the browser does not hang while waiting for the response. RPC Message Procedure When program statements that use RPC framework are compiled into an executable program, a stub is included in the compiled code that acts as the representative of the remote procedure code. When the program is run and the procedure call is issued, the stub receives the request and forwards it to a client runtime program in the local computer. CU IDOL SELF LEARNING MATERIAL (SLM)

Communication 191 The client runtime program has the knowledge of how to address the remote computer and server application and sends the message across the network that requests the remote procedure. Similarly, the server includes a runtime program and stub that interface with the remote procedure itself. Response-request protocols are returned the same way. RPC Models and Alternative Methods for Client-server Communication There are several RPC models and distributed computing implementations. A popular model and implementation is the Open Software Foundation's Distributed Computing Environment (DCE). The Institute of Electrical and Electronics Engineers defines RPC in its ISO Remote Procedure Call Specification, ISO/IEC CD 11578 N6561, ISO/IEC, November 1991. RPC spans the transport layer and the application layer in the Open Systems Interconnection model of network communication. RPC makes it easier to develop an application that includes multiple programs distributed in a network. 5.4 RMI (Remote Method Invocation) The RMI (Remote Method Invocation) is an API that provides a mechanism to create distributed application in java. The RMI allows an object to invoke methods on an object running in another JVM. The RMI provides remote communication between the applications using two objects stub and skeleton. Understanding Stub and Skeleton RMI uses stub and skeleton object for communication with the remote object. A remote object is an object whose method can be invoked from another JVM. Let's understand the stub and skeleton objects: stub The stub is an object, acts as a gateway for the client side. All the outgoing requests are routed through it. It resides at the client side and represents the remote object. When the caller invokes method on the stub object, it does the following tasks: CU IDOL SELF LEARNING MATERIAL (SLM)

192 Parallel and Distributed Computing 1. It initiates a connection with remote Virtual Machine (JVM), 2. It writes and transmits (marshals) the parameters to the remote Virtual Machine (JVM), 3. It waits for the result 4. It reads (unmarshals) the return value or exception, and 5. It finally, returns the value to the caller. skeleton The skeleton is an object, acts as a gateway for the server side object. All the incoming requests are routed through it. When the skeleton receives the incoming request, it does the following tasks: 1. It reads the parameter for the remote method 2. It invokes the method on the actual remote object, and 3. It writes and transmits (marshals) the result to the caller. In the Java 2 SDK, an stub protocol was introduced that eliminates the need for skeletons. Figure 5.12: Skeleton Understanding requirements for the distributed applications. CU IDOL SELF LEARNING MATERIAL (SLM)

Communication 193 If any application performs these tasks, it can be distributed application. 1. The application need to locate the remote method 2. It need to provide the communication with the remote objects, and 3. The application need to load the class definitions for the objects. The RMI application have all these features, so it is called the distributed application. Java RMI Example The is given the 6 steps to write the RMI program. 1. Create the remote interface 2. Provide the implementation of the remote interface 3. Compile the implementation class and create the stub and skeleton objects using the rmic tool 4. Start the registry service by rmiregistry tool 5. Create and start the remote application 6. Create and start the client application 5.5 Message Oriented Communication  Synchronous versus asynchronous communications  Message-Queuing System  Message Brokers  Example: IBM MQSeries Synchronous Communication Some observations: Client/Server computing is generally based on a model of synchronous communication:  Client and server have to be active at the time of communication  Client issues request and blocks until it receives reply CU IDOL SELF LEARNING MATERIAL (SLM)

194 Parallel and Distributed Computing  Server essentially waits only for incoming requests, and subsequently processes them Drawbacks of synchronous communication:  Client cannot do any other work while waiting for reply  Failures have to be dealt with immediately (the client is waiting)  In many cases the model is simply not appropriate (mail, news) Asynchronous Communication: Messaging Message-oriented middleware: Aims at high-level asynchronous communication:  Processes send each other messages, which are queued  Sender need not wait for immediate reply, but can do other things  Middleware often ensures fault tolerance. Figure 5.13: Communication/Message-Oriented Communication Persistent vs. Transient Communication Persistent communication: A message is stored at a communication server as long as it takes to deliver it at the receiver. Transient communication: A message is discarded by a communication server as soon as it cannot be delivered at the next server, or at the receiver. CU IDOL SELF LEARNING MATERIAL (SLM)

Communication 195 Messaging Combinations Figure 5.14: Communication/Message-Oriented Communication Message-Oriented Middleware Essence: Asynchronous persistent communication through support of middleware-level queues. Queues correspond to buffers at communication servers. Canonical example: IBM MQSeries 5.6 Stream Oriented Communication Stream-oriented Communication 1. Support for continuous media. 2. Streams in distributed systems 3. Stream management CU IDOL SELF LEARNING MATERIAL (SLM)


Like this book? You can publish your book online for free in a few minutes!
Create your own flipbook