Presentation is loading. Please wait.

Presentation is loading. Please wait.

Architectures. Software Architecture Describe how the various software components are to be organized and how they should interact. It describe the organization.

Similar presentations


Presentation on theme: "Architectures. Software Architecture Describe how the various software components are to be organized and how they should interact. It describe the organization."— Presentation transcript:

1 Architectures

2 Software Architecture Describe how the various software components are to be organized and how they should interact. It describe the organization and interaction of software components.

3 System Architecture An architecture description is a formal description and representation of a system. It describe the placement of software components on physical machines.

4 Architectural Styles Important styles of architecture for distributed systems Layered architectures Object-based architectures Data-centered architectures Event-based architectures

5 Architectural Styles Layered architectures Components are organized in a layered fashion where a component at layer L i is allowed to call components at the underlying layer L i-1. Requests go down the hierarchy whereas the results flow upward.

6 Layered style is used for client-server system Figure 2-1. The layered architectural style

7 Object-based architectures Each component are connected through a remote procedure call mechanism Similar to client server architecture. Form the most important styles for the large software systems less structured component = object connector = RPC or RMI

8 Architectural Styles Figure 2-1. The object-based architectural style.

9 Data-centered architectures Communication processes through a common repository All communication takes place through files

10 Event-based architectures Communication through the propagation of events Propagation is associated with publish/subscribe systems. It means that processes publish events after which the middleware ensures that only those processes that subscribed to those events will receive them. The main advantage of event-base architecture is that processes are loosely coupled.ie they were referentially decoupled.

11 Event-based arch. supports several communication styles: Publish-subscribe Broadcast Point-to-point

12 Figure The event-based architectural style.

13 Shared data spaces Access and update of data store is the main purpose of data-centered system. Processes communicate/exchange info primarily by reading and modifying data in some shared repository (e.g database, distributed file system) e.g. processes of many web-based distributed systems communicate through the use of shared Web-based data services.

14 – Event based architectures can be combined with data-centered architectures. – Processes are decoupled in time – Use SQL like interface

15 Figure The shared data-space architectural style.

16 System Architectures Centralized architecture Decentralized architecture Hybrid architecture

17 Centralized Architectures Example is client server model In the basic client-server model, processes in a distributed system are divided into two groups. SERVER AND CLIENT A server is a process implementing a specific service. A client is a process that requests a service by sending it a request and subsequently waiting for the server’s reply. This type of client-server interaction is called request-reply behavior.

18 Centralized Architectures Figure General interaction between a client and a server.

19 Idempotent operation – When an operation can be repeated multiple times without harm, it is said to be idempotent. Examples Web search engine Interface: type in a keyword string Processing level: processes to generate DB queries, rank replies, format response Data level: database of web pages

20 Application Layering Three levels are – The user-interface level – The processing level – The data level User interface level contains all that is necessary to directly interface with the user, such as display management. Processing level contains the applications. The data level manages the actual data that is being acted on. An important property of this level is that data is persistent. For example, Internet search engine

21 Figure: The simplified organization of an Internet search engine into three different layers.

22 Multitier 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, ie. the programs implementing the processing and data level. Following figure shows a two tier architecture.

23 Figure Alternative client-server organizations (a)–(e).

24 Fat clients and thin clients Having more functionality on the client machine makes client-side software more prone to errors. Following figure shows the three tired architecture.

25 Figure. An example of a server acting as client.

26 Vertical distribution refers to the distribution of the different layers in a multitier architectures across multiple machines. In principle, each layer is implemented on a different machine. Traditional client-server architectures exhibit vertical distribution. Each level serves a different purpose in the system. – Logically different components reside on different nodes Decentralized Architectures

27 Vertical distribution – In many business environments, distributed processing is equivalent to organizing a client server application as a multitier architecture. this type of distribution is known as vertical distribution. – The characteristic feature of vertical distribution is that it is achieved by placing logically different components on different machines. – This is related to vertical fragmentation in distributed relational databases, it means that tables are split column wise and subsequently distributed across multiple machines.

28 Horizontal distribution – In this type of distribution, a 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. – The system architecture that supports horizontal distribution is known as peer- to- peer systems(P2P systems). Here nodes act as both client and server and the interaction is symmetric – Horizontal distribution deals with the distribution of a single layer across multiple machines, such as distributing a single database.

29 It has Better load balancing, more resistant to denial-of-service attacks, harder to manage than C/S

30 An example of horizontal distribution of a Web service The replication serves for scalability and enhanced performance

31 Servent – servent is a peer-to-peer network node, which has the functionalities of both a server and a client. – Each process will act as a client and a server at the same time.

