Architectures
Architectures
Architectural styles
Software architectures
Architectures versus middleware
Self-management in distributed systems
2 / 29
Architectures
Architectural styles
Basic idea
Organize into logically different components, and distribute those
components over the various machines.
Layer N
Object
Object
Layer N-1
Method call
Object
Request
flow
Response
flow
Object
Layer 2
Object
Layer 1
(a)
(b)
Architectures
Architectural Styles
Observation
Decoupling processes in space (anonymous) and also time
(asynchronous) has led to alternative styles.
Component
Component
Notification
delivery
Subscribe
Component
Publish
Component
Subscribe
Data
delivery
Event bus
Publish
Component
(a)
(b)
Architectures
Centralized Architectures
Basic ClientServer 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 wrt to using services
Wait for result
Client
Request
Reply
Server
Provide service
Time
5 / 29
Architectures
Application Layering
Traditional three-layered view
User-interface layer contains units for an applications 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.
6 / 29
Architectures
Application Layering
User-interface
level
User interface
Keyword expression
HTML page
containing list
HTML
generator
Query
generator
Database queries
Database
with Web pages
Ranked list
of page titles
Processing
level
Ranking
algorithm
Web page titles
with meta-information
Data level
7 / 29
Architectures
Multi-Tiered Architectures
Single-tiered: dumb terminal/mainframe configuration
Two-tiered: client/single server configuration
Three-tiered: each layer on separate machine
Traditional two-tiered configurations:
Client machine
User interface
User interface
User interface
User interface
User interface
Application
Application
Application
Database
User interface
Application
Application
Application
Database
Database
Database
Database
Database
(d)
(e)
Server machine
(a)
(b)
(c)
8 / 29
Architectures
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
Architectures
0000
0001
1001
1000
0010
0011
1011
1010
0100
1101
0101
0110
1100
0111
1111
1110
Note
The system provides an operation LOOKUP(key) that will efficiently
route the lookup request to the associated node.
10 / 29
Architectures
Architectures
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
Architectures
Content provider
ISP
ISP
Core Internet
Edge server
Enterprise network
13 / 29
Architectures
Client node
K out of N nodes
Node 1
Lookup(F)
A BitTorrent
Web page
Web server
Ref. to
file
server
.torrent file
for F
File server
Ref. to
tracker
List of nodes
storing F
Tracker
Node 2
Node N
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
Architectures
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
Architectures
Interceptors
Client application
Intercepted call
B.do_something(value)
Application stub
Request-level interceptor
Nonintercepted call
invoke(B, &do_something, value)
Object middleware
Message-level interceptor
Local OS
To object B
16 / 29
Architectures
17 / 29
Architectures
Initial configuration
+/-
Corrections
+/-
Observed output
+/-
Adjustment
measures
Reference input
Metric
estimation
Analysis
Adjustment triggers
Measured output
18 / 29
Architectures
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:
cost = (w1 m1 ) + (w2 m2 ) + + (wn mn )
19 / 29
Architectures
Example: Globule
Client
Origin server
ISP
ISP
Core Internet
Replica server
Enterprise network
Client
Client
Architectures
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
Client
Client
Client
Client
Edge
server
Client
Client
Client
Client
Client
Client
Edge
server
Origin
server
Client
Client
Client
Edge
server
Client
Clients in an
unknown AS
AS 3
AS 2
AS of documents
origin server
Client
21 / 29
Architectures
An experiment
We collected traces on requests and updates for all Web pages
from two different servers (in Amsterdam and Erlangen)
For each request, we checked:
From which autonomous system it came
What the average delay was to that client
What the average bandwidth was to the clients AS (randomly
taking 5 clients from that AS)
Pages that were requested less than 10 times were removed from
the experiment.
We replayed the trace file for many different system
configurations, and many different distribution scenarios.
22 / 29
Architectures
An experiment
Issue
Start date
End date
Duration (days)
Number of documents
Number of requests
Number of updates
Number of ASes
Site 1
13/9/1999
18/12/1999
96
33,266
4,858,369
11,612
2567
Site 2
20/3/2000
11/9/2000
175
22,637
1,599,777
3338
1480
23 / 29
Architectures
Name
No replication
CV
Verification
CLV
Limited validity
CDV
Delayed
verification
Description
No replication or caching takes place. All
clients forward their requests directly to the
origin server.
Edge servers cache documents. At each
subsequent request, the origin server is
contacted for revalidation.
Edge servers cache documents. A cached
document has an associated expire time
before it becomes invalid and is removed from
the cache.
Edge servers cache documents. A cached
document has an associated expire time after
which the origin server is contacted for
revalidation.
24 / 29
Architectures
Abbr.
SI
Name
Server
invalidation
SUx
Server updates
SU50 +
CLV
SU50 +
CDV
Description
Edge servers cache documents, but the origin
server invalidates cached copies when the
document is updated.
The origin server maintains copies at the x
most relevant edge servers; x = 10, 25 or 50
The origin server maintains copies at the 50
most relevant edge servers; the other
intermediate servers follow the CLV strategy.
The origin server maintains copies at the 50
most relevant edge servers; the other edge
servers follow the CDV strategy.
25 / 29
Architectures
TaT
203
227
182
182
182
128
114
102
100
100
Site 1
Stale docs
0
0
0.0061
0.0059
0
0
0
0
0.0011
0.0011
BW
118
113
113
113
113
100
123
165
165
165
TaT
183
190
142
142
141
160
132
114
100
100
Site 2
Stale docs
0
0
0.0060
0.0057
0
0
0
0
0.0019
0.0017
BW
115
100
100
100
100
114
119
132
125
125
Architectures
SU50+CDV
SU50
SU50+CLV
SU25
SI
Ideal
arrangement
CLV
Cost function
arrangements
CDV
Architectures
SU50
SU50+CDV
CLV
SU25
SU10
CDV
SI
Ideal arrangement
Total turnaround time
28 / 29
Architectures
Useful strategies
Fraction of documents to which a strategy is assigned.
Strategy
NR
CV
CLV
CDV
SI
SU10
SU25
SU50
SU50+CLV
SU50+CDV
Site 1
0.0973
0.0001
0.0131
0.0000
0.0089
0.1321
0.1615
0.4620
0.1232
0.0017
Site 2
0.0597
0.0000
0.0029
0.0000
0.0061
0.6087
0.1433
0.1490
0.0301
0.0002