Presentation is loading. Please wait.

Presentation is loading. Please wait.

Unit 2 Architectural Styles and Case Studies www.bookspar.com | Website for Students | VTU NOTES | QUESTION PAPERS | NEWS | RESULTS 1.

Similar presentations


Presentation on theme: "Unit 2 Architectural Styles and Case Studies www.bookspar.com | Website for Students | VTU NOTES | QUESTION PAPERS | NEWS | RESULTS 1."— Presentation transcript:

1 Unit 2 Architectural Styles and Case Studies www.bookspar.com | Website for Students | VTU NOTES | QUESTION PAPERS | NEWS | RESULTS 1

2 Architectural Style- definition An architectural style defines Vocabulary of components and connectors types and a set of constraints on how they can be combined. www.bookspar.com | Website for Students | VTU NOTES | QUESTION PAPERS | NEWS | RESULTS 2

3 List of Common Architectural Styles Pipes and Filters Objects Implicit invocation Layered Interpreters Repositories Process control www.bookspar.com | Website for Students | VTU NOTES | QUESTION PAPERS | NEWS | RESULTS 3

4 Pipes and filters Each component has a set of inputs and outputs. A component( Filters) reads streams of data on its inputs and produces streams of data on its outputs. Connectors (Pipes) are responsible for data transmission from output of one filters to input of another filters. Components are called filters because output begins before the entire input is consumed. Connectors are called pipes they allow to transmit the data. www.bookspar.com | Website for Students | VTU NOTES | QUESTION PAPERS | NEWS | RESULTS 4

5 5

6 Types Pipelines: linear sequences of filters Bounded pipes: Restricts the amount of data that can reside on a pipe Typed pipes: Require that the data passed between two filters have a well defined type. Batch sequential system: Each filters processes all of its input data as a single entity. www.bookspar.com | Website for Students | VTU NOTES | QUESTION PAPERS | NEWS | RESULTS 6

7 Advantages Easy to understand the Input and Output behaviour of system Supports reuse- any two filters can be hooked together (provided they agree on the data that are being transmitted ) Easy to maintain- Easy to enhance- new filters can be added to existing systems old filters can be replaced for improvement. Permit to analyse throughput and deadlock Supports concurrent execution www.bookspar.com | Website for Students | VTU NOTES | QUESTION PAPERS | NEWS | RESULTS 7

8 Disadvantages Often leads batch processing- not good for interactive application. Often troubled to maintain correspondences between two separate but related streams. Degraded performance due additional work to each filter to parse/un-parse data. www.bookspar.com | Website for Students | VTU NOTES | QUESTION PAPERS | NEWS | RESULTS 8

9 Data Abstraction & OO : Components & Connectors Components: Classes & Objects Connectors: Method calls www.bookspar.com | Website for Students | VTU NOTES | QUESTION PAPERS | NEWS | RESULTS 9

10 Data abstraction and Object Oriented Organization Data representation and associated operations are encapsulated in abstract data type or object. Components in this type are instances of abstract data types 2 important aspects Objects preserves the integrity of representation Representation is hidden from object. objects interact through function and procedure invocations. www.bookspar.com | Website for Students | VTU NOTES | QUESTION PAPERS | NEWS | RESULTS 10

11 Advantages Easy to change implementation without affecting others. Object hides its representation from its clients. It is possible to change without affecting them. Helps to decompose the problem into collection of interacting agents. www.bookspar.com | Website for Students | VTU NOTES | QUESTION PAPERS | NEWS | RESULTS 11 Disadvantages The object must know the identity of other object in order to interact. Side effect problem: If A uses object B, C also uses B, then C’s effect on B is unexpected side effect to A.

12 Layered Systems: Components & Connectors Components: Layers Connectors: Protocols that define how layers interact Components (each layer) provide service to layer above and Use service of layers below. Inner layers are hidden from all except the adjacent outer layer www.bookspar.com | Website for Students | VTU NOTES | QUESTION PAPERS | NEWS | RESULTS 12 Layer 1 Layer 2 Layer 3

13 Advantages Supports increased levels of abstraction- helps in decomposing complex problem Support enhancement- changes to function affect only two layers Support reuse-Allow different implementation to same layer. www.bookspar.com | Website for Students | VTU NOTES | QUESTION PAPERS | NEWS | RESULTS 13 Cannot be used for all types of system Even if a system can logically structured in layers-exhibits performance degradation. Difficult to find right levels of abstraction. Disadvantages

14 Repositories -Black board Repository styles: – Central Data structure represents the current state – A collection of independent components operate on the central data store Datastore and Blackboard – Database-Traditional database- Transaction in input stream triggers the process to execute – Black board-If the current state of the central data structure is the main trigger for selecting processes to execute www.bookspar.com | Website for Students | VTU NOTES | QUESTION PAPERS | NEWS | RESULTS 14

15 Repository : Components & Connectors Components – Data store- central data structures represents the current state and a collection of independent components on central data store. – Clients, that interact with the store Connectors – Queries www.bookspar.com | Website for Students | VTU NOTES | QUESTION PAPERS | NEWS | RESULTS 15

16 The blackboard Direct access computation memory www.bookspar.com | Website for Students | VTU NOTES | QUESTION PAPERS | NEWS | RESULTS 16 Blackboard (shared data) ks1 ks7 ks2 ks8 ks3 ks4 ks5ks6

