DADIMOS College
Department of Computer Science
Introduction to Distributed System
Chapter One
Introduction
By Kelil Mohammed
Introduction
 Before the mid-80s, computers were
• very expensive (hundred of thousands or even millions of dollars)
• very slow (a few thousand instructions per second)
• not connected among themselves
 After the mid-80s: two major developments
• cheap and powerful microprocessor-based computers appeared
• computer networks
LANs at speeds ranging from 10 to 1000 Mbps
WANs at speed ranging from 64 Kbps to gigabits/sec
6/22/2023 By Kelil M. 2
Consequence
Feasibility of using a large network of computers to
work for the same application; this is in contrast to the
old centralized systems where there was a single
computer with its peripherals.
6/22/2023 By Kelil M. 3
Introduction…
Definition of a Distributed System
 A distributed system is: a collection of independent
computers that appears to its users as a single
coherent system - computer
 This definition has two aspects:
– hardware: autonomous machines
– software: a single system view for the users
6/22/2023 By Kelil M. 4
 A distributed system is a system designed to support the
development of applications and services which can exploit a
physical architecture consisting of multiple, autonomous
processing elements that do not share primary memory but
cooperate by sending asynchronous messages over a
communication network .
 Distributed system is one that stops you getting any work done
when a machine you’ve never even heard of crashes
6/22/2023 By Kelil M. 5
Other Definitions
Why Distributed?
 Resource and Data Sharing
 printers, databases, multimedia servers, ...
 Availability, Reliability
 the loss of some instances can be hidden
 Scalability, Extensibility
 the system grows with demand (e.g., extra servers)
 Performance
 huge power (CPU, memory, ...) available
6/22/2023 By Kelil M. 6
Examples of distributed Systems
 The Web over the Internet.
 Mobile telephony over cellular networks.
 Electronic funds transfer systems over special
purpose networks
– For example, between bank accounts, on credit card
purchases, via cash machines.
6/22/2023 By Kelil M. 7
Other Examples …
rlogin or telnet (for remote access)
network file system, network printer, etc.
ATM (cash machine)
Distributed databases
Network computing
Retail point-of-sale terminals
Air-traffic control
Enterprise computing etc., ….
Can you mention any other examples?
6/22/2023 By Kelil M. 8
Characteristics of Distributed Systems
 differences between the computers and the ways they
communicate are hidden from users
 users and applications can interact with a distributed
system in a consistent and uniform way regardless of
location
 distributed systems should be easy to expand and scale
 a distributed system is normally continuously available,
even if there may be partial failures
6/22/2023 By Kelil M. 9
Organization of a Distributed System
 To support heterogeneous computers and networks and to
provide a single-system view, a distributed system is often
organized by means of a layer of software called middleware
that extends over multiple machines.
6/22/2023 By Kelil M. 10
Organization of a distr…
6/22/2023 By Kelil M. 11
A distributed system organized as middleware;
note that the middleware layer extends over
multiple machines, and offers each application
the same interface
Goals of a distributed system
Supporting resource sharing
Making distribution transparent
Openness (being Open)
Scalability (Being Scalable)
6/22/2023 By Kelil M. 12
A distributed system should :
Be easily connect users with resources (printers,
computers, storage facilities, data, files, Web pages, ...)
 reasons: economics, to collaborate and exchange
information
be transparent: hide the fact that the resources and
processes are distributed across multiple computers
be open
be scalable
6/22/2023 By Kelil M. 13
Goals of a distributed system
Transparency in a Distributed System
 Software hides some of the details of the distribution of
system resources.
 Makes the system more user friendly.
 A distributed system that appears to its users &
applications to be a single computer system is said to
be transparent.
 Users & apps should be able to access remote
resources in the same way they access local
resources.
 Transparency has several dimensions.
6/22/2023 By Kelil M. 14
 Access transparency: hide differences in data
representation and the way that resources can be
accessed by users.
 Location transparency: hide where a resource is
physically located; where is
http://www.prenhall.com/index.html? (naming)
 Migration transparency : hide that a resource may move
to another location
 Relocation transparency: hide that a resource may be
