0% found this document useful (0 votes)
5 views61 pages

Understanding Distributed Systems Basics

The document provides an overview of distributed systems, highlighting their characteristics, such as resource sharing, concurrency, and independent failures. It discusses the challenges faced in designing these systems, including heterogeneity, openness, security, scalability, and failure handling. Examples of distributed systems like the Internet, intranets, and mobile networks are also presented, along with the importance of middleware and techniques for managing system growth and security.

Uploaded by

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

Understanding Distributed Systems Basics

The document provides an overview of distributed systems, highlighting their characteristics, such as resource sharing, concurrency, and independent failures. It discusses the challenges faced in designing these systems, including heterogeneity, openness, security, scalability, and failure handling. Examples of distributed systems like the Internet, intranets, and mobile networks are also presented, along with the importance of middleware and techniques for managing system growth and security.

Uploaded by

lipikaveramma3
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

MODULE1:

CHARACTERIZATION OF
DISTRIBUTED SYSTEMS
CHAPTER-1
Topics

Introduction
Focus on Resource sharing
Challenges
[Link]:

A distributed system is a software system in which


software or hardware components located at
networked computers communicate and coordinate
their actions only by passing messages. Networks of
computers are everywhere!
Networks of computers are everywhere!

 Examples of networks of computers are:

 Mobile phone networks


 Corporate networks
 Factory networks
 Campus networks
 Home networks
 In-car networks
 On board networks in aero planes and trains
 Our definition of distributed systems has the
following significant consequences:
 Concurrency
 Handling multiple task at once.
 For example, you can do your work on your computer while I do mine on
a different computer. Sometimes, we may need to share things like files or
web pages.
 If more people need to work at the same time, we can just add more
computers to the network. This makes the system stronger and able to
handle more work
 No global clock
 Tasks coordinate their actions by exchanging
messages
 In a network of computers, programs often need to work together. To do
that, they send messages to each other. Sometimes, they need to be
closely coordinated — like doing things in the right order or at the right
time.
 But here’s the problem: the clocks on different computers aren’t always
perfectly in sync. There’s no single, exact clock that all computers
follow. This happens because they can only talk to each other by
sending messages, and those messages take time to travel.

 Independent Failures
 Faults in the network result in the isolation of
the computers that are connected to it.
 Each component of the system can fail
independently, leaving the others still running.
If one computer or part fails, it does not mean the whole
system will stop. The system is designed to handle
individual failure without complete shutdown.
General Examples of Distributed Systems
 Internet
 Intranets
 Mobile networks

The Internet
The Internet is a vast interconnected collection of computer
networks of many different types.
Intranet
An intranet is a portion of the Internet that is
separately administered and has a boundary that can
be configured to enforce local security policies.

Mobile networks
Technological advances in device miniatorization and
wireless networking have led increasingly to the
integration of small and portable computing devices
into distributed systems.
 Cluster
 A type of parallel or distributed processing
system, which consists of a collection of
interconnected stand-alone computers
cooperatively working together as a single,
integrated computing resource. The
computers may be standard per
uniprocessor or multiprocessor.
 Grid
 A type of parallel and distributed system that
enables the sharing, selection, and
aggregation of geographically distributed
autonomous resources dynamically at
runtime depending on their availability,
capability, performance, cost, and users'
quality-of-service requirements
[Link] On Resource sharing:
 Sharing Computers and Services

We Often Share Things Without Noticing

 Weshare printers, files, and tools like Google


Search every day.
 Most people care about what the tool does (like
printing or searching), not the machine that runs it.
Different Ways of Sharing
 Sometimes,many people all over the world use
the same service (like a search engine).
 Othertimes, a small group works together, like
students sharing a document.
 Howpeople share things affects how computers
handle their requests.
What is a Service?
 A service is something that lets you use a
resource.
 Example: a file service lets you read or save
files.
 Example:a printer service lets you print
documents.
 You use a service through a set of actions (like
"read", "write", or "print").
Client and Server (Working Together)

 A server is a program that waits and helps others.


 A client is a program that asks for help.
 When the client asks the server to do something,
the server replies.

This is called the client-server model.


For example:
 Your web browser (like Chrome) is the client.
 The website you open is run by a server.
[Link]
 Designers of distributed systems need to take the
following challenges into account:
3.1 Heterogeneity

Heterogeneity means variety or differences. When we use


the Internet, we are actually using many different kinds of
systems that all work together. These differences include:
 Different types of networks (like Wi-Fi, Ethernet, etc.)
 Different computer hardware (like PCs, smartphones, tablets)
 Different operating systems (like Windows, Linux, macOS)
 Different programming languages (like Java, Python, C++)
 Different software developers who may build things in their own
way
 Even though these systems are very different, they can still
