distributed systems
play

Distributed Systems Principles and Paradigms Chapter 02 (version - PDF document

Distributed Systems Principles and Paradigms Chapter 02 (version September 5, 2007 ) Maarten van Steen Vrije Universiteit Amsterdam, Faculty of Science Dept. Mathematics and Computer Science Room R4.20. Tel: (020) 598 7784


  1. Distributed Systems Principles and Paradigms Chapter 02 (version September 5, 2007 ) Maarten van Steen Vrije Universiteit Amsterdam, Faculty of Science Dept. Mathematics and Computer Science Room R4.20. Tel: (020) 598 7784 E-mail:steen@cs.vu.nl, URL: www.cs.vu.nl/ ∼ steen/ 01 Introduction 02 Architectures 03 Processes 04 Communication 05 Naming 06 Synchronization 07 Consistency and Replication 08 Fault Tolerance 09 Security 10 Distributed Object-Based Systems 11 Distributed File Systems 12 Distributed Web-Based Systems 13 Distributed Coordination-Based Systems 00 – 1 /

  2. Architectures • Architectural styles • Software architectures • Arvchitectures versus middleware • Self-management in distributed systems 02 – 1 Architectures/

  3. Architectural styles (1/2) Basic idea: Organize into logically different compo- nents, and subsequently distribute those components over the various machines. Layer N Object Object Layer N-1 Object Method call Request� Response� flow flow Object Layer 2 Object Layer 1 (a) (b) Observation: (a) Layered style is used for client-server system; (b) object-based style for distributed object systems. 02 – 2 Architectures/2.1 Architectural styles

  4. Architectural Styles (2/2) Observation: Decoupling processes in space (“anony- mous”) and also time (“asynchronous”) has led to al- ternative styles: Component Component Component Component Event delivery Publish Data delivery Event bus Publish Shared (persistent) data space Component (b) (a) (a) Publish/subscribe and (b) Shared dataspace 02 – 3 Architectures/2.1 Architectural styles

  5. Centralized Architectures Basic Client–Server Model: Characteristics: • There are processes offering services ( servers ) • There are processes that use services ( clients ) • Clients and servers can be distributed across dif- ferent machines • Clients follow request/reply model with respect to using services Wait for result Client Request Reply Server Provide service Time 02 – 4 Architectures/2.2 System Architectures

  6. Application Layering (1/2) Traditional three-layered view: • User-interface layer contains units for an applica- tion’s user interface • Processing layer contains the functions of an ap- plication, 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 tech- nology and accompanying applications. 02 – 5 Architectures/2.2 System Architectures

  7. Application Layering (2/2) User-interface User interface level HTML page containing list Keyword expression HTML generator Processing level Query Ranked list generator of page titles Ranking algorithm Database queries Web page titles with meta-information Data level Database with Web pages 02 – 6 Architectures/2.2 System Architectures

  8. 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 Server machine (a) (b) (c) (d) (e) 02 – 7 Architectures/2.2 System Architectures

  9. Decentralized Architectures Observation: In the last couple of years we have been seeing a tremendous growth in peer-to-peer sys- tems : • 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 over- lay networks : data is routed over connections setup between the nodes (cf. application-level multicasting). 02 – 8 Architectures/2.2 System Architectures

  10. Structured P2P Systems (1/2) Basic idea: Organize the nodes in a structured over- lay network such as a logical ring, and make specific nodes responsible for services based only on their ID: Actual node 0 1 15 {13,14,15} {0,1} 14 2 3 13 12 {8,9,10,11,12} {2,3,4} 4 Associated� data keys 11 5 10 6 {5,6,7} 9 7 8 Note: The system provides an operation LOOKUP(key) that will efficiently route the lookup request to the as- sociated node. 02 – 9 Architectures/2.2 System Architectures

  11. Structured P2P Systems (2/2) Other example: Organize nodes in a d -dimensional space and let every node take the responsibility for data in a specific region. When a node joins ⇒ split a region. Keys associated with� node at (0.6,0.7) (0,1) (1,1) (0.9,0.9) (0.9,0.9) (0.2,0.8) (0.2,0.8) (0.6,0.7) (0.6,0.7) Actual node (0.9,0.6) (0.9,0.6) (0.2,0.45) (0.2,0.3) (0.7,0.2) (0.7,0.2) (0.2,0.15) (0,0) (1,0) (a) (b) 02 – 10 Architectures/2.2 System Architectures

  12. Unstructured P2P Systems Observation: Many unstructured P2P systems at- tempt to maintain a random graph : Basic principle: Each node is required to be able to contact a randomly selected other node: • Let each peer maintain a partial view of the net- work, consisting of c other nodes • Each node P periodically selects a node Q from its partial view • P and Q exchange information and exchange mem- bers from their respective partial views Observation: It turns out that, depending on the ex- change, randomness, but also robustness of the net- work can be maintained. 02 – 11 Architectures/2.2 System Architectures

  13. Topology Management of Overlay Networks (1/2) Basic idea: Distinguish two layers: (1) maintain ran- dom partial views in lowest layer; (2) be selective on who you keep in higher-layer partial view. Protocol for� Links to topology-� Structured� specific� specific other nodes overlay overlay Random peer Protocol for� Random� Links to randomly� randomized� overlay chosen other nodes view Note: lower layer feeds upper layer with random nodes; upper layer is selective when it comes to keeping ref- erences. 02 – 12 Architectures/2.2 System Architectures

  14. Topology Management of Overlay Networks (2/2) Example: Consider a N × N grid. Keep only refer- ences to nearest neighbors: � ( a 1 , a 2 ) − ( b 1 , b 2 ) � = d 1 + d 2 d i = min { N − | a i − b i | , | a i − b i |} Result: a nice torus will appear after a while: Time 02 – 13 Architectures/2.2 System Architectures

  15. Superpeers Observation: Sometimes it helps to select a few nodes to do specific work: superpeer Regular peer Superpeer Superpeer� network Examples: • Peers maintaining an index (for search) • Peers monitoring the state of the network • Peers being able to setup connections 02 – 14 Architectures/2.2 System Architectures

  16. Hybrid Architectures (1/2) Observation: In many cases, client-server architec- tures are combined with peer-to-peer solutions Example: Edge-server architectures, which are often used for Content Delivery Networks : Client Content provider ISP ISP Core Internet Edge server Enterprise network 02 – 15 Architectures/2.2 System Architectures

  17. Hybrid Architectures (2/2) Example: Combining a P2P download protocol with a client-server architecture for controlling the down- loads: Bittorrent Client node K out of N nodes Node 1 Lookup(F) Node 2 A BitTorrent� .torrent file� List of nodes� Web page for F storing F Ref. to� Ref. to� file� tracker Web server File server Tracker server Node N Basic idea: Once a node has identified where to down- load 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. 02 – 16 Architectures/2.2 System Architectures

  18. Architectures versus Middleware 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 ⇒ there is a need to (dynamically) adapt the behavior of the middleware when needed. Interceptors: Intercept the usual flow of control when invoking a remote object: 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 send([B, "do_something", value]) Local OS To object B 02 – 17 Architectures/2.3 Architectures versus Middleware

  19. Adaptive Middleware Separation of concerns: Try to separate extra func- tionalities and later weave them together into a single implementation ⇒ only toy examples so far. Computational reflection: Let a program inspect it- self at runtime and adapt/change its settings dy- namically if necessary ⇒ mostly at language level and applicability unclear. Component-based design: Organize a distributed ap- plication through components that can be dynam- ically replaced when needed ⇒ highly complex, also many intercomponent dependencies. Observation: Do we need adaptive software at all, or is the issue adaptive systems ? 02 – 18 Architectures/2.3 Architectures versus Middleware

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend