You are on page 1of 40

Introduction to Distributed system

CHAPTER -1-
Introduction to Distributed Systems
Introduction …
 Definition:

2 Introduction to Distributed Systems - by Ayana O. Kitil 12/31/2020


Introduction, …(2)
 A distributed system is a collection of independent computers that appears to its
users as a single coherent system.
 This definition has:
1. A distributed system consists of components (i.e., computers) that are autonomous.
2. The users (be they people or programs) think they are dealing with a single system.
This means that one way or the other the autonomous components need to
collaborate. How?

 Is the type of computers matters in distributed systems?

 Is the way computers interconnected matters in distributed?

3 Introduction to Distributed Systems - by Ayana O. Kitil 12/31/2020


Introduction, …(3)
• In order to support heterogeneous computers and networks while offering a single-
system view, distributed systems are often organized by means of a layer of software –
that is, logically placed between a higher-level layer consisting of users and
applications, and a layer underneath consisting of operating systems and basic
communication facilities such a distributed system is sometimes called middleware.

Fig. 1.1. A distributed system organized as


middleware. The middleware layer extends
over multiple machines, and offers each
application the same interface.
4 Introduction to Distributed Systems - by Ayana O. Kitil 12/31/2020
Introduction, …(4)
• Fig. above shows four networked computers and three applications, of which
application B is distributed across computers 2 and 3.
• Each application is offered the same interface.

• The distributed system provides the means for components of a single distributed
application to communicate with each other, but also to let different applications
communicate.
• At the same time, it hides the differences in hardware and operating systems from
each application.

5 Introduction to Distributed Systems - by Ayana O. Kitil 12/31/2020


Characteristics of Distributed System
a. The various computers and the ways in which they communicate are mostly
hidden from users.
b. Users and applications can interact with a distributed system in a consistent and
uniform way, regardless of where and when interaction takes place.
c. Relatively easy to expand or scale.
o In this, how independent computers take part in the system as whole.

o Users and applications should not notice that parts are being replaced or fixed, or that new
parts are added to serve more users or applications.

6 Introduction to Distributed Systems - by Ayana O. Kitil 12/31/2020


Goals of Distributed System
• There are four (4) important goals of distributed system.
1. Making Resource Accessible:
o The main goal of a distributed system is to make it easy for the users (and
applications) to access remote resources, and to share them in a controlled and
efficient way.
o Examples of Resources:
 Printers, computers, storage facilities, data, files, Web pages, and networks.

o There are many reasons for wanting to share resources.


 Economics – sharing of printers among several users in a small office rather than buying.
 Communication – connecting users and resources to collaborate and exchange information.
 Security Problem – tracking communication to build up a preference profile of a specific user.
7 Introduction to Distributed Systems - by Ayana O. Kitil 12/31/2020
Goals of Distributed System, …(2)
2. Distribution Transparency:
o An important goal of a distributed system is to hide the fact that its processes and
resources are physically distributed across multiple computers.
o A distributed system that is able to present itself to users and applications as if it
were only a single computer system is said to be transparent.
Table 1.1. Different forms of transparency in a distributed system (ISO, 1995).

8 Introduction to Distributed Systems - by Ayana O. Kitil 12/31/2020


Goals of Distributed System, …(3)
3. Openness:
o An open distributed system is a system that offers services according to standard
rules that describe the syntax and semantics of those services.
o Example:
 In computer networks, standard rules govern the format, contents, and meaning of messages sent and
received. Such rules are formalized in protocols.
 In distributed systems, services are generally specified through interfaces, which are often described
in an Interface Definition Language (IDL).
 Interface definitions written in an IDL nearly always capture only the syntax of services.
 If properly specified, an interface definition should be complete and neutral.

9 Introduction to Distributed Systems - by Ayana O. Kitil 12/31/2020