communicate because they all follow standard Internet rules
called protocols.
How Do They Work Together?
1. Networks:
All computers use Internet protocols to talk to each other. For example:
•A computer on an Ethernet network uses Internet protocols over
Ethernet.
•A computer on Wi-Fi also uses Internet protocols, but over Wi-Fi.
This makes it look like they're all using the same type of network, even
though they're not.

2. Hardware Differences:
Different computers store data (like numbers) in different ways. This can
cause problems when sharing data.
For example:
One system may store numbers starting from the left, another from the
right (this is called byte order).
These differences must be handled properly so data is correctly
understood.
3. Operating Systems:
 Every operating system has its own way of doing things. For
example:
 Sending a message over the network in UNIX is different from
doing it in Windows.
 So, programs need to know how to communicate across
different OSs.

4. Programming Languages:
 Different programming languages (like Java, Python, C++) store
data and text in different ways.
 For programs in different languages to talk to each other, they
must use common rules or formats.
 What Helps Handle All This? ➤ Middleware
Middleware is special software that:
 Hides all these differences (network, OS, language, etc.)
 Gives programmers a simple way to write applications that work
across many systems
 Examples:
 CORBA and Java RMI are middleware tools
 They allow a program on one computer to use features from a
program on another computer – without the programmer
worrying about the network details
Mobile Code
 Mobile code means code (or programs) that can move from
one computer to another and run there.
 But there’s a problem:
 Programs are usually built to work on specific hardware and
OS
 So a program made for one computer might not work on
another
 Solution ➤ Virtual Machines
 A virtual machine is a special program that allows code to run
on any computer, no matter what hardware it has.
 Example:
 Java uses a Java Virtual Machine (JVM)
 The Java compiler creates code for the JVM
 Then JVM runs that code on any computer where the JVM is
installed
 A popular use of mobile code today is JavaScript in websites:
 When you open a website, JavaScript code runs in your browser
 This makes websites interactive and dynamic
3.2 Openness
 Interfaces should allow components to be
added or replaced.

 Openness means that a computer system can be easily


improved, extended, or changed.
 In distributed systems (where different computers work
together), openness allows:
 New services to be added.
 Existing services to be used by many different programs.
How is Openness Achieved?
 To make a system open, one important thing is needed:
The system's key interfaces must be made public
(published).
 How to connect to the system.
 How to use its services.
 If developers know exactly how a system works, they can:
 Build new services
 Improve old ones
 Make different programs work together
 Why is Openness Useful?
 Openness helps:
 Developers to build and improve services.
 Different systems to work together (even if they're from different
vendors or companies).
 New hardware and software to be added easily.
 Such systems are called open distributed systems because:
 They support resource sharing (like files, printers, or data).
 They can grow and change over time.
 They’re not locked into one company’s technology.
3.3 Security
 The system should only be used in the way
intended.

 In a distributed system (many computers working together),


some data is very important — like hospital records, bank info,
or private emails.
 To protect this data, we need to focus on 3 main things:
 Confidentiality – Only authorized people should be able to see
the information.
 Integrity – The information should not be changed or damaged
by accident or on purpose.
 Availability – People should be able to access the data when
they need it
 The Internet lets computers from anywhere talk to each other.
That’s helpful, but it also opens the door to security problems. If
we're not careful, anyone could try to:
 Steal information
 Change data
 Block access to services
Firewalls – A First Line of Defense
 A firewall is like a security gate around your internal company
network (intranet). It controls what can go in or out of the
network.
 But firewalls can't:
 Stop internal misuse (when someone inside the network
accesses something they shouldn’t)
 Protect outside services on the wider Internet
Examples of Security Challenges
 1. Sending Sensitive Data
 Imagine: A doctor sends patient information over the network
 A customer types in a credit card number while shopping
online
This kind of private data must be sent securely so others can't
steal or change it.
 2. Verifying Identity
 It’s not enough to protect the data. You also need to:
 Know who is sending or receiving the data
 Is it really the doctor?
 Is it really the bank?
 If you don’t know who you're talking to, you can’t trust the
messages.
 How Do We Protect Data?
 We use encryption, which is like locking the data in a box so
only the right person can open it.
Encryption helps:
 Keep data secret
 Prove the identity of users and websites (called authentication)
Two Major Security Problems That Still Exist
 1. Denial of Service (DoS) Attacks
 This is when someone floods a website or service with so many
fake requests that real users can’t access it.
 It’s like filling up a restaurant with fake customers so real ones
can't get in.
 These attacks happen often, and right now we mostly try to track
down the attacker after it happens.
 Better solutions are still being developed.
 2. Security of Mobile Code
 Mobile code means code (small programs) that move across
computers — like:
 Email attachments
 Scripts in web pages
Example:
 You get an email with a program that looks safe, but when you run it, it
