Chapter 2
ARCHITECTURES
DISTRIBUTED SYSTEMS (dDist)
2014
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5
Plan
• Software architecture
– Architectural styles
• System architectures
– Centralized architectures
– Decentralized architectures
– Hybrid architectures
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5
Architecture
• Software Architecture (“Logical”)
– How our software components are organized
– How is the software divided into logical entities and
how information flows
• System Architecture (“Physical”)
– How to realize our software architecture
– How the logical entities are distributed onto physical
machines
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5
Architectural Styles
• Architectural style describes
– Component/element types
– Connection types
• We will look at:
–
–
–
–
Layered architectures
Object-based architectures
Event-based architectures
Data-centered architectures
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5
Layered
Example: ISO OSI
• Figure 2-1. The (a) layered architectural style
and …
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5
Object-based
Example: CORBA, Java (RMI)
• Figure 2-1. (b) The object-based architectural
style.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5
Event-based
Example: Java Swing
• Figure 2-2. (a) The event-based architectural
style and …
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5
Data-centered
Examples: Oracle Calendar / Dropbox
• Figure 2-2. (b) The shared data-space
architectural style.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5
System Architectures
• Centralized
• Decentralized
• Hybrid
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5
Centralized System Architectures
• Client-Server organization
• Multitier organization
– “Servers as clients”
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5
Client-Server Organization
(Two-Tier)
Example: HTTP & X-windows
• Figure 2-3. General interaction between a client
and a server.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5
X-Windows
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5
Multitiered Architecture
• Figure 2-6. An example of a server acting as client.
• Motivation: Performance and modifiability
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5
Layers versus Tiers
• It is customary to make a distinction between
layers and tiers
• Layer = Logical layer
– A software architectural term
• Tier = Physical layer
– A system architectural term
• The book is not very clear on this distinction!
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5
Layers onto Tiers
• Figure 2-5. Alternative client-server
organizations (a)–(e).
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5
Decentralized System Architectures
• Peer-to-peer networks:
– Distribution between equivalent peers
– Called “horizontal distribution”
– Opposed to the layered “vertical distribution”
• All peers being the same gives new
problems:
– Who should store a particular data item?
– How is a message routed through the peer
group?
• Sending to all peers all the time would flood the net
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5
Decentralized System Architectures
• Overlay network =
– How does the otherwise equivalent peers
organize into a virtual network
• Typically each peer communicate only
with a few other peers
• Structured Peer-to-peer
– Deterministic overlay formation
• Unstructured Peer-to-peer
– Overlay formed probabilistically
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5
Structured Peer-to-Peer Architecture
Identifiers are
hashed into the
keys space,
here 4 bits
• Figure 2-7. The
mapping of data items
onto nodes in Chord.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5
Unstructured Peer-to-Peer
Architectures (1)
• Uses randomized algorithm for
constructing overlay network
• Goal: Maintain random graph
– Each peer has a connection to a random
subset of a few other peers
• Motivation: A random graph, even
with very low degree, is known
provably to have very good
connectivity (Graph Theory)
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5
Unstructured Peer-to-Peer
Architectures (2)
• Since peer-to-peer networks typically
are highly dynamic, the graph
formation must be constantly ongoing
– To get rid of connections to dead peers
– To allow new peers into the group
• The main technique is to exchange
information about known peers with
neighbors and pick new connections
at random in the joint set
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5
2 9 10
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5
Unstructured Peer-to-Peer
Architectures (3)
• To avoid a too inefficient overlay
network the connections might be
formed with a view on closeness
– Prefer to connect to peers which are
only a few hops away in the physical
network
• The book presents a generic
algorithm for implementing different
such view mixings
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5
Unstructured Peer-to-Peer
Architectures (4)
• Resource location in a big peerto-peer network can get very
inefficient
• To combat this, one can let a
small subset of the nodes
organize in a peer-to-peer
backbone and let the other nodes
connect to these superpeers
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5
Superpeers
• Figure 2-12. A hierarchical organization of nodes into a
superpeer network.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5
Hybrid Architectures
• Most peer-to-peer systems are hybrid
architectures
• For instance a client contacts a server
to find the name of a peer it can
contact to enter the peer group
– This server has to collect information on the
active peers and can often become a
bottleneck
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5
Hybrid Architecture
Opportunity for P2P
• Figure 2-14. The principal working of BitTorrent
[adapted with permission from Pouwelse et al. (2004)].
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5
Summary
• Software Architecture defines how
software is organized into components
– Layered, Object based, Event-based, Datacentered
• System Architecture described how to
realize the software architecture
– Structured (n-tier)
– Unstructured (peer-to-peer)
– Hybrid
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved. 0-13-239227-5