Goals of Distributed System, …(4)
Complete:
o Complete means that everything that is necessary to make an implementation has
indeed been specified.
o However, many interface definitions are not at all complete, so that it is necessary
for a developer to add implementation-specific details.
o Just as important is the fact that specifications do not prescribe what an
implementation should look like: they should be neutral.
o Completeness and neutrality are important for interoperability and portability.

10 Introduction to Distributed Systems - by Ayana O. Kitil 12/31/2020


Goals of Distributed System, …(5)
Interoperability:
o It characterizes the extent by which two implementations of systems or components
from different manufacturers can co-exist and work together by merely relying on
each other's services as specified by a common standard.
o Shortly, TWO from different component on ONE.

Portability:
o It characterizes to what extent an application developed for a distributed system A
can be executed without modification, on a different distributed system B that
implements the same interfaces as A.
o Shortly, ONE on TWO different component.

11 Introduction to Distributed Systems - by Ayana O. Kitil 12/31/2020


Goals of Distributed System, …(4)
4. Scalability:
o Scalability of a system can be measured along at least three different dimensions.
a. A system can be scalable with respect to its size, meaning that we can easily add more users and
resources to the system.
b. A geographically scalable system is one in which the users and resources may lie far apart.
c. A system can be administratively scalable, meaning that it can still be easy to manage even if it
spans many independent administrative organizations.

o Unfortunately, a system that is scalable in one or more of these dimensions often


exhibits some loss of performance as the system scales up.

12 Introduction to Distributed Systems - by Ayana O. Kitil 12/31/2020


Goals of Distributed System, …(5)
Scalability Problems:
o When a system needs to scale, very different types of problems need to be solved.
o Consider scaling with respect to size and the problems to be occurred:
Table 1.2. Examples of scalability limitations.

o Consider scaling with respect to geography and the problems to be occurred:


 Synchronous Communication – designed for LAN and client blocks until a reply is sent back.
 Asynchronous Communication – designed for WAN and communication continues.

13 Introduction to Distributed Systems - by Ayana O. Kitil 12/31/2020


Goals of Distributed System, …(6)
Scalability Techniques:
o There are now basically only three techniques for scaling:
a. Hiding Communication Latencies
 It is used to achieve geographical scalability.
 The basic idea is simple: try to avoid waiting for responses to remote (and potentially distant)
service requests as much as possible.
 Example – When a service has been requested at a remote machine, an alternative to waiting for a
reply from the server is to do other useful work at the requester's side, i.e., using asynchronous
communication.
b. Distribution
 It involves taking a component, splitting it into smaller parts, and subsequently spreading those
parts across the system.
 Example – The Internet Domain Name System (DNS) – naming services.

14 Introduction to Distributed Systems - by Ayana O. Kitil 12/31/2020


Goals of Distributed System, …(7)
Scalability Techniques, …(2)
c. Replication
 Considering that scalability problems often appear in the form of performance degradation.
 It is not only increases availability, but also helps to balance the load between components
leading to better performance.
 Caching is a special form of replication.
 Caching results in making a copy of a resource by the client.
 Caching happens on demand whereas replication is often planned in advance.
 Example – Web-users where browser returns a cached documents.

o Therefore, scalability problem from easiest to difficult is size → geographical →


administrative.

15 Introduction to Distributed Systems - by Ayana O. Kitil 12/31/2020


Pitfalls of Distributed System
• Peter Deutsch formulated these mistakes as the following false assumptions that
everyone makes when developing a distributed application for the first time:
a. The network is reliable.

b. The network is secure.

c. The network is homogeneous.

d. The topology does not change.

e. Latency is zero.

f. Bandwidth is infinite.

g. Transport cost is zero.

h. There is one administrator.

16 Introduction to Distributed Systems - by Ayana O. Kitil 12/31/2020


Types of Distributed System
• There are basically three types of distributed systems.
A. Distributed Computing System
o There are two types of distributed computing systems.
1. Cluster Computing:
 A characteristic feature of cluster computing is its homogeneity.
 In this, the underlying hardware consists of a collection of similar workstations or PCs, closely