32 Overlay network A network in which the nodes are formed by the processes and the links represent the possible communication channels. Overlay networks connect nodes in the P2P system – Define the structure between nodes in the system – Allow nodes to route requests to locations that may not be known at time of request. Are virtual networks, built on top of one or more other networks. A link between two nodes in the overlay may consist of several physical links.

33 Circles 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 Network Example

34 Overlay Networks Each node in a P2P system knows how to contact several other nodes. The overlay network may be two types. – structured P2P nodes and content are connected according to some design that simplifies later lookups – unstructured P2P content is assigned to nodes without regard to the network topology.

35 Structured Peer-to-Peer Architectures In a structured peer-to-peer architecture, the overlap network is constructed using a deterministic procedure Organize the process through a distributed hash table (DHT). In a DHT based system, data items are assigned a random key from a large identifier space, such as a 128 bit or 160- bit identifier.

36 Structured P2P Architectures A common approach is to use a distributed hash table (DHT) to organize the nodes Traditional hash functions convert a key to a hash value, which can be used as an index into a hash table. – Keys are unique – each represents an object to store in the table; e.g., at UAH, your A-number – The hash function value is used to insert an object in the hash table and to retrieve it.

37 Structured P2P Architectures In a DHT, data objects and nodes are each assigned a key which hashes to a random number from a very large identifier space (to ensure uniqueness) A mapping function assigns objects to nodes, based on the hash function value. A lookup, also based on hash function value, returns the network address of the node that stores the requested object.

38 Characteristics of DHT Scalable – to thousands, even millions of network nodes – Search time increases more slowly than size; usually Ο(log(N)) Fault tolerant – able to re-organize itself when nodes fail Decentralized – no central coordinator (example of decentralized algorithms)

39 Structured Peer-to-Peer Architectures Accomplished by routing a request for a data item to the responsible node The Chord system Ring A data item with key k is mapped to the node with the smallest identifier id >=k The successor of the key k and denoted as succ(k) LOOKUP(k) – return the network address of succ(k)

40 Chord Routing Algorithm Structured P2P Nodes are logically arranged in a circle Nodes and data items have m-bit identifiers (keys) from a 2 m namespace. – e.g., a node’s key could be a hash of its IP address and a file’s key might be the hash of its name or of its content. – Can’t do key-word searches with this approach.

41 Structured Peer-to-Peer Architectures Figure 2-7. The mapping of data items onto nodes in Chord.

42 Structured Peer-to-Peer Architectures Content addressable network (CAN) When a node p wants to join a CAN Pick up an arbitrary point from the coordinate space Look up the node Q in whose region that point falls Node Q then splits its region into two halves

43 Structured Peer-to-Peer Architectures Figure :The mapping of data items onto nodes in CAN.

44 Structured Peer-to-Peer Architectures Figure Splitting a region when a node joins.

45 Unstructured Peer-to-Peer Architectures Rely on randomized algorithms for constructing an overlay network The list of neighbors is also referred to as a partial view Assuming that entries need to be pushed to the selected peer If the node is in pull mode, it will waits for a response from the selected peer

46 Unstructured P2P Unstructured P2P organizes the overlay network as a random graph. 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. - Data items are randomly mapped to some node in the system & lookup is random, unlike the structured lookup in Chord.

47 Comparison 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

48 Superpeers In a collaborative content delivery network(CDN) nodes may offer storage for hosting copies of web pages allowing web clients to access pages nearby, and thus to access them quickly. The use of broker that collects resource usage for a number of nodes that are in each other’s proximity will allow to quickly select a node with sufficient resources.

49 Nodes such as those maintaining an index or acting as a broker are generally referred to as superpeers. They are organized in a peer-to-peer network, leading into a hierarchical organization.

50 Figure. A hierarchical organization of nodes into a superpeer network.

51 In this hierarchical organization, every regular peer is connected as a client to a superpeer. All communication from and to a regular peer proceeds through that peer’s associated superpeer. The client – superpeer relation is fixed. Whenever a regular peer joins the network, it attaches to one of the superpeers and remains attached until it leaves the network.

52 Hybrid Architectures Combine client-server and P2P architectures – Edge-server systems; e.g. ISPs, which act as servers to their clients, but cooperate with other edge servers to host shared content. – Collaborative distributed systems; e.g., BitTorrent, which supports parallel downloading and uploading of chunks of a file. First, interact with C/S system, then operate in decentralized manner.

53 Edge – Server Systems These systems are deployed in the Internet where servers are placed “at the edge” of the network. Eg: Internet Service Provider(ISP)