moved to another location while in use;
• e.g., mobile users using their wireless laptops
6/22/2023 By Kelil M. 15
Different forms of transparency in a distributed system
Different forms of transparency…
Replication transparency: hide that a resource is
replicated
Concurrency transparency: hide that a resource
may be shared by several competitive users; a
resource must be left in a consistent state
Failure transparency: hide the failure and recovery
of a resource
Note: trying to achieve all distribution transparency
may be impossible or may not be a good
6/22/2023 By Kelil M. 16
Transparency Description
Access
Hide differences in data representation and how a
resource is accessed
Location Hide where an resource is located
Migration Hide that a resource may move to another location
Relocation
Hide that a resource may be moved to another
location while in use
Replication Hide that a resource is replicated
Concurrency
Hide that a resource may be shared by several
independent users
Failure Hide the failure and recovery of a resource
6/22/2023 By Kelil M. 17
Distribution transparency summary
 An Open Distributed System is a system that offers services
according to standard rules that describe the syntax and
semantics of those services.
 For 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, such services are often specified
through interfaces often described using an Interface
Definition Language (IDL)
 Syntax specifies the names of the functions, types of
parameters, return values, possible exceptions, ...
6/22/2023 By Kelil M. 18
Openness in a Distributed System
 Semantics are given in an informal way by means of natural
languages.(specifying precisely what those service do)
 Interface Definition/Description Languages (IDL): used to
describe the interfaces between software components,
usually in a distributed system
 Definitions are language & machine independent
 Support communication between systems using
different OS/programming languages;
• e.g. a C++ program running on Windows
communicates with a Java program running on UNIX
 Communication is usually RPC-based.
6/22/2023 By Kelil M. 19
Openness …
An open distributed system has the following goals:
well-defined interfaces
Interoperability
portability
it should be extensible
6/22/2023 By Kelil M. 20
Openness …
Interoperability
components of different origin can communicate
characterizes the extent by which two systems or
components from different manufacturers can co-exist
and work together as specified by a common
standard.
Portability
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
components work on different platforms
6/22/2023 By Kelil M. 21
Openness …
 An open distributed system should also be extensible.
it should be easy to add new components ;
replace existing ones without affecting those
components that stay in place;
easy to configure the system out of different
components.
6/22/2023 By Kelil M. 22
Achieving openness
 At least make the distributed system independent from
heterogeneity of the underlying environment:
Hardware
Platforms
Languages
6/22/2023 By Kelil M. 23
Scalability in Distributed Systems
 Scalability of a distributed system can be
measured in three different dimensions:
i. scalable with respect to its size,
A system can be scalable with respect to its size,
meaning that we can easily add more users and
resources to the system without any noticeable loss of
performance.
ii. Geographical scalability:
 A geographically scalable system is one in which
the users and resources may lie far apart, but the fact
that communication delays may not be significantly
noticed.
6/22/2023 By Kelil M. 24
Scalability…
iii. Administrative scalability:
An administratively scalable system is one that
can still be easily managed even if it spans many
independent administrative organizations.
 but a scalable system may exhibit performance problems
6/22/2023 By Kelil M. 25
Scaling Techniques
 how to solve scaling problems?
 the problem is mainly performance, and arises as a
result of limitations in the capacity of servers and
networks (for geographical scalability)
 three possible solutions:
 hiding communication latencies,
 distribution, and
 replication
6/22/2023 By Kelil M. 26
scalability problems
6/22/2023 By Kelil M. 27
Hide Communication Latencies
 Hiding communication latencies is applicable in the case
of geographical scalability ;
 try to avoid waiting for responses to remote service
requests
 let the requester do other useful job
 i.e., construct requesting applications that use only
asynchronous communication instead of synchronous
communication;
6/22/2023 By Kelil M. 28
Hide Com….
When a reply comes in, the application is
interrupted and a special handler is called to
complete the previously-issued request.
Asynchronous communication can often be used in
batch-processing systems and parallel applications,
in which more or less independent tasks can be
scheduled for execution while another task is
waiting for communication to complete
6/22/2023 By Kelil M. 29
(a) server checking the correctness of field entries
(b) a client doing the job
e.g., checking the completeness of mandatory fields
– shipping code is now supported in Web applications using
Java Applets and Javascript
6/22/2023 By Kelil M. 30
Distribution
 Distribution involves taking a component, splitting it into
smaller parts, and subsequently spreading those parts
across the system.
 Partition data and computations across multiple machines:
Move computations to clients (Java applets)
Decentralized naming services (DNS)
Decentralized information systems (WWW)
 Example: DNS - Domain Name System
(xx@cs.aau.edu.et)
divide the name space into non-overlapping zones
More on chapter 5: Naming
6/22/2023 By Kelil M. 31
Distribution…
6/22/2023 By Kelil M. 32
an example of dividing the DNS name space into zones
Replication
 Replication: multiple identical copies of something
 Replicated objects may also be distributed, but aren’t