17 Repository : Key Characteristics  The Architecture is centered, widely accessed data store  Data store & clients. Two main variants:  Database  Passive data store,  active clients that poll the database.  Blackboard  Active data store that notifies each client of data changes of interest to the client.  (Clients also called knowledge sources.) www.bookspar.com | Website for Students | VTU NOTES | QUESTION PAPERS | NEWS | RESULTS 17

18 Blackboard: The blackboard model is usually presented with 3 major parts The knowledge sources: Separate, independent parts of application dependent knowledge The blackboard data structure: Application dependent, problem solving state data. Knowledge sources can make changes to blackboard that lead incrementally to a solution to the problem. Control: It is driven by the state of black board. Knowledge sources responds whenever changes are made to blackboard www.bookspar.com | Website for Students | VTU NOTES | QUESTION PAPERS | NEWS | RESULTS 18

19 Repository : Strengths & Weaknesses Clients are relatively independent of each other. Data store is independent of the clients. – Scalable (i.e., new clients can be easily added) – Modifiable Strong dependence on data store… www.bookspar.com | Website for Students | VTU NOTES | QUESTION PAPERS | NEWS | RESULTS 19

20 Interpreters-virtual machine memory inputs Computation Outputs selected instructions selected data data access www.bookspar.com | Website for Students | VTU NOTES | QUESTION PAPERS | NEWS | RESULTS 20 Data (program state) Program being interpreted Internal interpreter state Simulated Interpretation engine

21 Interpreters An interpreter includes the pseudo-program being interpreted and the interpretation engine. Pseudo-program includes the program and activation record Interpretation engine includes definition of interpreter and current state of its execution. Interpreter engine includes: – An interpretation engine to do work – Memory –contains the psuedocode – Control state of the interpretation engine – Current state of the program being simulated. www.bookspar.com | Website for Students | VTU NOTES | QUESTION PAPERS | NEWS | RESULTS 21

22 Process control Continuous processes of many kinds convert input materials to products with specific properties by performing operations on the inputs and on intermediate products. www.bookspar.com | Website for Students | VTU NOTES | QUESTION PAPERS | NEWS | RESULTS 22

23 Process control definitions Process variables: P roperties of the processes that can be measured; Controlled variable :P rocess variable whose value the system is intended to control Input variable: Process variable that measures an input to the process Manipulated variable :P rocess variable whose value can be changed by the controller Set point: The desired value for a controlled variable Open loop system: System in which information about process variables is not used to adjust the system Closed loop system : systems in which information about process variables is used to manipulate a process variable to compensate for variations in process variables and operating conditions Feedback control system: The controlled variable is measured, and the result is used to manipulate one or more of the process variables www.bookspar.com | Website for Students | VTU NOTES | QUESTION PAPERS | NEWS | RESULTS 23

24 Process Control : Example Open-loop temperature control. www.bookspar.com | Website for Students | VTU NOTES | QUESTION PAPERS | NEWS | RESULTS 24

25 Process Control: Example Closed-loop temperature control. www.bookspar.com | Website for Students | VTU NOTES | QUESTION PAPERS | NEWS | RESULTS 25

26 Process control.. www.bookspar.com | Website for Students | VTU NOTES | QUESTION PAPERS | NEWS | RESULTS 26

27 Process control.. www.bookspar.com | Website for Students | VTU NOTES | QUESTION PAPERS | NEWS | RESULTS 27

28 A software paradigm for Process control An architecture style for software that controls continuous processes can be based on the process control model Computational elements – Separate the process of interest from control policy – Process definition: Mechanism for manipulating process variables. – Control algorithm-for deciding how to manipulate process variables. Data elements – Process variable, set points, and sensors. The control loop paradigm – Establishes the relation, the control algorithm exercises. – It collect information and tunes the process variable to get the intended state. www.bookspar.com | Website for Students | VTU NOTES | QUESTION PAPERS | NEWS | RESULTS 28

29 Distributed processes Common form of distributed system: Client – server organization In this case a server represents a process that provides services to other processes(clients). Sever does not know in advance the identities or number of clients that will access it at run time Clients know the server identity and access it. www.bookspar.com | Website for Students | VTU NOTES | QUESTION PAPERS | NEWS | RESULTS 29

30 Main program / subroutine Main program acts as the driver for the subroutine Provide a control loop for sequencing through the subroutine in some order. www.bookspar.com | Website for Students | VTU NOTES | QUESTION PAPERS | NEWS | RESULTS 30

31 Domain specific software architecture Provide an organizational structure suited for particular applications –avionics, command and control, vehicle-management systems. www.bookspar.com | Website for Students | VTU NOTES | QUESTION PAPERS | NEWS | RESULTS 31

32 State transition systems These systems are defined in terms of a set of states and a set of named transitions that move a system from one state to another. www.bookspar.com | Website for Students | VTU NOTES | QUESTION PAPERS | NEWS | RESULTS 32

33 Heterogeneous Architecture Architectural style can be combined in several ways Hierarchical – A component of a system organized in one architectural style may have different internal structure. – Example: Unix Pipeline Combining styles to permit a single component may use mixture of architectural connectors. – Example: A component might access a repository through part of its interface, but interact through pipes. Combine styles to completely elaborate one level of architectural description in a completely different architectural style. www.bookspar.com | Website for Students | VTU NOTES | QUESTION PAPERS | NEWS | RESULTS 33


Download ppt "Unit 2 Architectural Styles and Case Studies www.bookspar.com | Website for Students | VTU NOTES | QUESTION PAPERS | NEWS | RESULTS 1."

Similar presentations


Ads by Google