Chapter 2 Communication PDF

Summary

This document provides an overview of communication concepts in distributed systems. It covers layered protocols, middleware protocols, remote procedure calls, and other relevant topics. The material appears to be part of a larger course or textbook.

Full Transcript

Chapter 2 Communication  Layer Protocols  Client-Server TCP  Middleware Protocols Outlines  Remote procedure call & remote object invocation  Message oriented and stream oriented communication  Quality of service ...

Chapter 2 Communication  Layer Protocols  Client-Server TCP  Middleware Protocols Outlines  Remote procedure call & remote object invocation  Message oriented and stream oriented communication  Quality of service  In a distributed system, layered protocols are a key design pattern used to organize and structure communication and functionality across the Layered system.  The general idea is to break down the complexities protocols of the system into discrete, manageable layers, where each layer is responsible for a specific set of tasks.  The layered protocol model under class of OSI (Open Systems Interconnection) or TCP/IP stacks. Here's a simplified breakdown using the TCP/IP model, which is commonly used in Internet-based distributed systems: Layered  Application Layer: HTTP, FTP, DNS, SMTP (Protocol for Protocols in email) Action  Transport Layer: TCP (for reliable communication) or UDP (for faster, but unreliable communication)  Internet Layer: IP (Internet Protocol for routing and addressing)  Link Layer: Ethernet (network interface for local data transfer)  Middleware protocols are standardized Middleware communication protocols that middleware uses to enable the exchange of data and requests protocols between distributed components, typically between clients and servers.  Remote Procedure Call (RPC) Protocols:RPC is one of the most common middleware protocols that allows a program (the client) to request a service or function from another program (the server) running on a remote machine, just like calling a Common Types local function. of Middleware  Message-Oriented Middleware (MOM):Middleware Protocols in that provides a unified interface to access and Client-Server manage data from multiple databases or data Systems sources.  Message-Oriented Middleware (MOM):Middleware that provides a unified interface to access and manage data from multiple databases or data sources.  Database Middleware:Middleware that provides a unified interface to access and manage data from multiple databases or data sources.  Object Middleware:Object middleware allows different software components, possibly running Common Types on different machines, to interact with each other of Middleware Protocols in using object-oriented principles. Clients and Client-Server servers can invoke methods on remote objects as Systems if they were local objects.  APIGateway Middleware:Middleware that acts as an intermediary between clients and microservices or APIs, handling tasks such as load balancing, security, and API request routing.  A client-server model using TCP (Transmission A client- Control Protocol) in a distributed system is a server common architecture where clients and servers communicate over a network to exchange data model using and perform operations.  Client: The client is typically the entity that initiates the connection and sends requests for services or resources. It is generally responsible for presenting the data to the user, handling user Key Concepts input, and processing results. of a Client-  Server: The server is the entity that provides a Server TCP service or resource to clients. It listens for incoming connections, processes client requests, Distributed and sends back responses. Servers are usually System more powerful in terms of hardware and are designed to handle multiple client connections concurrently.  TCP: TCP is a reliable, connection-oriented Key Concepts of transport layer protocol that ensures the safe a Client-Server delivery of data packets in the correct order. TCP TCP Distributed guarantees that data sent between client and server is delivered without errors, duplication, or System loss, and it handles retransmissions in case of failure.  The server creates a TCP socket and binds it to a specific port on a network interface.  It then listens for incoming client connections. How Client-  When a client attempts to connect, the server Server accepts the connection, creating a dedicated Communication socket for that client. Works Using  After accepting a connection, the server typically TCP handles multiple clients either sequentially (one at a time) or concurrently (using threads or asynchronous I/O).  Client Side:  The client also creates a TCP socket.  The client connects to the server’s IP address and port number. client  Once the connection is established, the client can send requests to the server and wait for the server's response.  When a process on machine A calls a procedure on machine B, the calling process on A is suspended, and execution of the called procedure takes place on B Remote  Information can be transported from the caller to procedure the called in the parameters and can come back in the procedure result. call  No message passing at all is visible to the programmer.  RPC is a protocol that allows a program (client) to execute a procedure (function or subroutine) on another machine (server) as if it were a local call, without the programmer needing to explicitly Cont… manage the network communication.  It is uses client-server model.  Also called function call  The client  The client stub (pice of code or parametres) Have five  The RPC runtime converting parametres elements  The server stub  The server  RMI is a Java-specific technology that allows a Java program to invoke methods on an object running in a different Java Virtual Machine (JVM), typically Remote on a remote machine. Method  Also called method call. Invocation  Is an API that provides a mechanism to create (RMI) distributed application in java  It is communication b/n the applications using two objects stub and skeleton(server) RMI system  Stub/server consists 3  Remote reference layer  Transport layers layers  UDP(user data gram protocol) uses message oriented communication.  Data is sent by application in discrate packages call message. Message  Communication is connction less ,data is sent oriented with out any setup. communicat  It is unreliable best effort delivery without acknowledgment. ion  Re transmission is not performed.  No flowcotrol  Very high transmission speed  RPC and RMI enhanced access transparency Message-  But client have to blocked until its request has Oriented been processed Communicatio  Message-Oriented Communication can solve this n problem by ‘messaging’  TCP(transimission control protocol)uses stream oriented communication.  Data is sent by with no particular structure. Stream  Communication is oriented connection established before communicate. oriented  It is reliable, data acknowledged. communicat  Lost data is reframe automatically. ion  Flow control using sent protocol like sliding.  Low speed communication.  Quality of service (QoS) refers to any technology that quality of manages data traffic to reduce packet loss, latency and service (QoS) jitter on a network.  QoS controls and manages network resources by setting priorities for specific types of data on the network. Packet loss. This happens when network links become congested and routers and switches start dropping packets. QoS Jitter. This is the result of network congestion, timing drift and route changes. Too much jitter can degrade the parameters quality of voice and video communication. Latency. This is the time it takes a packet to travel from its source to its destination. Bandwidth. This is the capacity of a network communications link to transmit the maximum amount of data from one point to another in a given amount of time.  Without QoS, network data can become disorganized, Why is QoS clogging networks to the point where performance important? degrades or, in certain cases, the network shuts down completely.  QoS is important because enterprises need to provide stable services for employees and customers to use. Link efficiency. These tools maximize bandwidth use and reduce delay for packets accessing the network. Shaping. These tools manipulate traffic flowing into the QoS network and prioritize real-time applications over less time-sensitive applications, such as email and messaging. mechanisms Congestion avoidance. These tools monitor network traffic for congestion and drop low-priority packets when congestion occurs. Classification and marking. These tools differentiate between applications and sort packets into different traffic types.

Use Quizgecko on...
Browser
Browser