necessarily.
 Replication
 Increases availability
 Improves performance through load balancing
 May avoid latency by improving proximity of resource
 lead to better performance
6/22/2023 By Kelil M. 33
Replication…
Caching
 caching is a special form of replication
 Reduce communication latency
 Normally creates a temporary replica of something closer
to the user
 Replication is often more permanent
 User (client system) decides to cache, server system decides
to replicate
 Both caching and replication lead to consistency problems
6/22/2023 By Kelil M. 34
Pitfalls when Developing Distributed Systems
 False assumptions made by first time developers
 The network is reliable
 The network is secure
 The network is homogeneous
 The topology does not change
 Latency is zero
 Bandwidth is infinite
 Transport cost is zero
 There is one administrator
6/22/2023 By Kelil M. 35
Types of Distributed Systems
Three types:
distributed computing systems,
distributed information systems
distributed pervasive systems
6/22/2023 By Kelil M. 36
 Used for high-performance computing tasks
 There are two types of distributed computing system:
cluster computing and grid computing
Cluster Computing
 a collection of similar workstations or PCs closely connected
by means of a high-speed LAN
 each node runs the same operating system
 Its characteristic feature is its homogeneity.
 is used for parallel programming in which a single compute
intensive program is run in parallel on multiple machines
 Each cluster consists of a collection of compute nodes that are
controlled and accessed by means of a single master node.
6/22/2023 By Kelil M. 37
Distributed Computing Systems
Cont’d…
6/22/2023 By Kelil M. 38
An example of a cluster computing system
Grid Computing
 “Resource sharing and coordinated problem solving in dynamic,
multi-institutional virtual organizations”.
 It is done by joining forces despite the geographical distance,
the distributed teams are able to contribute their own
resources so as to achieve a bigger effort.
 highly heterogeneous with respect to hardware, software (OS) ,
networks, administrative domains and security policies.
6/22/2023 By Kelil M. 39
 all computing resources do not have to work on the same
specific task, but can work on sub-tasks that collectively
make up the end goal.
 For example, a research team might analyse weather
patterns in the North Atlantic region, while another
team analyses the south Atlantic region, and both results
can be combined to deliver a complete picture of
Atlantic weather patterns.
6/22/2023 By Kelil M. 40
Distributed Information Systems
 a networked application simply consisted of a server
running that application and making it available to remote
programs, called clients.
 clients could send a request to the server for executing a
specific operation, after which a response would be sent
back.
 Integration at the lowest level would allow clients to wrap
a number of requests, possibly for different servers, into a
single larger request and have it executed as a distributed
transaction.
 The key idea was that all, or none of the requests would
be executed.
6/22/2023 By Kelil M. 41
Cont’d…
 As applications became more sophisticated and were
gradually separated into Independent components
(database components from processing components), it
became clear that integration should also take place by
letting applications communicate directly with each other.
 This has now led to a huge industry that concentrates on
enterprise application integration (EAl).
 Distributed Information System has two categories
 Transaction Processing Systems and
 Enterprise Application Integration
6/22/2023 By Kelil M. 42
Transaction Processing Systems
 Operations on a database are usually carried out in the
form of transactions.
 Programming using transactions requires special primitives
that must either be supplied by the underlying distributed
system or by the language runtime system.
 The exact list of primitives depends on what kinds of
objects are being used in the transaction.
 In a mail system, there might be primitives to send, receive,
and forward mail.
6/22/2023 By Kelil M. 43
 Typical examples of primitives for transaction are shown
in table below.
6/22/2023 By Kelil M. 44
Cont’d…
The Transaction Model
 The model for transactions comes from the world of
business
 A supplier and a retailer negotiate on
 Price
 delivery date
 Quality, etc.
 until the deal is concluded they can continue negotiating
or one of them can terminate
 but once they have reached an agreement they are bound
by law to carry out their part of the deal
 transactions between processes is similar with this
scenario
6/22/2023 By Kelil M. 45
e.g., assume the following banking operation
– withdraw an amount x from account 1
– deposit the amount x to account 2
 what happens if there is a problem after the first activity is
carried out?
 group the two operations into one transaction; either
both are carried out or neither
 we need a way to roll back when a transaction is not
completed
6/22/2023 By Kelil M. 46
The Transaction Model …
The Transaction Model…
6/22/2023 By Kelil M. 47
e.g. reserving a seat from White Plains to Malindi
through JFK and Nairobi airports
(a)transaction to reserve three flights commits
(b)transaction aborts when third flight is unavailable
 Properties of transactions, often referred to as ACID
Atomic: to the outside world, the transaction happens
indivisibly;
 a transaction either happens completely or not at all;
 intermediate states are not seen by other processes
Consistent: the transaction does not violate system invariants;
 invariants are preserved
 e.g., in an internal transfer in a bank, the amount of
money in the bank must be the same as it was before the
transfer (the law of conservation of money); this may be
violated for a brief period of time, but not seen to other
processes
6/22/2023 By Kelil M. 48
Properties of transactions
Properties of …
Isolated or Serializable: concurrent transactions do not
interfere with each other;
 if two or more transactions are running at the same
time, the final result must look as though all
transactions run sequentially in some order
Durable: once a transaction commits, the changes are
permanent.
 committed operations can’t be undone
6/22/2023 By Kelil M. 49
 a transaction could be flat, nested or distributed
Flat Transaction
 consists of a series of operations that satisfy the ACID
properties
 simple and widely used but with some limitations
 do not allow partial results to be committed or aborted
 i.e., atomicity is also partly a weakness
 some transactions may take too much time
6/22/2023 By Kelil M. 50
Classification of Transactions
Nested Transaction
 constructed from a number of sub-transactions; it is
logically decomposed into a hierarchy of sub-
transactions
 the top-level transaction forks off children that run in
parallel, on different machines; to gain performance or
for programming simplicity
 each may also execute one or more sub-transactions
 permanence (durability) applies only to the top-level
transaction; commits by children should be undone
6/22/2023 By Kelil M. 51
Classification of Transactions …
Classification of Transactions …
 Distributed Transaction
 a flat transaction that operates on data that are
distributed across multiple machines
 problem: separate algorithms are needed to handle the
locking of data and committing the entire transaction;
6/22/2023 By Kelil M. 52
(a) a nested transaction
(b) distributed transaction
6/22/2023 By Kelil M. 53
Cont’d…
• Enterprise Application Integration
• how to integrate applications independent from their databases
• transaction systems rely on request/reply
• how can applications communicate with each other
6/22/2023 By Kelil M. 54
middleware as a communication facilitator in enterprise
application integration
there are different communication models
– RPC (Remote procedure Call)
– RMI (Remote Method Invocation)
– MOM (Message-Oriented Communication)
 We will see later in Chapter 4
6/22/2023 By Kelil M. 55
Distributed Pervasive Systems
 the distributed systems discussed so far are characterized
by their stability; fixed nodes having high-quality
connection to a network
 there are also mobile and embedded computing devices
with wireless connections
 Distributed Pervasive System is likely to incorporate small,
battery-powered, mobile devices
6/22/2023 By Kelil M. 56
Distributed Pervasive ….
three requirements for pervasive applications
 embrace contextual changes:
 a device is aware that its environment may change all the time
 encourage ad hoc composition:
 devices are used in different ways by different users
 recognize sharing as the default:
 devices join a system to access or provide information
 Examples of pervasive system are:
 Home systems
 Electronic health care systems – patient monitoring
 Sensor networks – data collection, surveillance
6/22/2023 By Kelil M. 57
Home System
Built around one or more PCs, but can also
include other electronic devices:
– Automatic control of lighting, sprinkler systems,
alarm systems, etc.
– Network enabled appliances
– PDAs and smart phones, etc.
6/22/2023 By Kelil M. 58
Electronic Health Care Systems
Figure .Monitoring a person in a pervasive electronic health
care system, using
(a) a local hub or
(b) a continuous wireless connection.
6/22/2023 By Kelil M. 59
Sensor Networks
 A collection of geographically distributed nodes consisting
of a comm. device, a power source, some kind of sensor, a
small processor…
 Purpose: to collectively monitor sensory data
(temperature, sound, moisture etc.,) and transmit the data
to a base station
 “smart environment” – the nodes may do some
rudimentary processing of the data in addition to their
communication responsibilities.
6/22/2023 By Kelil M. 60
Sensor Networks …
Figure .Organizing a sensor network database, while storing and
processing data (a) only at the operator’s site or …
6/22/2023 By Kelil M. 61
Sensor Networks ….
Figure. Organizing a sensor network database, while storing and
processing data … or (b) only at the sensors.
6/22/2023 By Kelil M. 62
===End of chapter One===
6/22/2023 By Kelil M. 63

