0% found this document useful (0 votes)
14 views15 pages

Unit 3

Uploaded by

mercylin2672005
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views15 pages

Unit 3

Uploaded by

mercylin2672005
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 15

Client-server computing is a model where tasks or services are

divided between two types of devices: clients and servers.

 The client is a device or software that requests services or resources.

 The server is a device or software that provides the requested services


or resources.

This model is commonly used for sharing data, applications, and processing
power across a network.

A protocol is like a set of rules that computers follow to communicate


with each other. It ensures that the data being sent is understood and
processed correctly by all devices in a network.

HTTP (HyperText Transfer Protocol): Rules for browsing websites.

FTP (File Transfer Protocol): Rules for transferring files.

SMTP (Simple Mail Transfer Protocol): Rules for sending emails.

TCP/IP (Transmission Control Protocol/Internet Protocol): Rules for moving


data across the internet.

DNS (Domain Name System): Rules for converting website names into IP
addresses.

RMI (Remote Method Invocation) is a Java feature that allows one


program to call methods (functions) in another program running on a different
computer, as if they were on the same machine.

Key Points:

1. Remote Method: A method you call that runs on another computer.


2. Stub and Skeleton:

o Stub: Like a phone at your side; it sends your request.

o Skeleton: Like a phone at your friend's side; it receives the request


and makes sure the work gets done.

3. Used for:

o Building distributed systems where parts of an application work


together over a network.

Distributed applications are software systems where


components are spread across multiple computers or servers connected
through a network. These systems work together to accomplish tasks. Here are
examples of distributed applications:

1. Web Applications

 E-commerce platforms (e.g., Amazon, Flipkart)

 Social media websites (e.g., Facebook, Twitter)

2. Cloud-Based Applications

 Google Drive

 Dropbox

 Microsoft OneDrive

3. Messaging and Communication Apps

 WhatsApp

 Zoom

 Microsoft Teams

 Slack

4. Streaming Services

 Netflix
 YouTube

 Spotify

5. Online Games

 Multiplayer online games like PUBG, Fortnite, or Minecraft.

6. Financial Systems

 Online banking applications

 Stock trading platforms (e.g., Robinhood, Zerodha)

7. Healthcare Systems

 Telemedicine platforms

 Distributed Electronic Health Records (EHR) systems.

8. IoT Applications

 Smart home systems (e.g., Google Home, Alexa)

 Industrial IoT platforms for monitoring equipment.

9. Big Data Processing

 Hadoop-based systems

 Apache Spark

10. Blockchain-Based Applications

 Cryptocurrencies (e.g., Bitcoin, Ethereum)

 Decentralized finance (DeFi) platforms.

11. Search Engines

 Google Search

 Bing

Distributed applications are essential for handling large-scale, high-


performance tasks by spreading workload across multiple systems.
ow to Run:

1. Save the server code as ChatServer.java and the client code as


ChatClient.java.

2. Compile both programs using javac ChatServer.java and javac


ChatClient.java.

3. Run the server first using java ChatServer.


4. Run the client using java ChatClient.

5. Start chatting! Type "exit" to end the chat.

What is a Distributed Application?


A distributed application is a software program where different parts (or
components) run on multiple computers connected over a network. These
components work together as if they were part of a single system.

How Does It Work?

Think of it like a team working on a project:

1. Each team member (computer or server) has a specific task.

2. They communicate and share their work to complete the project


together.

In a distributed application:

 Some parts handle user requests (e.g., on your phone or browser).

 Other parts process data and perform tasks (e.g., on powerful servers).

Why Use Distributed Applications?

Distributed applications are great for:

 Sharing workloads to handle large tasks efficiently.

 High availability, so if one part fails, others can still work.

 Scalability, allowing the app to grow easily by adding more servers or


components.
Key Features:

1. Components Work Together:

o Example: An e-commerce app might have:

 A frontend for users to browse products.

 A backend to handle orders.

 A database server to store product information.

2. Communication Over a Network:

o The components talk to each other using the internet or a local


network.

o They use protocols like HTTP, TCP/IP, or message queues.

3. Independent Components:

o Each component can run on a separate machine and still


communicate with others.

Examples of Distributed Applications:

1. Online Shopping (e.g., Amazon)

 Frontend: Your app or website.

 Backend: Servers process payments, manage inventory, and handle


orders.

 Database: Stores product details and user data.

2. Video Streaming (e.g., Netflix)

 Client App: Runs on your TV or phone to play videos.

 Streaming Server: Sends the video data to your device.

 Content Server: Stores the video files.

3. Multiplayer Games (e.g., Fortnite)


 Game Client: Runs on your device, showing you the game.

 Game Server: Handles updates and interactions between players.

4. Cloud Services (e.g., Google Drive)

 Client App: Lets you upload or download files.

 Cloud Servers: Store and manage your files.

Benefits of Distributed Applications:

1. Faster Performance: Different machines share the work.

2. Fault Tolerance: If one part fails, others can still work.

3. Scalability: Add more servers as needed to handle more users or tasks.

4. Global Access: Users can connect from anywhere via the internet.

Challenges:

1. Complexity: Designing and maintaining distributed apps can be harder.

2. Network Dependency: If the network is slow or fails, the app might not
work well.

3. Security Risks: Data is transferred over a network, so it must be secured.

Summary:

Distributed applications split their work across multiple computers or servers,


enabling them to handle large tasks, work efficiently, and serve users globally.
Examples include e-commerce websites, cloud services, streaming apps, and
multiplayer games.
What is a Distributed Application?

