Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
2 views

Distributed Computing

Distributed computing involves multiple devices or systems that share processing and data storage, allowing for scalability, reliability, and flexibility. Key components include devices, networks, and resource management, with architectures often utilizing peer-to-peer models. The document also covers client-server models, remote procedure calls, remote object invocation, and message-oriented communication, highlighting their characteristics and real-life applications.

Uploaded by

saniyadhami2006
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Distributed Computing

Distributed computing involves multiple devices or systems that share processing and data storage, allowing for scalability, reliability, and flexibility. Key components include devices, networks, and resource management, with architectures often utilizing peer-to-peer models. The document also covers client-server models, remote procedure calls, remote object invocation, and message-oriented communication, highlighting their characteristics and real-life applications.

Uploaded by

saniyadhami2006
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 19

Distributed Computing

• Distributed computing refers to a system where processing and data storage is


distributed across multiple devices or systems, rather than being handled by a single
central device.

• In a distributed system, each device or system has its own processing capabilities and
may also store and manage its own data.

• These devices or systems work together to perform tasks and share resources, with no
single device serving as the central hub.

• One example of a distributed computing system is a cloud computing system, where


resources such as computing power, storage, and networking are delivered over the
Internet and accessed on demand.

• In this type of system, users can access and use shared resources through a web
browser or other client software.
Components
There are several key components of a Distributed Computing System:

• Devices or Systems: The devices or systems in a distributed system have their


own processing capabilities and may also store and manage their own data.

• Network: The network connects the devices or systems in the distributed system,
allowing them to communicate and exchange data.

• Resource Management: Distributed systems often have some type of resource


management system in place to allocate and manage shared resources such as
computing power, storage, and networking.

The architecture of a Distributed Computing System is typically a Peer-to-Peer


Architecture, where devices or systems can act as both clients and servers and
communicate directly with each other.
Characteristics
There are several characteristics that define a Distributed Computing System:

• Multiple Devices or Systems: Processing and data storage is distributed across multiple
devices or systems.

• Peer-to-Peer Architecture: Devices or systems in a distributed system can act as both clients
and servers, as they can both request and provide services to other devices or systems in the
network.

• Shared Resources: Resources such as computing power, storage, and networking are shared
among the devices or systems in the network.

• Vertical / Horizontal Scaling: Scaling a distributed computing system typically involves adding
more devices or systems to the network to increase processing and storage capacity. This can be
done through hardware upgrades or by adding additional devices or systems to the network.
Advantages of Distributed Computing
• Scalability: Distributed systems are generally more scalable than centralized
systems, as they can easily add new devices or systems to the network to increase
processing and storage capacity.

• Reliability: Distributed systems are often more reliable than centralized systems, as
they can continue to operate even if one device or system fails.

• Flexibility: Distributed systems are generally more flexible than centralized systems,
as they can be configured and reconfigured more easily to meet changing computing
needs.
Disadvantages of Distributed Computing
• Complexity: Distributed systems can be more complex than centralized systems, as
they involve multiple devices or systems that need to be coordinated and managed.

• Security: It can be more challenging to secure a distributed system, as security


measures must be implemented on each device or system to ensure the security of
the entire system.

• Performance: Distributed systems may not offer the same level of performance as
centralized systems, as processing and data storage is distributed across multiple
devices or systems.
Client-Server Model

• The Client-server model is a distributed application structure that partitions tasks or


workloads 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 delivers
the data packets requested back to the client. Clients do not share any of their
resources.

• Examples of the Client-Server Model are Email, World Wide Web, etc.
How does the Client-Server Model Works?
• Client: a Client is a computer (Host) i.e. capable of receiving information or
using a particular service from the service providers (Servers).

• Server: A Server is a remote computer that provides information (data) or


access to particular services.
How the Browser Interacts with the Server?
• User enters the URL of the website or file. The Browser the requests the DNS (Domain Name System)
Server.

• DNS Server looks up for the address of the Web Server.

• The DNS server responds with the IP Address of the Web Server.

• The Browser sends over an HTTP/HTTPS request to the WEB Server’s IP (provided by the DNS server).

• The Server sends over the necessary files for the website.

• The Browser then renders the files and the website is displayed.
Client Server Request and Response
REMOTE PROCEDURE CALL (RPC)
• A Remote Procedure Call (RPC) is a software communication protocol that one program uses to
request a service from another program located on a different computer and network, without having
to understand the network's details.

• Specifically, RPC is used to call other processes on remote systems as if the process were a local
system. A procedure call is also sometimes known as a function call or a subroutine call.

