Upload
aubrey-russell
View
222
Download
1
Tags:
Embed Size (px)
Citation preview
Distributed (Operating) Systems -Architectures-
Computer Engineering DepartmentDistributed Systems Course
Assoc. Prof. Dr. Ahmet SayarKocaeli University - Fall 2015
Outline
A. Software architecture1. Layered architectures2. Object-based architectures3. Data-centered architectures4. Event-based architectures
B. System Architecture5. Centralized, decentralized, hybrid6. Middleware (aim is distribution transparency)7. Self-managing systems (autonomic systems)
• System Monitoring• Taking appropriate measures
A. Software Architectures
• Important styles of architecture for distributed systems1. Layered architectures2. Object-based architectures3. Data-centered architectures4. Event-based architectures
A1. Layered Design
• Each layer uses previous layer to implement new functionality that is exported to the layer above
• Example: Multi-tier web apps
A2. Object-based Style
• Each object corresponds to a components• Components interact via remote procedure calls
– Popular in client-server systems
A3. Shared data-space (data-centered)
• “Bulletin-board” architecture– Decoupled in space and time– Post items to shared space; consumers pick up at a later time
A4. Event-based architecture
• Communicate via a common repository– Use a publish-subscribe paradigm– Consumers subscribe to types of events– Events are delivered once published by any publisher
B. System Architectures
• (1)Centralized, (2)decentralized, (3)hybrid• (4)Middleware (aim is distribution
transparency)• (5)Self-managing systems (autonomic
systems)– System Monitoring– Taking appropriate measures
B1. Centralized
Client-Server Architectures
• Most common style: Client-server architecture– Request x Response
• Application layering– User-interface level– Processing level– Data level
Search Engine Example
• Search engine architecture with 3 layers
Multitiered Architectures
• The simplest 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
– Everything is handled by the server while the client is essentially no more than a dumb terminal, possibly with a graphical interface
A Spectrum of Choices
Two tiered architecture: Only two kinds of machines, - Client and serverFat Client vs. Thin Client
Three-tier Web Applications
• Server itself uses a “client-server” architecture• 3 tiers: HTTP, J2EE and database
– Very common in most web-based applications
B2.Decentralized
Distribution
1. Vertical Distribution– Multi-tiered arch: Different tiers assigned to different
distributed machines– Logically different components on different machines– Centralized or decentralized
2. Horizontal Distribution– Example is peer to peer systems– Decentralized– Client or server may be physically split up into logically
equivalent parts. But each part is operating on its own share of the complete data set, thus balancing the load.
Peer-to-peer systems
• Removes distinction between a client and a server
• Each process will act as a client and a server at the same time
• Overlay network of nodes– Nodes use their own addressing– Nodes can route requests to locations that may
not be known by the requester
Overlay Network ExampleCircles represent nodes in the network. Blue nodes are also part of the overlay network. Dotted lines represent virtual links. Actual routing is based on TCP/IP protocols
Overlay Networks
• Are logical or virtual networks, built on top of a physical network
• A link between two nodes in the overlay may consist of several physical links.
• Messages in the overlay are sent to logical addresses, not physical (IP) addresses
• Various approaches used to resolve logical addresses to physical.
Types of P2P Systems
• The overlay network may be – Structured: Nodes and content are connected
according to some design that simplifies later lookups – Unstructured: Content is assigned to nodes regardless
of network topology
• Structured peer-to-peer system1. Chord System 2. CAN System
1. Chord system• Assume there are 16 nodes• Pears are located logically on the
ring• Use a distributed hash table to
locate objects– Data item with key k goes to the
node with the smallest id, id >= k• 1,4,7,12 and 15 are given the
responsibility– They serve the data items whose ids
are lower than their ids• Each node has two-responsibility
– Lookup– Serving the content
2. Content Addressable Network (CAN)
• CAN: d-dimensional coordinate system– Partitioned among all nodes in the system– Example: [0,1] x [0,1] space across 6 nodes
• 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
Unstructured P2P Systems
• Unstructured P2P organizes the overlay network as a random graph.
• Topology is based on randomized algorithms– Each node pick a random set of nodes and becomes their
neighbors• Gnutella
– Each node knows about a subset of nodes, its “neighbors”
– Neighbors are chosen in different ways: physically close nodes, nodes that joined at about the same time, etc.
Locating a Data Object by Flooding
• Send a request to all known neighbors– If not found, neighbors forward the request to their
neighbors
• Works well in small to medium sized networks, doesn’t scale well
• “Time-to-live” counter can be used to control number of hops
• Example system: Gnutella & Freenet (Freenet uses a caching system to improve performance)
SuperPeers
• Some nodes become “distinguished”– Take on more responsibilities (need to have or be willing to
donate more resources)– Example: Skype super-peer
Structured vs Unstructured
• Structured networks typically guarantee that if an object is in the network it will be located in a bounded amount of time – usually O(log(N))
• Unstructured networks offer no guarantees.– For example, some will only forward search requests a
specific number of hops– Random graph approach means there may be loops– Graph may become disconnected
B. System Architectures
• (1)Centralized, (2)decentralized, (3)hybrid• (4)Middleware (aim is distribution
transparency)• (5)Self-managing systems (autonomic systems)
– System Monitoring– Taking appropriate measures
B3. Hybrid Systems
• Client-server solutions are combined with decentralized architectures.
• Examples are1. Edge-Server Systems2. Collaborative Distributed Systems
1.Edge-Server Systems
• Edge servers: From client-server to client-proxy-server• Content distribution networks: Proxies cache web content near the edge
2.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
B. System Architectures
• (1)Centralized, (2)decentralized, (3)hybrid
• (4) Middleware (aim is distribution transparency)
• (5)Self-managing systems (autonomic systems)– System Monitoring– Taking appropriate measures
B4. Middleware
• Forms a layer between applications and distributed platforms
• Aim is distribution transparency• Specific solutions should be adaptable to application
requirements• Best approach: Easy to configure, adapt, and customize as
needed by an application– This is the result of separation of policies from mechanisms
• Interceptors– Nothing but a software construct. That will break the usual
flow and allow other code to be executed.– Generality or simplicity (ad-hoc)
Ex: Middleware for Object-based Appl
Adaptive Software/Computing
• Realized by using Middleware systems.• Environments in which dist applications are executed changes
continuously• Mobility, failing hardware etc.• Rather than making applications responsible for reacting to
changes, this task is placed in the middleware
• Supporting Adaptive Computing:1. Separation of concerns (Aspect-oriented software/comp)2. Computational Reflection (self inspection – ex: garbage collection in
Java)3. Component-based design (dynamic component composition – ex:
late binding in programming languages)
B. System Architectures
• (1)Centralized, (2)decentralized, (3)hybrid• (4) Middleware (aim is distribution
transparency)
• (5)Self-managing systems (autonomic systems)– System Monitoring– Taking appropriate measures
B5. Self-Managing Systems Autonomic computing
• System is adaptive– Monitors itself and takes action autonomously when needed
• Self-*: self-managing, self-healing• Example: automatic capacity provisioning
– Vary capacity of a web server based on demand
Autonomic Computing: Self-* systems
• Examples:– Defining how many CPU cycles to which tasks– What is the right allocation of the resources– Monitor the system and if the workload start
increasing add more server from the server pool• If workload is decreasing, then shut some of them up• On the fly system keeps changes and act accordingly
• Realization with Feedback control system
Summary
• Autonomic computing: – Self-managing systems
• Adaptive computing: – Adapting to continuously changing environments
in which dist applications are executed.
• Aspect-oriented computing: – Separation of concerns
Back Up
• Key of the concept is the separation of the infrastructure into building blocks (component-based design)
• Have dedicated resources for computing, storage, network and control– Aspect-oriented helps
here
• Pool them and share them – if appropriate
Adaptive Software/Computing
Autonomic computing
Feedback Control Model
• Use feedback and control theory to design a self-managing system