Distributed (Operating) Systems -Architectures- Computer Engineering Department Distributed Systems...
-
Upload
aubrey-russell -
Category
Documents
-
view
222 -
download
1
Transcript of Distributed (Operating) Systems -Architectures- Computer Engineering Department Distributed Systems...
![Page 1: Distributed (Operating) Systems -Architectures- Computer Engineering Department Distributed Systems Course Assoc. Prof. Dr. Ahmet Sayar Kocaeli University.](https://reader035.fdocuments.in/reader035/viewer/2022062309/5697bf7b1a28abf838c8357b/html5/thumbnails/1.jpg)
Distributed (Operating) Systems -Architectures-
Computer Engineering DepartmentDistributed Systems Course
Assoc. Prof. Dr. Ahmet SayarKocaeli University - Fall 2015
![Page 2: Distributed (Operating) Systems -Architectures- Computer Engineering Department Distributed Systems Course Assoc. Prof. Dr. Ahmet Sayar Kocaeli University.](https://reader035.fdocuments.in/reader035/viewer/2022062309/5697bf7b1a28abf838c8357b/html5/thumbnails/2.jpg)
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
![Page 3: Distributed (Operating) Systems -Architectures- Computer Engineering Department Distributed Systems Course Assoc. Prof. Dr. Ahmet Sayar Kocaeli University.](https://reader035.fdocuments.in/reader035/viewer/2022062309/5697bf7b1a28abf838c8357b/html5/thumbnails/3.jpg)
A. Software Architectures
• Important styles of architecture for distributed systems1. Layered architectures2. Object-based architectures3. Data-centered architectures4. Event-based architectures
![Page 4: Distributed (Operating) Systems -Architectures- Computer Engineering Department Distributed Systems Course Assoc. Prof. Dr. Ahmet Sayar Kocaeli University.](https://reader035.fdocuments.in/reader035/viewer/2022062309/5697bf7b1a28abf838c8357b/html5/thumbnails/4.jpg)
A1. Layered Design
• Each layer uses previous layer to implement new functionality that is exported to the layer above
• Example: Multi-tier web apps
![Page 5: Distributed (Operating) Systems -Architectures- Computer Engineering Department Distributed Systems Course Assoc. Prof. Dr. Ahmet Sayar Kocaeli University.](https://reader035.fdocuments.in/reader035/viewer/2022062309/5697bf7b1a28abf838c8357b/html5/thumbnails/5.jpg)
A2. Object-based Style
• Each object corresponds to a components• Components interact via remote procedure calls
– Popular in client-server systems
![Page 6: Distributed (Operating) Systems -Architectures- Computer Engineering Department Distributed Systems Course Assoc. Prof. Dr. Ahmet Sayar Kocaeli University.](https://reader035.fdocuments.in/reader035/viewer/2022062309/5697bf7b1a28abf838c8357b/html5/thumbnails/6.jpg)
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
![Page 7: Distributed (Operating) Systems -Architectures- Computer Engineering Department Distributed Systems Course Assoc. Prof. Dr. Ahmet Sayar Kocaeli University.](https://reader035.fdocuments.in/reader035/viewer/2022062309/5697bf7b1a28abf838c8357b/html5/thumbnails/7.jpg)
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
![Page 8: Distributed (Operating) Systems -Architectures- Computer Engineering Department Distributed Systems Course Assoc. Prof. Dr. Ahmet Sayar Kocaeli University.](https://reader035.fdocuments.in/reader035/viewer/2022062309/5697bf7b1a28abf838c8357b/html5/thumbnails/8.jpg)
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
![Page 9: Distributed (Operating) Systems -Architectures- Computer Engineering Department Distributed Systems Course Assoc. Prof. Dr. Ahmet Sayar Kocaeli University.](https://reader035.fdocuments.in/reader035/viewer/2022062309/5697bf7b1a28abf838c8357b/html5/thumbnails/9.jpg)
B1. Centralized
![Page 10: Distributed (Operating) Systems -Architectures- Computer Engineering Department Distributed Systems Course Assoc. Prof. Dr. Ahmet Sayar Kocaeli University.](https://reader035.fdocuments.in/reader035/viewer/2022062309/5697bf7b1a28abf838c8357b/html5/thumbnails/10.jpg)
Client-Server Architectures
• Most common style: Client-server architecture– Request x Response
• Application layering– User-interface level– Processing level– Data level
![Page 11: Distributed (Operating) Systems -Architectures- Computer Engineering Department Distributed Systems Course Assoc. Prof. Dr. Ahmet Sayar Kocaeli University.](https://reader035.fdocuments.in/reader035/viewer/2022062309/5697bf7b1a28abf838c8357b/html5/thumbnails/11.jpg)
Search Engine Example
• Search engine architecture with 3 layers
![Page 12: Distributed (Operating) Systems -Architectures- Computer Engineering Department Distributed Systems Course Assoc. Prof. Dr. Ahmet Sayar Kocaeli University.](https://reader035.fdocuments.in/reader035/viewer/2022062309/5697bf7b1a28abf838c8357b/html5/thumbnails/12.jpg)
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
![Page 13: Distributed (Operating) Systems -Architectures- Computer Engineering Department Distributed Systems Course Assoc. Prof. Dr. Ahmet Sayar Kocaeli University.](https://reader035.fdocuments.in/reader035/viewer/2022062309/5697bf7b1a28abf838c8357b/html5/thumbnails/13.jpg)
A Spectrum of Choices
Two tiered architecture: Only two kinds of machines, - Client and serverFat Client vs. Thin Client
![Page 14: Distributed (Operating) Systems -Architectures- Computer Engineering Department Distributed Systems Course Assoc. Prof. Dr. Ahmet Sayar Kocaeli University.](https://reader035.fdocuments.in/reader035/viewer/2022062309/5697bf7b1a28abf838c8357b/html5/thumbnails/14.jpg)
Three-tier Web Applications
• Server itself uses a “client-server” architecture• 3 tiers: HTTP, J2EE and database
– Very common in most web-based applications
![Page 15: Distributed (Operating) Systems -Architectures- Computer Engineering Department Distributed Systems Course Assoc. Prof. Dr. Ahmet Sayar Kocaeli University.](https://reader035.fdocuments.in/reader035/viewer/2022062309/5697bf7b1a28abf838c8357b/html5/thumbnails/15.jpg)
B2.Decentralized
![Page 16: Distributed (Operating) Systems -Architectures- Computer Engineering Department Distributed Systems Course Assoc. Prof. Dr. Ahmet Sayar Kocaeli University.](https://reader035.fdocuments.in/reader035/viewer/2022062309/5697bf7b1a28abf838c8357b/html5/thumbnails/16.jpg)
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.
![Page 17: Distributed (Operating) Systems -Architectures- Computer Engineering Department Distributed Systems Course Assoc. Prof. Dr. Ahmet Sayar Kocaeli University.](https://reader035.fdocuments.in/reader035/viewer/2022062309/5697bf7b1a28abf838c8357b/html5/thumbnails/17.jpg)
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
![Page 18: Distributed (Operating) Systems -Architectures- Computer Engineering Department Distributed Systems Course Assoc. Prof. Dr. Ahmet Sayar Kocaeli University.](https://reader035.fdocuments.in/reader035/viewer/2022062309/5697bf7b1a28abf838c8357b/html5/thumbnails/18.jpg)
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
![Page 19: Distributed (Operating) Systems -Architectures- Computer Engineering Department Distributed Systems Course Assoc. Prof. Dr. Ahmet Sayar Kocaeli University.](https://reader035.fdocuments.in/reader035/viewer/2022062309/5697bf7b1a28abf838c8357b/html5/thumbnails/19.jpg)
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.
![Page 20: Distributed (Operating) Systems -Architectures- Computer Engineering Department Distributed Systems Course Assoc. Prof. Dr. Ahmet Sayar Kocaeli University.](https://reader035.fdocuments.in/reader035/viewer/2022062309/5697bf7b1a28abf838c8357b/html5/thumbnails/20.jpg)
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
![Page 21: Distributed (Operating) Systems -Architectures- Computer Engineering Department Distributed Systems Course Assoc. Prof. Dr. Ahmet Sayar Kocaeli University.](https://reader035.fdocuments.in/reader035/viewer/2022062309/5697bf7b1a28abf838c8357b/html5/thumbnails/21.jpg)
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
![Page 22: Distributed (Operating) Systems -Architectures- Computer Engineering Department Distributed Systems Course Assoc. Prof. Dr. Ahmet Sayar Kocaeli University.](https://reader035.fdocuments.in/reader035/viewer/2022062309/5697bf7b1a28abf838c8357b/html5/thumbnails/22.jpg)
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
![Page 23: Distributed (Operating) Systems -Architectures- Computer Engineering Department Distributed Systems Course Assoc. Prof. Dr. Ahmet Sayar Kocaeli University.](https://reader035.fdocuments.in/reader035/viewer/2022062309/5697bf7b1a28abf838c8357b/html5/thumbnails/23.jpg)
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.
![Page 24: Distributed (Operating) Systems -Architectures- Computer Engineering Department Distributed Systems Course Assoc. Prof. Dr. Ahmet Sayar Kocaeli University.](https://reader035.fdocuments.in/reader035/viewer/2022062309/5697bf7b1a28abf838c8357b/html5/thumbnails/24.jpg)
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)
![Page 25: Distributed (Operating) Systems -Architectures- Computer Engineering Department Distributed Systems Course Assoc. Prof. Dr. Ahmet Sayar Kocaeli University.](https://reader035.fdocuments.in/reader035/viewer/2022062309/5697bf7b1a28abf838c8357b/html5/thumbnails/25.jpg)
SuperPeers
• Some nodes become “distinguished”– Take on more responsibilities (need to have or be willing to
donate more resources)– Example: Skype super-peer
![Page 26: Distributed (Operating) Systems -Architectures- Computer Engineering Department Distributed Systems Course Assoc. Prof. Dr. Ahmet Sayar Kocaeli University.](https://reader035.fdocuments.in/reader035/viewer/2022062309/5697bf7b1a28abf838c8357b/html5/thumbnails/26.jpg)
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
![Page 27: Distributed (Operating) Systems -Architectures- Computer Engineering Department Distributed Systems Course Assoc. Prof. Dr. Ahmet Sayar Kocaeli University.](https://reader035.fdocuments.in/reader035/viewer/2022062309/5697bf7b1a28abf838c8357b/html5/thumbnails/27.jpg)
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
![Page 28: Distributed (Operating) Systems -Architectures- Computer Engineering Department Distributed Systems Course Assoc. Prof. Dr. Ahmet Sayar Kocaeli University.](https://reader035.fdocuments.in/reader035/viewer/2022062309/5697bf7b1a28abf838c8357b/html5/thumbnails/28.jpg)
B3. Hybrid Systems
• Client-server solutions are combined with decentralized architectures.
• Examples are1. Edge-Server Systems2. Collaborative Distributed Systems
![Page 29: Distributed (Operating) Systems -Architectures- Computer Engineering Department Distributed Systems Course Assoc. Prof. Dr. Ahmet Sayar Kocaeli University.](https://reader035.fdocuments.in/reader035/viewer/2022062309/5697bf7b1a28abf838c8357b/html5/thumbnails/29.jpg)
1.Edge-Server Systems
• Edge servers: From client-server to client-proxy-server• Content distribution networks: Proxies cache web content near the edge
![Page 30: Distributed (Operating) Systems -Architectures- Computer Engineering Department Distributed Systems Course Assoc. Prof. Dr. Ahmet Sayar Kocaeli University.](https://reader035.fdocuments.in/reader035/viewer/2022062309/5697bf7b1a28abf838c8357b/html5/thumbnails/30.jpg)
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
![Page 31: Distributed (Operating) Systems -Architectures- Computer Engineering Department Distributed Systems Course Assoc. Prof. Dr. Ahmet Sayar Kocaeli University.](https://reader035.fdocuments.in/reader035/viewer/2022062309/5697bf7b1a28abf838c8357b/html5/thumbnails/31.jpg)
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
![Page 32: Distributed (Operating) Systems -Architectures- Computer Engineering Department Distributed Systems Course Assoc. Prof. Dr. Ahmet Sayar Kocaeli University.](https://reader035.fdocuments.in/reader035/viewer/2022062309/5697bf7b1a28abf838c8357b/html5/thumbnails/32.jpg)
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)
![Page 33: Distributed (Operating) Systems -Architectures- Computer Engineering Department Distributed Systems Course Assoc. Prof. Dr. Ahmet Sayar Kocaeli University.](https://reader035.fdocuments.in/reader035/viewer/2022062309/5697bf7b1a28abf838c8357b/html5/thumbnails/33.jpg)
Ex: Middleware for Object-based Appl
![Page 34: Distributed (Operating) Systems -Architectures- Computer Engineering Department Distributed Systems Course Assoc. Prof. Dr. Ahmet Sayar Kocaeli University.](https://reader035.fdocuments.in/reader035/viewer/2022062309/5697bf7b1a28abf838c8357b/html5/thumbnails/34.jpg)
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)
![Page 35: Distributed (Operating) Systems -Architectures- Computer Engineering Department Distributed Systems Course Assoc. Prof. Dr. Ahmet Sayar Kocaeli University.](https://reader035.fdocuments.in/reader035/viewer/2022062309/5697bf7b1a28abf838c8357b/html5/thumbnails/35.jpg)
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
![Page 36: Distributed (Operating) Systems -Architectures- Computer Engineering Department Distributed Systems Course Assoc. Prof. Dr. Ahmet Sayar Kocaeli University.](https://reader035.fdocuments.in/reader035/viewer/2022062309/5697bf7b1a28abf838c8357b/html5/thumbnails/36.jpg)
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
![Page 37: Distributed (Operating) Systems -Architectures- Computer Engineering Department Distributed Systems Course Assoc. Prof. Dr. Ahmet Sayar Kocaeli University.](https://reader035.fdocuments.in/reader035/viewer/2022062309/5697bf7b1a28abf838c8357b/html5/thumbnails/37.jpg)
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
![Page 38: Distributed (Operating) Systems -Architectures- Computer Engineering Department Distributed Systems Course Assoc. Prof. Dr. Ahmet Sayar Kocaeli University.](https://reader035.fdocuments.in/reader035/viewer/2022062309/5697bf7b1a28abf838c8357b/html5/thumbnails/38.jpg)
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
![Page 39: Distributed (Operating) Systems -Architectures- Computer Engineering Department Distributed Systems Course Assoc. Prof. Dr. Ahmet Sayar Kocaeli University.](https://reader035.fdocuments.in/reader035/viewer/2022062309/5697bf7b1a28abf838c8357b/html5/thumbnails/39.jpg)
Back Up
![Page 40: Distributed (Operating) Systems -Architectures- Computer Engineering Department Distributed Systems Course Assoc. Prof. Dr. Ahmet Sayar Kocaeli University.](https://reader035.fdocuments.in/reader035/viewer/2022062309/5697bf7b1a28abf838c8357b/html5/thumbnails/40.jpg)
• 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
![Page 41: Distributed (Operating) Systems -Architectures- Computer Engineering Department Distributed Systems Course Assoc. Prof. Dr. Ahmet Sayar Kocaeli University.](https://reader035.fdocuments.in/reader035/viewer/2022062309/5697bf7b1a28abf838c8357b/html5/thumbnails/41.jpg)
Autonomic computing
![Page 42: Distributed (Operating) Systems -Architectures- Computer Engineering Department Distributed Systems Course Assoc. Prof. Dr. Ahmet Sayar Kocaeli University.](https://reader035.fdocuments.in/reader035/viewer/2022062309/5697bf7b1a28abf838c8357b/html5/thumbnails/42.jpg)
Feedback Control Model
• Use feedback and control theory to design a self-managing system