1 / 74

Introduction to Distributed Systems

Introduction to Distributed Systems. Chapter two Architectures . Introduction . Distributed systems are often complex pieces of software of which the components are by definition dispersed across multiple machines .

faris
Download Presentation

Introduction to Distributed Systems

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction to Distributed Systems Compiled by: Miraf Belyu Chapter two Architectures

  2. Introduction • Distributed systems are often complex pieces of software of which the components are by definition dispersed across multiple machines. • Organization of distributed systems is mostly about the software components that constitute the system. Compiled by: Miraf Belyu

  3. Introduction cont… • Organization • Logical organization • Physical organization Compiled by: Miraf Belyu

  4. Introduction cont… • Software architecture • how the various software components are to be organized and how they should interact. • system architecture • instantiate and place software components on real machines. Compiled by: Miraf Belyu

  5. Introduction cont… • Centralized architecture • Single server implements software components • Remote clients access the server with any communication means Compiled by: Miraf Belyu

  6. Sample centralized architecture Compiled by: Miraf Belyu

  7. Centralized architecture cont… • Drawback • Not easily scalable • Limitation in the number of CPUs. • Entire system needs to be upgraded or replaced Compiled by: Miraf Belyu

  8. Introduction cont… • Decentralized architecture • Two or more machines • Plays more or less equal role Compiled by: Miraf Belyu

  9. Architectural styles • Formulated in terms of components • The way that components are connected to each other • The data exchanged between components • How these elements are jointly configured into a system Compiled by: Miraf Belyu

  10. Architectural styles cont… • Layered architecture • Object – based architecture • Data – centered architecture • Event – based architecture Compiled by: Miraf Belyu

  11. Layered architecture • Components are organized in a layered fashion • Component at layer L; is allowed to call components at the underlying layer Li • But not vise versa Compiled by: Miraf Belyu

  12. Layered architecture cont… Compiled by: Miraf Belyu

  13. Layered architecture cont… • Key observation is that control generally flows from layer to layer • Requests go down the hierarchy whereas the results flow upward Compiled by: Miraf Belyu

  14. Object – based architecture • Each object corresponds to what is called a component • Components are connected through a (remote) procedure call mechanism • Matchesthe client-server system architecture. Compiled by: Miraf Belyu

  15. Sample object – based arch Compiled by: Miraf Belyu

  16. Data – centric architecture • Processes communicate through a common repository. • Processes communicate through shared data Compiled by: Miraf Belyu

  17. Data – centric architecture cont… • Shared distributed file system in which virtually all communication takes place through files • Web-based distributed systems, are largely data-centric Compiled by: Miraf Belyu

  18. Event – based architectures • Processes essentially communicate through the propagation of events, which optionally also carry data. • Associated with what are known as publish/subscribe systems. Compiled by: Miraf Belyu

  19. Event – based architectures cont… • Processes publish events after middleware ensures that only those processes that subscribed to those events will receive them • Advantage : • Processes are Decoupled in space, or referentially decoupled. Compiled by: Miraf Belyu

  20. Advantage cont… • Referentially decoupled implies processes need not explicitly refer to each other Compiled by: Miraf Belyu

  21. System architectures Compiled by: Miraf Belyu

  22. What is System Architecture? Compiled by: Miraf Belyu

  23. System Architecture • Centralized • Decentralized • Hybrid Compiled by: Miraf Belyu

  24. Centralized Architecture • Basic client-servermodel • A server is a process (machine) implementing a specific service for example, a file system service or a database service. Compiled by: Miraf Belyu

  25. Centralized Architecture cont… • A client is a process that requests a service from a server by sending it a request and subsequently waiting for the server's reply. • client-server interaction is also known as request-reply. Compiled by: Miraf Belyu

  26. Centralized Architecture cont… Compiled by: Miraf Belyu

  27. Centralized Architecture cont… • The communication can be either of the following: • Connection less protocol • Connection - oriented protocol Compiled by: Miraf Belyu

  28. Centralized Architecture cont… Connectionless protocol • If the underlying network is fairly reliable as in many local-area networks Compiled by: Miraf Belyu

  29. How Connectionless protocol works • How client requests a service: • Packagesa message for the server • Identifyingthe service it wants • Include necessary input data • The message is then sent to the server. Compiled by: Miraf Belyu

  30. Cont… • How servers works: • Always wait for an incoming request • Subsequently process requests • Package the results in a reply message • Send replies to the client Compiled by: Miraf Belyu

  31. Centralized Architecture cont… Connection - oriented protocol • Is not entirely appropriate in a local-area network due to relatively low performance • Works perfectly fine in wide-area systems in which communication is inherently unreliable Compiled by: Miraf Belyu

  32. Cont… For example, • All Internet application protocols are based on reliable TCP/IP connections. Compiled by: Miraf Belyu

  33. How connection – oriented protocol works • When client requests a service: • Sets up a connection to the server before sending the request • Servergenerally uses that same connection to send the reply message Compiled by: Miraf Belyu

  34. Cons of connection – oriented protocol • Setting up and tearing down a connection is relatively costly, especially when the request and reply messages are small. Compiled by: Miraf Belyu

  35. Centralized Architecture cont… Application Layering • The user-interface level • A part that handles interaction with a user • The processing level • A part that operates on a database or file system • The data level • A middle part that generally contains the core functionality of an application Compiled by: Miraf Belyu

  36. Cont.… Search Engine Example Compiled by: Miraf Belyu

  37. Decentralized Architecture • Vertical distribution • Is achieved by placing different components on different machines • functions are logically and physically split across multiple machines • each machine is tailored to a specific group of functions Compiled by: Miraf Belyu

  38. Decentralized Architecture • Horizontal distribution • Clientor server may be physically split up into logically equivalent parts, but • Each part is operating on its own share of the complete data set • Balance the load Compiled by: Miraf Belyu

  39. Structured peer – to – peer Arch • Network is constructed using a deterministic procedure like Distributed Hash Table (DHT) Compiled by: Miraf Belyu

  40. Structured peer to peer cont … Distributed Hash Table (DHT) • Data items are assigned a random key (128-bit or 160-bit identifier) • Nodesassigned a random number from the same identifier space • DHT Maps the key of a data item to the identifier of a node based on some distance metric Compiled by: Miraf Belyu

  41. Unstructured peer –to – peer Arch • Rely on randomized algorithms for constructing an overlay network • Each node maintains a list of neighbors • Data items are randomly placed on nodes Compiled by: Miraf Belyu

  42. Cont.. • When a node needs to locate a specific data item, it floods the network with a search query. • Alternative way: • Super-peers Compiled by: Miraf Belyu

  43. Super - peers • Make use of special nodes that maintain an index of data items Compiled by: Miraf Belyu

  44. Super – peer cont • Problem • select the nodes that are eligible to become super peer • Leader-election problem Compiled by: Miraf Belyu

  45. Hybrid Architecture Compiled by: Miraf Belyu

  46. Hybrid Architecture • Client-serversolutions are combined with decentralized architectures • Edge-Server Systems • Collaborative Distributed Systems Compiled by: Miraf Belyu

  47. Edge – Server Systems • Deployed on the Internet • Servers are placed "at the edge" of the network • Boundary between enterprise networks and the actual Internet Compiled by: Miraf Belyu

  48. Edge – Server Systems Compiled by: Miraf Belyu

  49. Collaborative Distributed Systems • Once a node has joined the system, it can use a fully decentralized scheme for collaboration. • BitTorrent Compiled by: Miraf Belyu

  50. BitTorrent implementation Compiled by: Miraf Belyu

More Related