• RPC acts like a low-level transport protocol for carrying data packets between communicating
programs.

• It does this using a client-server model. The requesting program is called a client, while the service-
providing program is called the server.
THINK OF IT LIKE THIS:

Imagine you are ordering food from a restaurant using a food delivery app.

• You (the client) place an order.

• The app (the RPC system) sends your request to the restaurant.

• The restaurant (the server) prepares and delivers your food.

• You receive the food and continue your work without worrying about the cooking process.

Just like this, RPC allows a program to call functions on another computer without needing to know how
the remote system works internally.
HOW DOES RPC WORK?
STEP BY STEP RPC EXECUTION FLOW:

CLIENT-SIDE EXECUTION:
• Call: The client initiates an RPC call to request a service from the server.
• Pack: The client stub packages the request into a format suitable for network transmission.
• Send: The RPC Runtime sends the Call Packet (request) to the server.
• Wait: The client waits for a response while the server processes the request.

SERVER-SIDE EXECUTION:
• Receive: The RPC Runtime on the server receives the request.
• Unpack: The Server Stub extracts and processes the request.
• Execute: The Server performs the requested operation.
• Pack: The Server Stub prepares the response.
• Send: The RPC Runtime sends the Result Packet back to the client.
CLIENT RECEIVES THE RESPONSE:
• Receive: The client runtime receives the Result Packet.
• Unpack: The client stub extracts the result.
• Return: The client receives the final result as if it were a local function call.

WHERE RPC IS USED IN REAL LIFE:


• Cloud Computing: When you access cloud services (AWS, Google Cloud).
• Web Applications: When a website fetches data from a remote database.
• Databases: When a web app queries a database server for user details.
REMOTE OBJECT INVOCATION
• Remote Object Invocation (ROI) allows a program on one computer to invoke methods of an object
located on another computer over a network.

• It is commonly used in distributed computing and client-server applications where objects need to
communicate remotely.

CHARACTERISTICS OF ROI:

• Object-Oriented Approach: Works with objects instead of functions.

• Granular Control: The client can modify or retrieve the object’s state.
Example Scenario:
1. Online Banking Systems:
• When you check your bank balance via a mobile app or website, your request is sent to a remote banking
server that invokes an object to fetch your account details.
• Example: A banking API remotely accesses and updates transaction records.

2. E-commerce Platforms (Amazon, Flipkart):


When you place an order, the e-commerce system calls remote objects to:
• Check product availability in the inventory system.
• Process payments using a remote payment gateway.
• Track delivery status from a logistics system.

3. Video Streaming Services (Netflix, YouTube, Amazon Prime Video):


• When you start watching a video, a remote object is invoked to:
• Fetch the video file from a distributed content delivery network (CDN).
• Manage user authentication and preferences.
• Track watch history and recommendations.
MESSAGE-ORIENTED COMMUNICATION
• Message-Oriented Communication (MOC) is a different approach where communication happens by
sending and receiving messages instead of making direct function calls. It uses a message queue or
message broker to enable asynchronous communication.

CHARACTERISTICS OF MOC:

• Asynchronous Communication: The sender does not wait for an immediate response.

• Decoupling: Sender and Receiver don’t need to be active at the same time.

• Reliability: Messages are not lost even if the receiver is unavailable.

• Scalable: Supports multiple clients and servers efficiently.


Example Scenario:
1. Instant Messaging Apps (WhatsApp, Telegram, Messenger):
• When you send a message, the app does not wait for an immediate response; instead, it:
• Queues the message.
• Sends it to the recipient asynchronously (even if they are offline).
• Notifies the sender when it is delivered and read.

2. Email Services (Gmail, Outlook, Yahoo Mail):


• Emails use message queues to store and forward messages.
• Even if the recipient is offline, the email is queued on a mail server and delivered when they are online.

3. Banking & Payment Systems (UPI, PayPal, Razorpay):


• Payment transactions are processed using message queues:
• The banking system processes the transaction request.
• The payment gateway sends messages between the merchant and the bank.
• Confirmation messages are sent once the transaction is completed.
4. Food Delivery Apps (Zomato, Swiggy, Uber Eats):
• When you place an order, the system:
• Sends a message to the restaurant to prepare the food.
• Sends a message to the delivery agent for pickup.
• If the restaurant or driver is unavailable, the message is requeued until processed.

5. Smart Home Automation (Alexa, Google Home, IoT Devices):


• When you give a command (e.g., "Turn on the AC"), the system sends a message to a queue:
• The message broker forwards the request to the AC controller.
• If the device is offline, the message is retried later.

You might also like