Slides 01-I
Slides 01-I
Faculty of science
Mathematics Dept.
Distributed Systems
Prepared by
Faculty of science
Tanta University
2024
Distributed Systems
Distributed System
Definition
A distributed system is a collection of autonomous computing elements
(each being able to behave independently of each other) that appears
to its users as a single coherent system.
Characteristic features
1. Collection of Autonomous computing elements
► Autonomous computing elements, also referred to as nodes, be
they hardware devices or software processes.
2. Single coherent system: users or applications perceive a single
system (believe they are dealing with a single system) ⇒ nodes
need to collaborate.
3 / 56
Introduction: What is a distributed system? Characteristic 1: Collection of autonomous computing elements
Collection of nodes
► Who are the members of the group (open or closed group)? How to
manage group membership and organization of that collection ?
► How to know that you are indeed communicating with an authorized
(non)member?
- In an open group, any node is allowed to join the distributed system, i.e., it can send
messages (communicate) to any other node in the system without any authorization
process.
- In contrast, with a closed group, only the members of that group can communicate
with each other, and a separate mechanism is needed to let a node join (it needs to go
through an authorization process) or leave the group.
- we may need to register which nodes may or may not belong to the system
- we provide each member with a list of nodes it can directly communicate with.
4 / 56
Introduction: What is a distributed system? Characteristic 1: Collection of autonomous computing elements
•Ring: In a ring overlay network, nodes are connected in a circular manner, forming a
ring structure. Each node has a neighbor to which it can send messages. Messages can
be passed from one node to the next in a clockwise or counterclockwise direction
around the ring until they reach the intended destination.
5 / 56
Introduction: What is a distributed system? Characteristic 1: Collection of autonomous computing elements
6 / 56
Introduction: What is a distributed system? Characteristic 2: Single coherent system
2. Single Coherent system
Essence:
- End users should not even notice that they are dealing with the fact that
processes, data, and control are dispersed across a computer network. Ex: as
on google search box, we write text on search box, and we get result
-The collection of nodes as a whole operates the same, no matter where,
when, and how interaction between a user and the system takes place.
*Offering Single Coherent view is challenging: Examples: it requires:
► An end user cannot know where a computation is taking place (on which
computer a process is currently executing, or even perhaps that part of a
task has been transmitted to another process executing somewhere else)
► Where data is exactly stored should be irrelevant to an application.
► If or not data has been replicated to enhance performance is completely
hidden
The Keyword is distribution transparency (important design goal of distributed
system)
Figure: A distributed system organized in a middleware layer, which extends over multiple
machines. Each application offers the same interface.
Same interface everywhere
Application B
Appl. A Appl. C
(distributed on 2 computers)
Network
What does middleware layer contain?
Commonly used components and functions that need not be
implemented by applications separately. 8 / 56
Middleware services are offered in a network environment: middleware is
the same to a distributed system as what an operating system is to a computer
1. Sharing resources
- An important goal of a distributed system is: Make it easy for users
(and applications) to access and share remote resources. Resources Ex:
peripherals, storage facilities, data, files, services, and networks, etc.
examples
► Cloud storage services like Google Drive allow users to store their files and
access them from anywhere with an internet connection. Users can easily
upload, download, and share files with others by granting them permission to
access specific folders or files.
- Imagine a team of employees working on a project. They can store
project-related documents, spreadsheets, and presentations in a shared
folder on Google Drive. Each team member can access and edit these files,
facilitating seamless collaboration and eliminating the need for sending
files back and forth via email.
► File-sharing peer-to-peer networks like BitTorrent (BitTorrent is a popular
peer-to-peer file-sharing protocol that allows users to share files across the
internet without relying on a central server).
11 /
Introduction: Design goals Supporting resource sharing
1. Sharing resources
► File-sharing peer-to-peer networks like BitTorrent.
- Ex, if a user wants to download a large file using BitTorrent, they connect to the
network and start downloading different pieces of the file from various peers who
already have it. At the same time, the user also uploads the parts they have to other
users who are requesting the same file. This decentralized approach allows for
faster and more efficient file sharing.
- Ex: when a user sends a video on WhatsApp, the application breaks the
video into smaller pieces and sends them to several peers in the network. The
received device retrieves these pieces from different sources simultaneously,
allowing for faster streaming and reducing the load on any single server
Observation: “The network is the computer” (quote from John Gage, then at
Sun Microsystems)
12 /
Introduction: Design goals Making distribution transparent
Replication Hide that an object is replicated (by make all replicas have the same name). ---
Resources may be replicated to increase availability or to improve performance by
placing a copy close to the place where it is accessed.
“Ex: Imagine a distributed database system that stores customer information for an
e-commerce platform. To improve performance and increase availability, the
database is replicated across multiple nodes in different geographical locations.
Each replica contains the same data, allowing clients to access the nearest replica
for faster response times.”
-Replication transparency deals with hiding the fact that several copies of a
resource exist, or that several processes are operating in some form of lockstep
mode so that one can take over when another fails.
Migration Hide that an object may move to another location (EX: communication between
mobile phones: regardless whether two people are actually moving, mobile phones
will allow them to continue their conversation.)
Concurrency Hide that an object may be shared by several independent users
(Two independent users may each have stored their files on the same file server or
may be accessing the same tables in a shared database. In such cases, it is
important that each user does not notice that the other is making use of the same
resource.)
Types of distribution transparency (Continues)
Failure Hide the failure and recovery of an object (user or application does not notice that
some piece of the system fails to work properly, and that the system subsequently
(and automatically) recovers from that failure.)
Masking failures and transparently recovering from failures is one of the hardest
issues in distributed systems and is even impossible. Because the inability to
distinguish between a dead process and slowly responding one.
Ex., when contacting a busy Web server, a browser will eventually time out and
report that the Web page is unavailable. At that point, the user cannot tell whether
the server is actually down or that the network is badly congested.
Introduction: Design goals Making distribution transparent
Conclusion
Distribution transparency is a nice a goal, but achieving it is a different
story, and it should often not even be aimed at.
Ex: the policy might dictate that: the system should prioritize certain
types of traffic or adjust the level of data compression based on
available bandwidth to optimize performance.
Observation
Most systems account only, to a certain extent, for size scalability. Often a
solution: multiple powerful servers operating independently in parallel.
Today, the challenge still lies in geographical and administrative scalability.
Scalability dimensions 15 / 56
Introduction: Design goals Being scalable
Problems of scalability,
and how being scalable?
Scalability dimensions 21 / 56