Chapter 02: Architectures: Distributed Systems Principles and Paradigms
Chapter 02: Architectures: Distributed Systems Principles and Paradigms
1 / 29
Architectures Architectures
Architectures
Architectural styles
Software architectures
Architectures versus middleware
Self-management in distributed systems
2 / 29 2 / 29
Architectural styles
Basic idea
Organize into logically different components, and distribute those
components over the various machines.
Layer N-1
Object Method call
Request Response
flow flow
Object
Layer 2
Object
Layer 1
(a) (b)
Architectural Styles
Observation
Decoupling processes in space (“anonymous”) and also time
(“asynchronous”) has led to alternative styles.
Component Component
Component Component
Publish Subscribe Data
Subscribe Notification
delivery
delivery
Event bus
Publish
Component
Shared (persistent) data space
(a) (b)
4 / 29 4 / 29
Centralized Architectures
Request Reply
Server
Provide service Time
5 / 29 5 / 29
Application Layering
Observation
This layering is found in many distributed information systems, using
traditional database technology and accompanying applications.
6 / 29 6 / 29
Architectures 2.2 System Architectures Architectures 2.2 System Architectures
Application Layering
User-interface
User interface level
HTML page
Keyword expression containing list
HTML
generator Processing
Query Ranked list level
generator of page titles
Ranking
Database queries algorithm
7 / 29 7 / 29
Multi-Tiered Architectures
User interface User interface User interface User interface User interface
Application Application Application
Database
User interface
Server machine
8 / 29 8 / 29
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 (cf. application-level
multicasting)
9 / 29 9 / 29
Architectures 2.2 System Architectures Architectures 2.2 System Architectures
0100
0101 1101
1100
0110 0111 1111
1110
Note
The system provides an operation LOOKUP(key) that will efficiently
route the lookup request to the associated node.
10 / 29 10 / 29
Essence
Many unstructured P2P systems are organized as a random overlay: two
nodes are linked with probability p.
Observation
We can no longer look up information deterministically, but will have to resort
to searching:
11 / 29 11 / 29
Superpeers
Observation
Sometimes it helps to select a few nodes to do specific work: superpeer.
Super peer
Overlay network of super peers
Weak peer
Examples
Peers maintaining an index (for search)
Peers monitoring the state of the network
Peers being able to setup connections
12 / 29 12 / 29
Architectures 2.2 System Architectures Architectures 2.2 System Architectures
Example
Edge-server architectures, which are often used for Content Delivery
Networks
ISP
ISP
Core Internet
Edge server
Enterprise network
13 / 29 13 / 29
Client node
K out of N nodes
Node 1
Lookup(F)
Basic idea
Once a node has identified where to download a file from, it joins a
swarm of downloaders who in parallel get file chunks from the source,
but also distribute these chunks amongst each other.
14 / 29 14 / 29
Architectures 2.3 Architectures versus Middleware Architectures 2.3 Architectures versus Middleware
Problem
In many cases, distributed systems/applications are developed
according to a specific architectural style. The chosen style may not be
optimal in all cases ⇒ need to (dynamically) adapt the behavior of the
middleware.
Interceptors
Intercept the usual flow of control when invoking a remote object.
15 / 29 15 / 29
Architectures 2.3 Architectures versus Middleware Architectures 2.3 Architectures versus Middleware
Interceptors
Client application
Intercepted call
B.do_something(value)
Application stub
Object middleware
Message-level interceptor
Local OS
To object B
16 / 29 16 / 29
Architectures 2.4 Self-management in Distributed Systems Architectures 2.4 Self-management in Distributed Systems
Observation
Distinction between system and software architectures blurs when
automatic adaptivity needs to be taken into account:
Self-configuration
Self-managing
Self-healing
Self-optimizing
Self-*
Warning
There is a lot of hype going on in this field of autonomic computing.
17 / 29 17 / 29
Architectures 2.4 Self-management in Distributed Systems Architectures 2.4 Self-management in Distributed Systems
Observation
In many cases, self-* systems are organized as a feedback control
system.
Analysis
Adjustment triggers Measured output
18 / 29 18 / 29
Architectures 2.4 Self-management in Distributed Systems Architectures 2.4 Self-management in Distributed Systems
Example: Globule
Globule
Collaborative CDN that analyzes traces to decide where replicas of
Web content should be placed. Decisions are driven by a general cost
model:
19 / 29 19 / 29
Architectures 2.4 Self-management in Distributed Systems Architectures 2.4 Self-management in Distributed Systems
Example: Globule
Client
Origin server
ISP
ISP
Core Internet
Replica server
Enterprise network
Client Client
20 / 29 20 / 29
Architectures Extra: Strategy evaluation in Globule Architectures Extra: Strategy evaluation in Globule
An experiment
Research question
Does it make sense to distribute each Web page according to its own
best strategy, instead of applying a single, overall distribution strategy
to all Web pages?
AS 1 AS 2 AS 3
Client
Origin
Clients in an server
Client AS of document’s
unknown AS origin server
21 / 29 21 / 29
Architectures Extra: Strategy evaluation in Globule Architectures Extra: Strategy evaluation in Globule
An experiment
22 / 29 22 / 29
Architectures Extra: Strategy evaluation in Globule Architectures Extra: Strategy evaluation in Globule
An experiment
23 / 29 23 / 29
Architectures Extra: Strategy evaluation in Globule Architectures Extra: Strategy evaluation in Globule
24 / 29 24 / 29
Architectures Extra: Strategy evaluation in Globule Architectures Extra: Strategy evaluation in Globule
25 / 29 25 / 29
Architectures Extra: Strategy evaluation in Globule Architectures Extra: Strategy evaluation in Globule
Turnaround time (TaT) and bandwidth (BW) in relative measures; stale documents as fraction of
total requested documents.
Site 1 Site 2
Strategy TaT Stale docs BW TaT Stale docs BW
NR 203 0 118 183 0 115
CV 227 0 113 190 0 100
CLV 182 0.0061 113 142 0.0060 100
CDV 182 0.0059 113 142 0.0057 100
SI 182 0 113 141 0 100
SU10 128 0 100 160 0 114
SU25 114 0 123 132 0 119
SU50 102 0 165 114 0 132
SU50+CLV 100 0.0011 165 100 0.0019 125
SU50+CDV 100 0.0011 165 100 0.0017 125
26 / 29 26 / 29
Architectures Extra: Strategy evaluation in Globule Architectures Extra: Strategy evaluation in Globule
SU50+CDV SU50
Total consumed bandwidth
SU50+CLV SU25
SI
Ideal
arrangement
CLV
Cost function
arrangements CDV
27 / 29 27 / 29
Architectures Extra: Strategy evaluation in Globule Architectures Extra: Strategy evaluation in Globule
SU50+CLV
SU50
Total consumed bandwidth
SU50+CDV
CLV
SU25
SU10
CDV
SI
Cost function arrangements
Ideal arrangement
28 / 29 28 / 29
Architectures Extra: Strategy evaluation in Globule Architectures Extra: Strategy evaluation in Globule
Useful strategies
29 / 29 29 / 29