A distributed application is a software program where different parts (or


components) run on multiple computers connected over a network. These
components work together as if they were part of a single system.

How Does It Work?

Think of it like a team working on a project:

1. Each team member (computer or server) has a specific task.

2. They communicate and share their work to complete the project


together.

In a distributed application:

 Some parts handle user requests (e.g., on your phone or browser).

 Other parts process data and perform tasks (e.g., on powerful servers).

Why Use Distributed Applications?

Distributed applications are great for:

 Sharing workloads to handle large tasks efficiently.

 High availability, so if one part fails, others can still work.

 Scalability, allowing the app to grow easily by adding more servers or


components.

Key Features:

1. Components Work Together:

o Example: An e-commerce app might have:

 A frontend for users to browse products.

 A backend to handle orders.

 A database server to store product information.


2. Communication Over a Network:

o The components talk to each other using the internet or a local


network.

o They use protocols like HTTP, TCP/IP, or message queues.

3. Independent Components:

o Each component can run on a separate machine and still


communicate with others.

Examples of Distributed Applications:

1. Online Shopping (e.g., Amazon)

 Frontend: Your app or website.

 Backend: Servers process payments, manage inventory, and handle


orders.

 Database: Stores product details and user data.

2. Video Streaming (e.g., Netflix)

 Client App: Runs on your TV or phone to play videos.

 Streaming Server: Sends the video data to your device.

 Content Server: Stores the video files.

3. Multiplayer Games (e.g., Fortnite)

 Game Client: Runs on your device, showing you the game.

 Game Server: Handles updates and interactions between players.

4. Cloud Services (e.g., Google Drive)

 Client App: Lets you upload or download files.

 Cloud Servers: Store and manage your files.


Benefits of Distributed Applications:

1. Faster Performance: Different machines share the work.

2. Fault Tolerance: If one part fails, others can still work.

3. Scalability: Add more servers as needed to handle more users or tasks.

4. Global Access: Users can connect from anywhere via the internet.

Challenges:

1. Complexity: Designing and maintaining distributed apps can be harder.

2. Network Dependency: If the network is slow or fails, the app might not
work well.

3. Security Risks: Data is transferred over a network, so it must be secured.

Summary:

Distributed applications split their work across multiple computers or servers,


enabling them to handle large tasks, work efficiently, and serve users globally.
Examples include e-commerce websites, cloud services, streaming apps, and
multiplayer games.

What is Client-Server Computing?


Client-server computing is a way computers work together to share tasks. One
computer (the client) asks for something, and another computer (the server)
provides it. These two work together over a network, like the internet or a
local connection.

How It Works:

Think of it like a restaurant:


1. Client: The customer who orders food (makes a request).

2. Server: The kitchen that prepares and serves the food (provides the
service).

3. Network: The waiters who carry the requests and responses between
the client and server.

Key Components:

1. Client:

o A device or software that sends requests.

o Examples: Your browser, mobile app, or computer.

2. Server:

o A powerful machine or program that processes requests and


provides the needed data or services.

o Examples: Web servers, database servers, file servers.

3. Network:

o Connects the client and server, enabling communication.

o Examples: The internet or a local area network (LAN).

Steps in Client-Server Interaction:

1. The client sends a request to the server (e.g., "Show me this webpage").

2. The server processes the request (e.g., fetches the webpage).

3. The server sends the result back to the client (e.g., the webpage appears
in your browser).

Examples of Client-Server Computing:


1. Web Browsing:

o Your browser (client) requests a webpage.

o The website’s server sends the page to your browser.

2. Email:

o Your email app (client) fetches your emails.

o The mail server stores and delivers the emails.

3. Online Gaming:

o Your game (client) connects to the game server to play with


others.

o The server keeps the game updated and synced for all players.

4. Banking Apps:

o Your banking app (client) asks the bank's server for your account
details or to process a transaction.

Characteristics of Client-Server Computing:

1. Centralized Server:

o The server handles most of the work, like storing data and
managing requests.

2. Multiple Clients:

o Many clients can connect to the server at the same time.

3. Scalability:

o Servers can handle more clients by upgrading hardware or adding


more servers.

4. Security:
o Sensitive data is stored on the server, which can be secured more
easily than many client devices.

Advantages:

1. Centralized Resources:

o Data and services are stored on the server, making it easy to


manage and update.

2. Easy Maintenance:

o Fixes or updates are done on the server, benefiting all clients.

3. Scalability:

o More servers can be added to handle more users.

4. Efficient Resource Sharing:

o Servers can provide data and services to many clients at once.

Challenges:

1. Dependency on Server:

o If the server fails, all connected clients are affected.

2. Network Issues:

o Clients rely on the network to communicate with the server.

3. Server Overload:

o Too many requests at the same time can slow down or crash the
server.

4. Security Risks:

o Servers are common targets for cyberattacks.


Comparison with Peer-to-Peer (P2P):

Feature Client-Server Peer-to-Peer (P2P)

Structure Centralized Decentralized

Examples Web browsing, banking apps File sharing, torrent apps

Data Location Stored on a server Stored across all peers

Scalability Depends on server resources Easier to scale with more peers

Summary:

Client-server computing is a model where the client (user device) requests


services, and the server (a powerful machine) processes and responds. It's
widely used for web browsing, email, online games, and banking apps. It offers
centralized control, scalability, and resource sharing, but relies heavily on the
server and network for smooth operation.

You might also like