Architectural Styles
• Importantstyles of architecture for distributed systems
Layered architectures
Object-based architectures
Data-centered architectures
Event-based architectures
3.
Layered Architectural Style
•The layered architecture divides the system
into distinct layers, each with a specific
function.
• This style promotes modularity, simplifies
development, and enhances maintainability.
• A request goes from the top down, and the
response goes from the bottom up.
• The advantage is that it keeps things orderly
and modifies each layer independently
without affecting the rest of the system.
4.
Object-based Architectural Style
•Each component is an object, and all the
objects can interact through an interface
(or connector).
• Communication between objects happens
through method invocations, often called
remote procedure calls (RPC)
• Popular in client-server systems
5.
Event-based Architectural Style
•The entire communication is through
events. When an event occurs, the system
gets the notification
• Sometimes, these events are data, and at
other times they are URLs to resources.
• The receiver can process what information
they receive and act accordingly.
• Advantages:
• the components are loosely coupled. It means
that it’s easy to add, remove, and modify them.
• allowing heterogeneous components to
communicate with the bus, regardless of their
communication protocols.
6.
Shared Data-space ArchitecturalStyle
• Works on a central data repository, either
active or passive. Sometimes, this central
repository can be just a simple database.
• All communication between objects
happens through a data storage system in a
data-centered system. It supports its stores’
components with a persistent storage space
such as an SQL database, and the system
stores all the nodes in this data storage.
• Decoupled in space and time
• Post items to shared space; consumers pick up
at a later time
7.
Centralized Architectures
• Generalinteraction between a client and a server.
• Application layering
• User-interface level
• Processing level
• Data level
8.
Search Engine Example
•The simplified
organization of
an Internet
search engine
into three
different
layers.
9.
Multi-tiered Architectures
• Thesimplest organization is to have only two types of machines:
• A client machine containing only the programs implementing (part
of) the user-interface level
• A server machine containing the rest,
• the programs implementing the processing and data level
Three-tier Web Applications
•Server itself uses a “client-server” architecture
• 3 tiers: HTTP, J2EE and database – Very common in most web-based
applications
12.
Structured Peer-to-Peer Architectures
•Peer-to-peer systems:
• Removes distinction between a
client and a server
• Overlay network of nodes
• Chord: structured peer-to-peer
system
• Use a distributed hash table to
locate objects
• Data item with key k -> smallest
node with id >= k
13.
Structured Peer-to-Peer Architectures
•The mapping of data items onto nodes
in Content addressable network (CAN)
• d-dimensional coordinate system
• Partitioned among all nodes in the system
14.
Structured Peer-to-Peer Architectures
•Every data item maps to a point
• Join: pick a random point, split
with node for that point
• Leave: harder, since a merge
may not give symmetric
partitions
Superpeers
• A hierarchicalorganization of nodes
into a superpeer network.
• Some nodes become “distinguished”
• Take on more responsibilities (need to
have or be willing to donate more
resources)
• Example: Skype super-peer
18.
Edge-Server Systems
• Viewingthe Internet as consisting of a collection of edge servers.
• Edge servers: from client-server to client-proxy-server
• Content distribution networks: proxies cache web content near the
edge
19.
Collaborative Distributed Systems
•BitTorrent: Collaborative P2P downloads
• Download chunks of a file from multiple peers
• Reassemble file after downloading
• Use a global directory (web-site) and download a .torrent
• torrent contains info about the file
• Tracker: server that maintains active nodes that have requested chunks
• Force altruism: » If P sees Q downloads more than uploads, reduce rate of sending to Q
20.
Collaborative Distributed Systems
•Components of Globule collaborative content distribution network:
• A component that can redirect client requests to other servers.
• A component for analyzing access patterns.
• A component for managing the replication of Web pages.
21.
Topology Management ofOverlay Networks
• A two-layered approach for constructing and maintaining specific overlay
topologies using techniques from unstructured peer-to-peer systems.
22.
Topology Management ofOverlay Networks
• Generating a specific overlay network using a two-layered
unstructured peer-to-peer system
Example: Automatic ComponentRepair
Management in Jade
• Steps required in a repair procedure:
• Terminate every binding between a component on a nonfaulty node,
and a component on the node that just failed.
• Request the node manager to start and add a new node to the domain.
• Configure the new node with exactly the same components as those
on the crashed node.
• Re-establish all the bindings that were previously terminated.