connected by means of a high-speed local-area network.
 In addition, each node runs the same operating system.

2. Grid Computing:
 A grid computing systems have a high degree of heterogeneity: no assumptions are made concerning
hardware, operating systems, networks, administrative domains, security policies, etc.

17 Introduction to Distributed Systems - by Ayana O. Kitil 12/31/2020


Types of Distributed System, …(2)
B. Distributed Information System:
o There are two forms of distributed information systems.
1. Transaction Processing Systems:
 Consider a database application which specifically, transactions are:
1. Atomic - to the outside world, the transaction happens indivisibly.
2. Consistent - the transaction does not violate system invariants. E.g. Banking System
3. Isolated - concurrent transactions do not interfere with each other.
4. Durable - once a transaction commits, the changes are permanent.
 These properties are often referred to by their initial letters: ACID.

o Its main task was to allow an application to access multiple server/databases by


offering it a transactional programming model.
18 Introduction to Distributed Systems - by Ayana O. Kitil 12/31/2020
Types of Distributed System, …(3)
1. Transaction Processing Systems, …(2)

Fig. 1.2. The role of a TP monitor in distributed systems.

19 Introduction to Distributed Systems - by Ayana O. Kitil 12/31/2020


Types of Distributed System, …(4)
2. Enterprise Application Integration:
 The main idea was that existing applications could directly exchange information.

Fig. 1.3. Middleware as a communication facilitator in enterprise application integration.

 Several types of communication middleware like remote procedure calls (RPC),


remote method invocation (RMI), and message-oriented middleware (MOM).

20 Introduction to Distributed Systems - by Ayana O. Kitil 12/31/2020


Types of Distributed System, …(5)
C. Distributed Pervasive System:
o Both distributed computing systems and distributed information systems are largely
characterized by their stability: nodes are fixed and have a more or less permanent
and high-quality connection to a network.
o A distributed pervasive systems are often characterized by being small, battery-
powered, mobile, and having only a wireless connection, although not all these
characteristics apply to all devices.
o It lacks of human administrative control.
o At best, devices can be configured by their owners, but otherwise they need to
automatically discover their environment and "nestle in" as best as possible.

21 Introduction to Distributed Systems - by Ayana O. Kitil 12/31/2020


Types of Distributed System, …(6)
o This nestling in has been made more precise by Grimm et al. (2004) by formulating
the following three requirements for pervasive applications:
1. Embrace Contextual Changes.
 This means that a device must be continuously be aware of the fact that its environment may change
all the time.
 One of the simplest changes is discovering that a network is no longer available.
 Example – Suppose, user is moving between base stations.

2. Encourage Ad-hoc Composition.


 Devices in pervasive systems will be used in very different ways by different users.

3. Recognize Sharing as the Default.


 Devices generally join the system in order to access (and possibly provide) information.

22 Introduction to Distributed Systems - by Ayana O. Kitil 12/31/2020


Types of Distributed System, …(7)
o Some concrete examples of pervasive systems.
a. Home Systems.
b. Electronic Health Care Systems using sensor like body-area network (BAN)
c. Sensor Networks .

Fig. 1.4. Monitoring a person in a pervasive electronic health care Fig. 1.5. Organizing a sensor network database, while storing and processing
system, using (a) a local hub or (b) a continuous wireless connection. data (a) only at the operator's site or (b) only at the sensors.

23 Introduction to Distributed Systems - by Ayana O. Kitil 12/31/2020