may:
 Damage your files
 Steal your data
 Join a DoS attack
 That’s why extra protection is needed when running code from
unknown sources.
 Security is about protecting valuable information.
 It has 3 parts: Confidentiality, Integrity, and Availability.
 Data should be safe, unaltered, and always accessible.
 We use encryption to protect messages and confirm identities.
 Some big problems (like DoS attacks and dangerous mobile
code) are still not fully solved.
3.4 Scalability
A system is scalable if it can grow (handle more users and
resources) without breaking or slowing down too much.
Distributed systems should work well:
 In small setups (like a company intranet)
 And also in large setups (like the whole Internet)
 Even if the number of users, computers, or data increases a lot,
the system should still work smoothly and efficiently.
Challenges in Designing Scalable Systems:
1. Keeping Resource Costs Under Control
 As more people use the system, you may need to add more:
 Servers
 Storage
 Network equipment
 This must be done at a reasonable cost.
 Example:
If one server supports 20 users, then two servers should support
40 users.
This kind of growth is called linear scaling.
 But in real life, it's often more complicated.
2. Controlling Performance Drop
As the system grows, it may get slower. For example:
•Looking up a website name (like [Link]) might take longer
if the system is too large.
To avoid this, designers use smart structures, like:
•Hierarchical designs (like a tree)
•These are faster than just storing everything in a long list.
•With this, the time to look something up grows slowly, like log(n)
instead of directly with n.
3. Avoiding Software Limits
Some parts of a system may have built-in limits.
 Example:
In the 1970s, Internet addresses were 32-bit numbers.
That seemed enough then, but now we're running out of
addresses!
 So we had to create a new system with 128-bit addresses
(IPv6), which takes:
 More memory
 More space in messages
 And requires updating many old programs
 It’s hard to plan perfectly for the future!
4. Avoiding Bottlenecks
A bottleneck happens when one part of the system is
overloaded, slowing everything down.
 Example of a past problem:
The old system for looking up domain names had one master
file for the entire Internet.
That worked when there were only a few hundred computers...
But now with millions, that would crash!
 Solution:
They created the Domain Name System (DNS), which:
 Splits the work among many servers
 Allows local management
 No single point of failure
 This helps the system scale much better.
5. Using Smart Techniques
To improve performance and scalability, systems often use:
 Caching: Temporarily saving popular data close to users
(like saving a copy of a web page to avoid loading it again)
 Replication: Making copies of data on different servers
(so many users can access the same info at once)
 Multiple servers: Running similar programs on many servers at
the same time
(so no single server is overloaded)
3.5 Failure handling
 Failure of a component (partial failure) should not
result in failure of the whole system.
Techniques to Handle Failures
 Distributed systems use five main methods to handle
these problems:
1. Detecting Failures
 Some failures can be found. For example:
 If data is changed or broken during transfer, a checksum
(a kind of digital check) can detect it.
 But not all failures are easy to detect. For example, if a
server on the internet crashes and stops responding, it’s
hard to know for sure what happened.
2. Masking Failures
 Some failures can be hidden so they don’t cause
problems. Examples:
 If a message doesn’t arrive, try sending it again.
 Save data on two disks, so if one is damaged, the other
can be used.
 These techniques don’t always work perfectly:
 Both disks might get damaged.
 Messages might never reach, no matter how many times
you try.
3. Tolerating Failures
 In big systems like the internet, it's impossible to stop all
failures. So, systems are designed to work even if some
things fail.
Example:
 If a browser can’t open a website, it tells the user about the
error instead of waiting forever.
 Users can then try again later.
4. Recovery from Failures
 When something crashes, we may need to recover the
data or undo some steps.
 Example:
 If a server crashes while saving data, the data might be
incomplete or wrong.
 Recovery systems are used to fix or roll back to the last
good state.
5. Redundancy (Backup components)
 Redundancy means having backup systems ready. This
helps services continue even if one part fails.
 Examples:
 In the internet, there are always at least two different
paths between routers.
 In DNS (the internet’s phonebook), each name is saved in
two or more places.
 Databases can be stored on multiple servers, so if one
server fails, others can serve the data.
3.6 Concurrency

 Concurrency means that multiple tasks are


happening at the same time.
In distributed systems, many users or clients may
try to use the same resource at once.
 Example
 Think about an online auction:
 Many people are bidding at the same time.
 Let’s say:
 Smith bids $122
 Jones bids $111
 If the system handles both bids at the same time without
proper control, the data might get mixed up:
 The result might wrongly show:
 Smith: $111
 Jones: $122
 This is a concurrency problem—the system didn’t manage
the bids properly because both actions happened at the same
time.
 In most systems:
 Each shared resource (like the bidding list) is treated like an
object.
 Many threads (pieces of work) may try to use the same
object at the same time.
 If those threads are not controlled, their operations might