54 Edge-Server Systems Figure. Viewing the Internet as consisting of a collection of edge servers.

55 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.

56 Collaborative Distributed Systems BitTorrent BitTorrent Clients contact a global directory (Web server) to locate a.torrent file with the information needed to locate a tracker; a server that can supply a list of active nodes that have chunks of the desired file. Using information from the tracker, clients can download the file in chunks from multiple sites in the network. Clients must also provide file chunks to other users.

57 Collaborative Distributed Systems Figure. The principal working of BitTorrent

58 ARCHITECTURES VERSUS MIDDLEWARE middleware forms a layer between applications and distributed platforms. to a certain extent hiding the distribution of-data, processing,and control from applications. many middleware solutions have adopted an object-based architectural style, such as CORBA Others,like TIB/Rendezvous (TIBCO, 2005) provide middleware that follows the event-based architectural style

59 An approach that is generally considered better is to make middleware systems such that they are easy to configure, adapt, and customize as needed by anapplication. commonly followed approaches. Interceptors - an interceptor is nothing but a software construct that willbreak the usual flow of control and allow other (application specific) code to be executed.

60 interception as supported in many object based distributed systems. The basic idea is simple: an object A can call a method that belongs to an object B, while the latter resides on a different machine than A. a remote-object invocation is carried as a three-step approach: 1. Object A is offered a local interface that is exactly the same as the interface offered by object B. A simply calls the method available in' that interface. 2. The call by A is transformed into a generic object invocation, made possible through a general object-invocation interface offered by themiddleware at the machine where A resides. 3. Finally, the generic object invocation is transformed into a message that is sent through the transport-level network interface as offered by A's local operating system.

61 General Approaches to Adaptive Software What interceptors actually offer is a means to adapt the middleware. The need for adaptation comes from the fact that the environment in which distributed applications are executed changes continuously. Changes include those resulting from mobility, a strong variance in the quality-of-service of networks, failing hardware, and battery drainage, amongst others. Rather than making applications responsible for reacting to changes, this task is placed in the middleware.

62 These strong influences from the environment have brought many designers of middleware to consider the construction of adaptive software. three basic techniques to come to software adaptation: 1. Separation of concerns 2. Computational reflection 3. Component-based design

63 Separating concerns - way of modularizing systems separate the parts that implement functionality from those that take care of other things (known as extra functionalities) such as reliability, performance, security,etc. main problem is that we cannot easily separate these extra functionalities by means of modularization. For example, simply putting security into a separatemodule is not going to work it is hard to imagine how fault tolerance can be isolated into a separate box and sold as an independent service

64 Computational reflection ability of a program to inspect itself and, if necessary, adapt its behavior. Reflection has been built into programming languages, including Java, and offers a powerful facility for runtime modifications. In addition, some middleware systems provide the means to apply reflective techniques.

65 component-based design adaptation through composition A system may either be configured statically at design time, or dynamically at runtime. The latter requires support for late binding, a technique that has been successfully applied in programming language environments

66 SELF-MANAGEMENT IN DISTRIBUTED SYSTEMS distributed systems should be adaptive, but notably when it comes to adapting their execution behavior and not the software components they comprise. weneed to organize the components of a distributed system such that monitoring and adjustments can be done while on the other hand we need to decide where the processes are to be executed that handle the adaptation.

67 self-managing systems autonomic computing or self..star systems or self-managing systems- organizing distributed systems as high-level feedback-control systems allowing automatic adaptations to changes. the variety by which automatic adaptations are being captured: self-managing, self- healing, self-configuring, self-optimizing, and so on.

68 The Feedback Control Model Assumption that adaptations take place by means of one or more feedback control loops. Accordingly, systems that are organized by means of such loops are referred to as feedback control systems. Feedback control has since long been applied in various engineering fields, and its mathematical foundations are gradually also finding their way in computing systems

69

70 The core of a feedback control system is formed by the components that need to be managed. These components are assumed to be driven through controllable input parameters, but their behavior may be influenced by all kinds of uncontrollable input, also known as disturbance or noise input.

71 Three elements that form the feedback control loop. First,the system itself needs to be monitored, which requires that various aspects of the system need to be measured. Another part of the feedback control loop analyzes the measurements and compares these to reference values. This feedback analysis component forms the heart of the control loop, as it will contain the algorithms that decide on possible adaptations. The last group of components consist of various mechanisms to directly influence the behavior of the system.(placing replicas, changing scheduling priorities etc)


Download ppt "Architectures. Software Architecture Describe how the various software components are to be organized and how they should interact. It describe the organization."

Similar presentations


Ads by Google