Chapter 1 Introduction- DS.pptx

  • 1.
    DADIMOS College Department ofComputer Science Introduction to Distributed System Chapter One Introduction By Kelil Mohammed
  • 2.
    Introduction  Before themid-80s, computers were • very expensive (hundred of thousands or even millions of dollars) • very slow (a few thousand instructions per second) • not connected among themselves  After the mid-80s: two major developments • cheap and powerful microprocessor-based computers appeared • computer networks LANs at speeds ranging from 10 to 1000 Mbps WANs at speed ranging from 64 Kbps to gigabits/sec 6/22/2023 By Kelil M. 2
  • 3.
    Consequence Feasibility of usinga large network of computers to work for the same application; this is in contrast to the old centralized systems where there was a single computer with its peripherals. 6/22/2023 By Kelil M. 3 Introduction…
  • 4.
    Definition of aDistributed System  A distributed system is: a collection of independent computers that appears to its users as a single coherent system - computer  This definition has two aspects: – hardware: autonomous machines – software: a single system view for the users 6/22/2023 By Kelil M. 4
  • 5.
     A distributedsystem is a system designed to support the development of applications and services which can exploit a physical architecture consisting of multiple, autonomous processing elements that do not share primary memory but cooperate by sending asynchronous messages over a communication network .  Distributed system is one that stops you getting any work done when a machine you’ve never even heard of crashes 6/22/2023 By Kelil M. 5 Other Definitions
  • 6.
    Why Distributed?  Resourceand Data Sharing  printers, databases, multimedia servers, ...  Availability, Reliability  the loss of some instances can be hidden  Scalability, Extensibility  the system grows with demand (e.g., extra servers)  Performance  huge power (CPU, memory, ...) available 6/22/2023 By Kelil M. 6
  • 7.
    Examples of distributedSystems  The Web over the Internet.  Mobile telephony over cellular networks.  Electronic funds transfer systems over special purpose networks – For example, between bank accounts, on credit card purchases, via cash machines. 6/22/2023 By Kelil M. 7
  • 8.
    Other Examples … rloginor telnet (for remote access) network file system, network printer, etc. ATM (cash machine) Distributed databases Network computing Retail point-of-sale terminals Air-traffic control Enterprise computing etc., …. Can you mention any other examples? 6/22/2023 By Kelil M. 8
  • 9.
    Characteristics of DistributedSystems  differences between the computers and the ways they communicate are hidden from users  users and applications can interact with a distributed system in a consistent and uniform way regardless of location  distributed systems should be easy to expand and scale  a distributed system is normally continuously available, even if there may be partial failures 6/22/2023 By Kelil M. 9
  • 10.
    Organization of aDistributed System  To support heterogeneous computers and networks and to provide a single-system view, a distributed system is often organized by means of a layer of software called middleware that extends over multiple machines. 6/22/2023 By Kelil M. 10
  • 11.
    Organization of adistr… 6/22/2023 By Kelil M. 11 A distributed system organized as middleware; note that the middleware layer extends over multiple machines, and offers each application the same interface
  • 12.
    Goals of adistributed system Supporting resource sharing Making distribution transparent Openness (being Open) Scalability (Being Scalable) 6/22/2023 By Kelil M. 12
  • 13.
    A distributed systemshould : Be easily connect users with resources (printers, computers, storage facilities, data, files, Web pages, ...)  reasons: economics, to collaborate and exchange information be transparent: hide the fact that the resources and processes are distributed across multiple computers be open be scalable 6/22/2023 By Kelil M. 13 Goals of a distributed system
  • 14.
    Transparency in aDistributed System  Software hides some of the details of the distribution of system resources.  Makes the system more user friendly.  A distributed system that appears to its users & applications to be a single computer system is said to be transparent.  Users & apps should be able to access remote resources in the same way they access local resources.  Transparency has several dimensions. 6/22/2023 By Kelil M. 14
  • 15.
     Access transparency:hide differences in data representation and the way that resources can be accessed by users.  Location transparency: hide where a resource is physically located; where is http://www.prenhall.com/index.html? (naming)  Migration transparency : hide that a resource may move to another location  Relocation transparency: hide that a resource may be moved to another location while in use; • e.g., mobile users using their wireless laptops 6/22/2023 By Kelil M. 15 Different forms of transparency in a distributed system
  • 16.
    Different forms oftransparency… Replication transparency: hide that a resource is replicated Concurrency transparency: hide that a resource may be shared by several competitive users; a resource must be left in a consistent state Failure transparency: hide the failure and recovery of a resource Note: trying to achieve all distribution transparency may be impossible or may not be a good 6/22/2023 By Kelil M. 16
  • 17.
    Transparency Description Access Hide differencesin data representation and how a resource is accessed Location Hide where an resource is located Migration Hide that a resource may move to another location Relocation Hide that a resource may be moved to another location while in use Replication Hide that a resource is replicated Concurrency Hide that a resource may be shared by several independent users Failure Hide the failure and recovery of a resource 6/22/2023 By Kelil M. 17 Distribution transparency summary
  • 18.
     An OpenDistributed System is a system that offers services according to standard rules that describe the syntax and semantics of those services.  For 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, such services are often specified through interfaces often described using an Interface Definition Language (IDL)  Syntax specifies the names of the functions, types of parameters, return values, possible exceptions, ... 6/22/2023 By Kelil M. 18 Openness in a Distributed System
  • 19.
     Semantics aregiven in an informal way by means of natural languages.(specifying precisely what those service do)  Interface Definition/Description Languages (IDL): used to describe the interfaces between software components, usually in a distributed system  Definitions are language & machine independent  Support communication between systems using different OS/programming languages; • e.g. a C++ program running on Windows communicates with a Java program running on UNIX  Communication is usually RPC-based. 6/22/2023 By Kelil M. 19
  • 20.
    Openness … An opendistributed system has the following goals: well-defined interfaces Interoperability portability it should be extensible 6/22/2023 By Kelil M. 20
  • 21.
    Openness … Interoperability components ofdifferent origin can communicate characterizes the extent by which two systems or components from different manufacturers can co-exist and work together as specified by a common standard. Portability 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 components work on different platforms 6/22/2023 By Kelil M. 21
  • 22.
    Openness …  Anopen distributed system should also be extensible. it should be easy to add new components ; replace existing ones without affecting those components that stay in place; easy to configure the system out of different components. 6/22/2023 By Kelil M. 22
  • 23.
    Achieving openness  Atleast make the distributed system independent from heterogeneity of the underlying environment: Hardware Platforms Languages 6/22/2023 By Kelil M. 23
  • 24.
    Scalability in DistributedSystems  Scalability of a distributed system can be measured in three different dimensions: i. scalable with respect to its size, A system can be scalable with respect to its size, meaning that we can easily add more users and resources to the system without any noticeable loss of performance. ii. Geographical scalability:  A geographically scalable system is one in which the users and resources may lie far apart, but the fact that communication delays may not be significantly noticed. 6/22/2023 By Kelil M. 24
  • 25.
    Scalability… iii. Administrative scalability: Anadministratively scalable system is one that can still be easily managed even if it spans many independent administrative organizations.  but a scalable system may exhibit performance problems 6/22/2023 By Kelil M. 25
  • 26.
    Scaling Techniques  howto solve scaling problems?  the problem is mainly performance, and arises as a result of limitations in the capacity of servers and networks (for geographical scalability)  three possible solutions:  hiding communication latencies,  distribution, and  replication 6/22/2023 By Kelil M. 26
  • 27.
  • 28.
    Hide Communication Latencies Hiding communication latencies is applicable in the case of geographical scalability ;  try to avoid waiting for responses to remote service requests  let the requester do other useful job  i.e., construct requesting applications that use only asynchronous communication instead of synchronous communication; 6/22/2023 By Kelil M. 28
  • 29.
    Hide Com…. When areply comes in, the application is interrupted and a special handler is called to complete the previously-issued request. Asynchronous communication can often be used in batch-processing systems and parallel applications, in which more or less independent tasks can be scheduled for execution while another task is waiting for communication to complete 6/22/2023 By Kelil M. 29
  • 30.
    (a) server checkingthe correctness of field entries (b) a client doing the job e.g., checking the completeness of mandatory fields – shipping code is now supported in Web applications using Java Applets and Javascript 6/22/2023 By Kelil M. 30
  • 31.
    Distribution  Distribution involvestaking a component, splitting it into smaller parts, and subsequently spreading those parts across the system.  Partition data and computations across multiple machines: Move computations to clients (Java applets) Decentralized naming services (DNS) Decentralized information systems (WWW)  Example: DNS - Domain Name System (xx@cs.aau.edu.et) divide the name space into non-overlapping zones More on chapter 5: Naming 6/22/2023 By Kelil M. 31
  • 32.
    Distribution… 6/22/2023 By KelilM. 32 an example of dividing the DNS name space into zones
  • 33.
    Replication  Replication: multipleidentical copies of something  Replicated objects may also be distributed, but aren’t necessarily.  Replication  Increases availability  Improves performance through load balancing  May avoid latency by improving proximity of resource  lead to better performance 6/22/2023 By Kelil M. 33
  • 34.
    Replication… Caching  caching isa special form of replication  Reduce communication latency  Normally creates a temporary replica of something closer to the user  Replication is often more permanent  User (client system) decides to cache, server system decides to replicate  Both caching and replication lead to consistency problems 6/22/2023 By Kelil M. 34
  • 35.
    Pitfalls when DevelopingDistributed Systems  False assumptions made by first time developers  The network is reliable  The network is secure  The network is homogeneous  The topology does not change  Latency is zero  Bandwidth is infinite  Transport cost is zero  There is one administrator 6/22/2023 By Kelil M. 35
  • 36.
    Types of DistributedSystems Three types: distributed computing systems, distributed information systems distributed pervasive systems 6/22/2023 By Kelil M. 36
  • 37.
     Used forhigh-performance computing tasks  There are two types of distributed computing system: cluster computing and grid computing Cluster Computing  a collection of similar workstations or PCs closely connected by means of a high-speed LAN  each node runs the same operating system  Its characteristic feature is its homogeneity.  is used for parallel programming in which a single compute intensive program is run in parallel on multiple machines  Each cluster consists of a collection of compute nodes that are controlled and accessed by means of a single master node. 6/22/2023 By Kelil M. 37 Distributed Computing Systems
  • 38.
    Cont’d… 6/22/2023 By KelilM. 38 An example of a cluster computing system
  • 39.
    Grid Computing  “Resourcesharing and coordinated problem solving in dynamic, multi-institutional virtual organizations”.  It is done by joining forces despite the geographical distance, the distributed teams are able to contribute their own resources so as to achieve a bigger effort.  highly heterogeneous with respect to hardware, software (OS) , networks, administrative domains and security policies. 6/22/2023 By Kelil M. 39
  • 40.
     all computingresources do not have to work on the same specific task, but can work on sub-tasks that collectively make up the end goal.  For example, a research team might analyse weather patterns in the North Atlantic region, while another team analyses the south Atlantic region, and both results can be combined to deliver a complete picture of Atlantic weather patterns. 6/22/2023 By Kelil M. 40
  • 41.
    Distributed Information Systems a networked application simply consisted of a server running that application and making it available to remote programs, called clients.  clients could send a request to the server for executing a specific operation, after which a response would be sent back.  Integration at the lowest level would allow clients to wrap a number of requests, possibly for different servers, into a single larger request and have it executed as a distributed transaction.  The key idea was that all, or none of the requests would be executed. 6/22/2023 By Kelil M. 41
  • 42.
    Cont’d…  As applicationsbecame more sophisticated and were gradually separated into Independent components (database components from processing components), it became clear that integration should also take place by letting applications communicate directly with each other.  This has now led to a huge industry that concentrates on enterprise application integration (EAl).  Distributed Information System has two categories  Transaction Processing Systems and  Enterprise Application Integration 6/22/2023 By Kelil M. 42
  • 43.
    Transaction Processing Systems Operations on a database are usually carried out in the form of transactions.  Programming using transactions requires special primitives that must either be supplied by the underlying distributed system or by the language runtime system.  The exact list of primitives depends on what kinds of objects are being used in the transaction.  In a mail system, there might be primitives to send, receive, and forward mail. 6/22/2023 By Kelil M. 43
  • 44.
     Typical examplesof primitives for transaction are shown in table below. 6/22/2023 By Kelil M. 44 Cont’d…
  • 45.
    The Transaction Model The model for transactions comes from the world of business  A supplier and a retailer negotiate on  Price  delivery date  Quality, etc.  until the deal is concluded they can continue negotiating or one of them can terminate  but once they have reached an agreement they are bound by law to carry out their part of the deal  transactions between processes is similar with this scenario 6/22/2023 By Kelil M. 45
  • 46.
    e.g., assume thefollowing banking operation – withdraw an amount x from account 1 – deposit the amount x to account 2  what happens if there is a problem after the first activity is carried out?  group the two operations into one transaction; either both are carried out or neither  we need a way to roll back when a transaction is not completed 6/22/2023 By Kelil M. 46 The Transaction Model …
  • 47.
    The Transaction Model… 6/22/2023By Kelil M. 47 e.g. reserving a seat from White Plains to Malindi through JFK and Nairobi airports (a)transaction to reserve three flights commits (b)transaction aborts when third flight is unavailable
  • 48.
     Properties oftransactions, often referred to as ACID Atomic: to the outside world, the transaction happens indivisibly;  a transaction either happens completely or not at all;  intermediate states are not seen by other processes Consistent: the transaction does not violate system invariants;  invariants are preserved  e.g., in an internal transfer in a bank, the amount of money in the bank must be the same as it was before the transfer (the law of conservation of money); this may be violated for a brief period of time, but not seen to other processes 6/22/2023 By Kelil M. 48 Properties of transactions
  • 49.
    Properties of … Isolatedor Serializable: concurrent transactions do not interfere with each other;  if two or more transactions are running at the same time, the final result must look as though all transactions run sequentially in some order Durable: once a transaction commits, the changes are permanent.  committed operations can’t be undone 6/22/2023 By Kelil M. 49
  • 50.
     a transactioncould be flat, nested or distributed Flat Transaction  consists of a series of operations that satisfy the ACID properties  simple and widely used but with some limitations  do not allow partial results to be committed or aborted  i.e., atomicity is also partly a weakness  some transactions may take too much time 6/22/2023 By Kelil M. 50 Classification of Transactions
  • 51.
    Nested Transaction  constructedfrom a number of sub-transactions; it is logically decomposed into a hierarchy of sub- transactions  the top-level transaction forks off children that run in parallel, on different machines; to gain performance or for programming simplicity  each may also execute one or more sub-transactions  permanence (durability) applies only to the top-level transaction; commits by children should be undone 6/22/2023 By Kelil M. 51 Classification of Transactions …
  • 52.
    Classification of Transactions…  Distributed Transaction  a flat transaction that operates on data that are distributed across multiple machines  problem: separate algorithms are needed to handle the locking of data and committing the entire transaction; 6/22/2023 By Kelil M. 52
  • 53.
    (a) a nestedtransaction (b) distributed transaction 6/22/2023 By Kelil M. 53 Cont’d…
  • 54.
    • Enterprise ApplicationIntegration • how to integrate applications independent from their databases • transaction systems rely on request/reply • how can applications communicate with each other 6/22/2023 By Kelil M. 54 middleware as a communication facilitator in enterprise application integration
  • 55.
    there are differentcommunication models – RPC (Remote procedure Call) – RMI (Remote Method Invocation) – MOM (Message-Oriented Communication)  We will see later in Chapter 4 6/22/2023 By Kelil M. 55
  • 56.
    Distributed Pervasive Systems the distributed systems discussed so far are characterized by their stability; fixed nodes having high-quality connection to a network  there are also mobile and embedded computing devices with wireless connections  Distributed Pervasive System is likely to incorporate small, battery-powered, mobile devices 6/22/2023 By Kelil M. 56
  • 57.
    Distributed Pervasive …. threerequirements for pervasive applications  embrace contextual changes:  a device is aware that its environment may change all the time  encourage ad hoc composition:  devices are used in different ways by different users  recognize sharing as the default:  devices join a system to access or provide information  Examples of pervasive system are:  Home systems  Electronic health care systems – patient monitoring  Sensor networks – data collection, surveillance 6/22/2023 By Kelil M. 57
  • 58.
    Home System Built aroundone or more PCs, but can also include other electronic devices: – Automatic control of lighting, sprinkler systems, alarm systems, etc. – Network enabled appliances – PDAs and smart phones, etc. 6/22/2023 By Kelil M. 58
  • 59.
    Electronic Health CareSystems Figure .Monitoring a person in a pervasive electronic health care system, using (a) a local hub or (b) a continuous wireless connection. 6/22/2023 By Kelil M. 59
  • 60.
    Sensor Networks  Acollection of geographically distributed nodes consisting of a comm. device, a power source, some kind of sensor, a small processor…  Purpose: to collectively monitor sensory data (temperature, sound, moisture etc.,) and transmit the data to a base station  “smart environment” – the nodes may do some rudimentary processing of the data in addition to their communication responsibilities. 6/22/2023 By Kelil M. 60
  • 61.
    Sensor Networks … Figure.Organizing a sensor network database, while storing and processing data (a) only at the operator’s site or … 6/22/2023 By Kelil M. 61
  • 62.
    Sensor Networks …. Figure.Organizing a sensor network database, while storing and processing data … or (b) only at the sensors. 6/22/2023 By Kelil M. 62
  • 63.
    ===End of chapterOne=== 6/22/2023 By Kelil M. 63