conflict with each other.
How to Fix It
 To prevent such problems:We need to make the object safe
for concurrent use.
 That means: only one thread should change the object at a
time (or they should be managed carefully).
 This is done using tools like:
 Semaphores(a technique from operating systems)
 Locks
 Synchronization mechanisms
 These tools make sure:
 Only one person updates the bid at a time.
 Data stays correct and consistent.
3.7 TRANSPARENCY

What is Transparency
 In a distributed system, many different computers and
resources (like files, printers, databases) are working
together.
 But for users and programmers, we want the system to look
like one single system, not many parts spread out.
 Transparency means hiding the complexity of this behind-
the-scenes [Link] user should not have to worry about:
 Where the resource is
 Whether it’s on their computer or another one
 Whether others are using it at the same time
 Let’s say you open a file. You don’t know (or need to know) whether:
 The file is on your computer, or
 It's on a server far away
 It just works — that’s transparency.

 Three Types of Transparency (explained simply)


 The ANSA and ISO models describe 8 types, but here are the 3
mentioned in your text:
[Link] Transparency
•What it means: You can use a local or remote resource in
the same way.
•Example: You can open a file on your computer or from a
server using the same command (Open()), and it works the
same.
[Link] Transparency
 What it means: You don’t need to know where a
resource is located.
 Example: You can send a message or fetch data
without knowing which city or server it’s coming
from.
[Link] Transparency
 What it means: Many users or programs can use the same
resource at the same time, without causing problems.
 Example: If multiple people are booking tickets online at
once, the system makes sure no one gets the same seat.

[Link] Transparency
 What it means: There are multiple copies (replicas)
of a resource to improve speed and reliability.
 Example: If you download a file, you don’t know
(and don’t need to know) which copy of the file
you're getting — it just works.
5. Failure Transparency
 What it means: The system continues working even if some parts fail.
 Example: If an email server goes down, your email will still get delivered later.
You don’t need to resend it.
[Link] Transparency
 What it means: Resources (or users) can move around
the system without breaking anything.
 Example: You can still make a phone call to someone
even if they’re on a moving train — you don’t need to
track their location.
[Link] Transparency
 What it means: The system automatically adjusts to keep things
fast when there’s more load.
 Example: If too many users visit a website, it can use more
servers behind the scenes to stay fast — without anyone noticing.
8. Scaling Transparency
 What it means: The system can grow bigger (more users or
resources) without needing to change how programs work.
 Example: A messaging app like WhatsApp still works the same
way whether it has 100 users or 1 billion users.
9. Access Transparency
 What it means: You can use a resource the same way no matter
where it is — local or remote.
 Example: Opening a file from your desktop or from the network
looks the same to you.
10. Location Transparency
•What it means: You don’t need to know where a resource is located.
•Example: A web link (URL) just shows a name like [Link] — not
the exact computer or IP address it's on.

11. Network Transparency


This combines access + location transparency.
•Example: Sending an email — you only need the person’s address (like
john@[Link]). You don’t need to know their device, location, or anything
else.
3.8 Quality of Service
What is Quality of Service (QoS)?
 Once a service (like playing a video or accessing a file) works
correctly, we then ask:
“How well does it work?”
 QoS means the quality or experience that users get from a system
— not just whether it works, but how smoothly and reliably it works.
Main Parts of QoS
 There are 4 main things that affect quality:
 Reliability – Does the system work without crashing or losing data?
 Security – Is the system safe from hackers or data leaks?
 Performance – Is it fast and responsive?
 Adaptability – Can it adjust when system conditions change (like
network problems or new devices)?
QoS in time-sensitive applications
 Some applications need to process or deliver data at the right
time, not just correctly.
 Example:
 A video streaming app like YouTube or Netflix.
 If the frames of the video don't show up on time, the video
will freeze or lag.
 So, timing is very important for a smooth experience.
What does QoS mean in such cases?
 QoS means the system should guarantee that:
 Enough network and computer resources are available.
 Data is processed and delivered on time — like each video
frame showing up at the right moment.
How is QoS handled?
 Applications must reserve the needed resources (like network
bandwidth, CPU time, etc.).
 Resource managers make sure that these reservations are met.
 If the system cannot meet the request, it will reject it to avoid
performance problems.

Real-world example:
 When you're watching a movie on BBC iPlayer, it usually works
well.
 But if the internet is too crowded, the video might lag or buffer
— this means QoS is not being met.
 If there were guarantees in place, the app would always get the
bandwidth it needs, even during high traffic.
Example: Watching a Movie Online
 Let’s say you’re watching a movie on your computer:
 The video should not pause or lag.
 Each frame of video must be shown on time, or the movie won’t
look smooth.
 This is an example of a time-sensitive application — it needs data
at the right speed and time.
 That’s where QoS becomes very important.

You might also like