Distributed Systems Types and Architectures, Processes 4 November 2014

Distributed Systems Types
and Architectures, Processes
4 November 2014
Lecture 2
Slide Credits: Maarten van Steen
4 November 2014
ISE 437/SE424: Distributed (Information) Systems
1
Topics for Today
• Types of Distributed Systems
– Distributed Information Systems
– Pervasive Systems
• Architectural Styles
• System Architectures
Source: TvS 1.3.2 – 2.2, 3.1
4 November 2014
ISE 437/SE424: Distributed (Information) Systems
2
Distributed Information Systems
Observation
The vast amount of distributed systems in use today are forms of
traditional information systems, that now integrate legacy systems.
Example: Transaction processing systems.
BEGIN TRANSACTION (server, transaction)
READ (transaction, file-1, data)
WRITE (transaction, file-2, data)
newData := MODIFIED (data)
IF WRONG (newData) THEN
ABORT TRANSACTION (transaction)
ELSE
WRITE (transaction, file-2, newData)
END TRANSACTION (transaction)
END IF
Note: Transactions form an atomic operation
4 November 2014
ISE 437/SE424: Distributed (Information) Systems
3
Transaction Processing Monitor
Observation
In many cases, the data involved in a transaction is distributed across
several servers. A TP Monitor is responsible for coordinating the
execution of a transaction
4 November 2014
ISE 437/SE424: Distributed (Information) Systems
4
Distr. IS: Enterprise Application Integration
Problem
A TP monitor doesn’t separate apps from their databases.
Also needed are facilities for direct communication
between apps.
• Remote Procedure Call (RPC)
• Message Oriented Middleware (MOM)
4 November 2014
ISE 437/SE424: Distributed (Information) Systems
5
Distributed Pervasive Systems
Observation
Emerging next-generation of distributed systems in which nodes are
small, mobile, and often embedded in a larger system characterized
by the fact that the system naturally blends into the user’s
environment.
Three (overlapping) subtypes
• Ubiquitous computing systems: pervasive and continuously present,
i.e., there is a continuous interaction between system and user.
• Mobile computing systems: pervasive, but emphasis is on the fact that
devices are inherently mobile.
• Sensor (and actuator) networks: pervasive, with emphasis on the
actual (collaborative) sensing and actuation of the environment.
4 November 2014
ISE 437/SE424: Distributed (Information) Systems
6
Ubiquitous Computing Systems
Basic Characteristics:
• Distribution: Devices are networked, distributed, and accessible
in a transparent manner
• Interaction: Interaction between users and devices is highly
unobtrusive
• Context awareness: The system is aware of a user’s context in
order to optimize interaction
• Autonomy: Devices operate autonomously without human
intervention, and are thus highly self-managed
• Intelligence: The system as a whole can handle a wide range of
dynamic actions and interactions
4 November 2014
ISE 437/SE424: Distributed (Information) Systems
7
Mobile Computing Systems
Observation
Mobile computing systems are generally a subclass of
ubiquitous computing systems and meet all of the five
requirements.
Typical Characteristics
• Many different types of mobile devices: smart phones,
remote controls, car equipment, etc.
• Wireless communication
• Devices may continuously change their location 
– setting up a route may be problematic, as routes can change
frequently
– devices may easily be temporarily disconnected  disruptiontolerant networks
4 November 2014
ISE 437/SE424: Distributed (Information) Systems
8
Sensor Networks
Characteristics
The nodes to which sensors are attached are:
• Many (10s-1000s)
• Simple (small memory/compute/communication capacity)
• Often battery-powered (or even battery-less)
4 November 2014
ISE 437/SE424: Distributed (Information) Systems
9
Sensor networks as distributed systems
4 November 2014
ISE 437/SE424: Distributed (Information) Systems
10
So Far
• Types of Distributed Systems
– Distributed Information Systems
– Pervasive Systems
• Architectural Styles
• System Architectures
4 November 2014
ISE 437/SE424: Distributed (Information) Systems
11
Architectural Styles
Basic Idea
Organize into logically different components and distribute
those components over the various machines
(a) Layered style is used for client-server system
(b) Object-based style for distributed object systems
4 November 2014
ISE 437/SE424: Distributed (Information) Systems
12
Architectural Styles
Observation
Decoupling process in space (“anonymous”) and also time
(“asynchronous”) has led to alternative styles.
(a) Publish/Subscribe [decoupled in space]
(b) Shared dataspace [decoupled in time and space]
4 November 2014
ISE 437/SE424: Distributed (Information) Systems
13
So Far
• Types of Distributed Systems
– Distributed Information Systems
– Pervasive Systems
• Architectural Styles
• System Architectures
4 November 2014
ISE 437/SE424: Distributed (Information) Systems
14
Centralized Architectures
Basic Client-Server Model
Characteristics:
• There are processes offering services (servers)
• There are processes that use services (clients)
• Clients and servers can be on different machines
• Clients follow request/reply model with respect to using services
4 November 2014
ISE 437/SE424: Distributed (Information) Systems
15
Application Layering
Traditional three-layered view
• User-interface layer contains units for an application’s
user interface
• Processing layer contains the functions of an application,
i.e. without specific data
• Data layer contains the data that a client wants to
manipulate through the application components
Observation
This layering is found in many distributed information
systems, using traditional database technology and
accompanying applications
4 November 2014
ISE 437/SE424: Distributed (Information) Systems
16
Application Layering
4 November 2014
ISE 437/SE424: Distributed (Information) Systems
17
Multi-Tiered Architectures
Single-tiered: dumb terminal/mainframe configuration
Two-tiered: client/single server configuration
Three-tiered: each layer on a separate machine
Traditional two-tiered configurations:
4 November 2014
ISE 437/SE424: Distributed (Information) Systems
18
Decentralized Architectures
Observation
In the last couple of years we have been seeing a
tremendous growth in peer-to-peer systems
• Structured P2P: nodes are organized following a specific
distributed data structure
• Unstructured P2P: nodes have randomly selected
neighbors
• Hybrid P2P: some nodes are appointed special functions
in a well-organized fashion
Note
In virtually all cases, we are dealing with overlay networks:
data is routed over connections setup between the nodes
(via application level multicasting)
4 November 2014
ISE 437/SE424: Distributed (Information) Systems
19
Structured P2P Systems
Basic idea
Organize the nodes in a structured overlay network such as
a logical ring and make specific nodes responsible for
services based only on their ID
Note
The system provides an operation
LOOKUP(key) that will efficiently
route the lookup request to the
associated node.
4 November 2014
ISE 437/SE424: Distributed (Information) Systems
20
Structured P2P Systems
Other example
Organize nodes in a hypercube
4 November 2014
ISE 437/SE424: Distributed (Information) Systems
21
Unstructured P2P Systems
Observation
Many unstructured P2P systems attempt to maintain a random overlay;
two nodes are linked with probability 𝑝.
Basic principles
Each node is required to contact a randomly selected other node:
• Let each peer maintain a partial view of the network, consisting of c
other nodes
• Each node P periodically selects a node Q from its partial view
• P and Q exchange information and exchange members from their
respective partial views
Note
It turns out that, depending on the exchange, randomness, but also
robustness can be maintained.
4 November 2014
ISE 437/SE424: Distributed (Information) Systems
22
Unstructured P2P Systems
Observation
We can no longer look up information deterministically; we
must resort to searching:
• Flooding: node 𝑢 sends a lookup query to all of its
neighbors. A neighbor responds, or forwards (floods) the
request. There are many variations:
– Limited flooding (maximal number of forwarding)
– Probabilistic flooding (flood only with a certain probability).
• Random walk: Randomly select a neighbor 𝑣. If 𝑣 has the
answer, it replies, otherwise 𝑣 randomly selects one of its
neighbors.
– Variation: parallel random walk. Works well with replicated data.
4 November 2014
ISE 437/SE424: Distributed (Information) Systems
23
Topology Management of Overlay Networks
Basic idea
Distinguish two layers: (1) maintain random partial views in lowest layer;
(2) be selective on who you keep in higher-layer partial view.
Note
Lower layer feeds upper layer with random nodes; upper layer is
selective when it comes to keeping references.
4 November 2014
ISE 437/SE424: Distributed (Information) Systems
24
Topology Management of Overlay Networks
Constructing a torus
Considering an 𝑁 × 𝑁 grid. Keep only references to nearest
neighbors:
| 𝑎1 , 𝑎2 − 𝑏1 , 𝑏2 | = 𝑑1 + 𝑑2
𝑑𝑖 = min⁡{𝑁 − 𝑎𝑖 − 𝑏𝑖 , 𝑎𝑖 − 𝑏𝑖 }
4 November 2014
ISE 437/SE424: Distributed (Information) Systems
25
Superpeers
Observation
Sometimes it helps to select a few nodes to do specific work:
superpeer
Examples
• Peers maintaining an
index (for search)
• Peers monitoring the
state of the network
• Peers able to setup
connections
4 November 2014
ISE 437/SE424: Distributed (Information) Systems
26
Conclusion
• Types of Distributed Systems
– Distributed Information Systems
– Pervasive Systems
• Architectural Styles
• System Architectures
4 November 2014
ISE 437/SE424: Distributed (Information) Systems
27