Individual Assignment -I- (Q#1 & Q#2) + Exercise:
1. Compare and contrast the three types of distributed system.
2. Which goal(s) of distributed system is mostly used in your day-to-day
activities? How? Explain with example!
3. What is an important goal of distributed system?
4. What is the drawback of caching and replication that affect scalability?
5. How distributed system differs from traditional software?

24 Introduction to Distributed Systems - by Ayana O. Kitil 12/31/2020


Introduction to Distributed system

CHAPTER -2-
Architecture of Distributed Systems
Introduction
 Distributed systems are often complex pieces of software of which the
components are by definition dispersed across multiple machines.
 The organization of distributed systems is mostly about the software components
that constitute the system.
 These software architectures tell us how the various software components are to
be organized and how they should interact.
 The actual realization of a distributed system requires that we instantiate and
place software components on real machines.
 The final instantiation of a software architecture is also referred to as a system
architecture.

26 Introduction to Distributed Systems - by Ayana O. Kitil 12/31/2020


Architectural Styles
 The considering the logical organization of distributed systems into software

components, also referred to as software architecture.

 An architectural style is formulated in terms of components, the way that

components are connected to each other, the data exchanged between


components, and finally how these elements are jointly configured into a system.

 A component is a modular unit with well-defined required and provided

interfaces that is replaceable within its environment.

27 Introduction to Distributed Systems - by Ayana O. Kitil 12/31/2020


Architectural Styles, …(2)
 The important issue about a component for distributed systems is that it can be

replaced, provided we respect its interfaces.

 Example:

o A connector [mechanism that mediates communication, coordination among

components] can be formed by the facilities for (remote) procedure calls, message
passing, or streaming data.

28 Introduction to Distributed Systems - by Ayana O. Kitil 12/31/2020


Architectural Styles, …(3)
 There are four architectural styles in distributed systems.

1. Layered Architecture:
o It is the simplest layer.
o Components are organized in a layered fashion where a
component at layer L; is allowed to call components at
the underlying layer Li, but not the other way around.
o It is widely adopted by the networking community.
o An key observation is that control generally flows from
layer to layer: requests go down the hierarchy whereas
the results flow upward. Fig. 2.1. The layered architectural style.

29 Introduction to Distributed Systems - by Ayana O. Kitil 12/31/2020


Architectural Styles, …(4)
2. Object-Based Architecture:
o It is followed by a far looser organization.
o In essence, each object corresponds to what we have
defined as a component, and these components are
connected through a (remote) procedure call
mechanism.
o This software architecture matches the client-server
system architecture.
o The layered and object-based architectures still form
the most important styles for large software systems. Fig. 2.2. The object-based architectural style.

30 Introduction to Distributed Systems - by Ayana O. Kitil 12/31/2020


Architectural Styles, …(5)
3. Data-Centred Architecture:
o It evolves around the idea that processes communicate
through a common (passive or active) repository.
o Example:
 A wealth of networked applications have been developed
that rely on a shared distributed file system in which
virtually all communication takes place through files.
 Web-based distributed systems are largely data-centric:
processes communicate through the use of shared Web-
based data services.
o A shared data spaces is that processes are now also Fig. 2.3. The shared data-space architectural style.

decoupled in time: they need not both be active when


communication takes place.
31 Introduction to Distributed Systems - by Ayana O. Kitil 12/31/2020
Architectural Styles, …(6)
4. Event-Based Architecture:
o In this, processes essentially communicate through the
propagation of events, which optionally also carry data.
o For distributed systems, event propagation has generally
been associated with what are known as publish/ subscribe
systems.
o The processes publish events after which the middleware
ensures that only those processes that subscribed to those
events will receive them.
o Advantage: Fig. 2.4. The event-based architectural style.
 Processes are loosely coupled, i.e., in principle, they need not
explicitly refer to each other.

32 Introduction to Distributed Systems - by Ayana O. Kitil 12/31/2020


System Architecture:
 Deciding on software components, their interaction, and their placement leads 10
an instance of a software architecture, also called a system architecture.
 There are basically three types of system architecture in distributed system.

1. Centralized Architecture:
o In the basic client-server model, processes in a distributed system are divided into two
(possibly overlapping) groups.
a. A server is a process implementing a specific service, for example, a file system service or
a database service.
b. A client is a process that requests a service from a server by sending it a request and
subsequently waiting for the server's reply.
o This client-server interaction, also known as request-reply behaviour.

33 Introduction to Distributed Systems - by Ayana O. Kitil 12/31/2020


System Architecture, …(2)
1. Centralized Architecture, …(2)

Fig. 2.5. General interaction between a client and a server.

o Communication between a client and a server can be implemented by means of a


simple connectionless protocol when the underlying network is fairly reliable as in
many local-area networks.
o When an operation can be repeated multiple times without harm, it is said to be
idempotent.
34 Introduction to Distributed Systems - by Ayana O. Kitil 12/31/2020
System Architecture, …(3)
1. Centralized Architecture, …(3)
o The Client-Server application following a
layered architectural style has three levels.
a. User-Interface Level - contains all that is
necessary to directly interface with the user,
such as display management.
b. Processing Level - contains the applications.
c. Data Level - manages the actual data that is
being acted on.
o The simplest user-interface program is nothing
more than a character-based screen.
Fig. 2.6. The simplified organization of an Internet search
o Example – Internet Search Engine engine into three different layers.
35 Introduction to Distributed Systems - by Ayana O. Kitil 12/31/2020
System Architecture, …(4)
2. Centralized Architecture, …(4)
o Consider the following three-tiered architecture.

o Example – Web sites.


 In this case, a Web server acts
as an entry point to a site,
passing requests to an
application server where the
actual processing takes place.
 This application server, in tum,
interacts with a database server.
Fig. 2.7. An example of a server acting as client.

36 Introduction to Distributed Systems - by Ayana O. Kitil 12/31/2020


System Architecture, …(5)
2. Decentralized Architecture:
o Multi-tiered client-server architectures are a direct consequence of dividing
applications into a user-interface, processing components, and a data level.
o The characteristic feature of organizing a client-server application by placing logically
different components on different machines is called vertical distribution.
o The distribution of a client or server may be physically split up into logically
equivalent parts, but each part is operating on its own share of the complete data set,
thus balancing the load is called horizontal distribution.
o A modern system architecture that support horizontal distribution is known as peer-to-
peer systems.

37 Introduction to Distributed Systems - by Ayana O. Kitil 12/31/2020


System Architecture, …(6)
2. Decentralized Architecture, …(2)
o From a high-level perspective, the processes that constitute a peer-to-peer system are
all equal.
o As a consequence, much of the interaction between processes is symmetric: each
process will act as a client and a server at the same time (which is also referred to as
acting as a servant).
o In general, a process cannot communicate directly with an arbitrary other process, but
is required to send messages through the available communication channels.

38 Introduction to Distributed Systems - by Ayana O. Kitil 12/31/2020


System Architecture, …(3)
3. Hybrid Architecture:
o It is a combined form of client-server solutions with decentralized architectures.

o Consider the BitTorrent file-sharing system.


 BitTorrent is a peer-to-peer file downloading system.

 The basic idea is that when an end user is looking for a file, he downloads chunks of the file from other
users until the downloaded chunks can be assembled together yielding the complete file.
 An important design goal was to ensure collaboration.

 BitTorrent combines centralized with decentralized solutions.

39 Introduction to Distributed Systems - by Ayana O. Kitil 12/31/2020


Individual Assignment –II- (Q#1 & Q#4) + Exercise:
1. What are the similarity and difference between architectural style and system
architecture in distributed systems?
2. What is an overlay network in distributed system? Explain with respect to
decentralized architecture.
3. If a client and a server are placed far apart, we may see network latency dominating
overall performance. How can we tackle this problem?
4. What is a three-tiered client-server architecture?
5. What is the difference between a vertical distribution and a horizontal distribution?

Due Date: Monday, 11 January, 2021


Format: Handwritten on 1-A4 paper!
40 Introduction to Distributed Systems - by Ayana O. Kitil 12/31/2020

You might also like