Chapter 13 Architectural Design Slide Set to accompany Software Engineering: A Practitioner’s Approach, 8/e by Roger S. Pressman and Bruce R. Maxim Slides copyright © 1996, 2001, 2005, 2009, 2014 by Roger S. Pressman For non-profit educational use only May be reproduced ONLY for student use at the university level when used in conjunction with Software Engineering: A Practitioner's Approach, 8/e. Any other reproduction or use is prohibited without the express written permission of the author. All copyright information MUST appear if these slides are posted on a website for student use. Architectural design represents the structure of data and program components that are required to build a component-based system. Software architecture: the structure or structures of the system, which comprises software components, the externally visible properties of those components, and relationships among them. Why is it important? You would not attempt build a house without a blueprint, would you? You need to look at the big picture before you worry about details. It provides you with the big picture and ensures that you got it right. What is the work product? Data architecture, program structure, component properties, relationships. These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 8/e (McGraw-Hill, 2014). Slides copyright 2014 by Roger Pressman.
Why Architecture? The architecture is not the operational software. Rather, it is a representation that enables a software engineer to: (1) analyze the effectiveness of the design in meeting its stated requirements, (2) consider architectural alternatives at a stage when making design changes is still relatively easy, and (3) reduce the risks associated with the construction of the software. At the architecture level, internal properties ( details of an algorithm) are not specified. The relationships b/w components can be as simple as a procedure call from one module to another as complex as a database access protocol. There is a distinction b/w architecture and design. A design is an instance of an architecture similar to an object being an instance of a class. Client-server architecture: can design a network-centric software system in many different ways from the architecture using either the java platform or Microsoft platform. These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 8/e (McGraw-Hill, 2014). Slides copyright 2014 by Roger Pressman.
Why is Architecture Important? Representations of software architecture are an enabler for communication between all parties (stakeholders) interested in the development of a computer-based system. The architecture highlights early design decisions that will have a profound impact on all software engineering work that follows and, as important, on the ultimate success of the system as an operational entity. Architecture “constitutes a relatively small, intellectually graspable mode of how the system is structured and how its components work together” [BAS03]. These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 8/e (McGraw-Hill, 2014). Slides copyright 2014 by Roger Pressman.
Architectural Descriptions The IEEE Computer Society has proposed IEEE-Std- 1471-2000, Recommended Practice for Architectural Description of Software-Intensive System, [IEE00] to establish a conceptual framework and vocabulary for use during the design of software architecture, to provide detailed guidelines for representing an architectural description, and to encourage sound architectural design practices. The IEEE Standard defines an architectural description (AD) as a “a collection of products to document an architecture.” The description itself is represented using multiple views, where each view is “a representation of a whole system from the perspective of a related set of [stakeholder] concerns.” Architecture means different things to different people. The implication is that different stakeholders will see an architecture from different viewpoints that are driven by different sets of concerns. This implies that an architecture description is actually a set of work products that reflect different views of the system. A view is created according to rules and conventions defined in a viewpoint – “a specification of the conventions for constructing and using a view”. A number of different work products that are used to develop different views of the software architecture. These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 8/e (McGraw-Hill, 2014). Slides copyright 2014 by Roger Pressman.
Architectural Genres Genre implies a specific category within the overall software domain. Within each category, you encounter a number of subcategories. For example, within the genre of buildings, you would encounter the following general styles: houses, condos, apartment buildings, office buildings, industrial building, warehouses, and so on. Within each general style, more specific styles might apply. Each style would have a structure that can be described using a set of predictable patterns. The architectural genre will often dictate the specific architectural approach to the structure that must be built. Grady Booch: architectural genres for software-based systems (19 genres) Artificial Intelligence – systems that simulate or augment human cognition, locomotion, or other organic processes Commercial and non-profit – systems that are fundamental to operation of a business enterprise. Communications – systems that provide the infrastructure for transferring and managing data, for connecting users of that dat, or for presenting data at the edge of an infrastructure. Content authoring – systems that are used to create or manipulate textual or multimedia artifacts Devices – systems that interact with the physical world to provide some point service for an individual. Entertainment and sports, Financial, Games, Government, Industrial, Legal, etc. These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 8/e (McGraw-Hill, 2014). Slides copyright 2014 by Roger Pressman.
Architectural Styles Data-centered architectures Each style describes a system category that encompasses: (1) a set of components (e.g., a database, computational modules) that perform a function required by a system, (2) a set of connectors that enable “communication, coordination and cooperation” among components, (3) constraints that define how components can be integrated to form the system, and (4) semantic models that enable a designer to understand the overall properties of a system by analyzing the known properties of its constituent parts. Data-centered architectures Data flow architectures Call and return architectures Object-oriented architectures Layered architectures use an architectural style as a descriptive mechanism ( a template for construction) An architectural style is a transformation that is imposed on the design of an entire system. The intent is to establish a structure for all components of the system. An architectural pattern, like an architectural style, imposes a transformation on the design of an architecture. However, a pattern differs from a style in a number of fundamental ways: The scope of pattern is less broad, focusing on one aspect of the architecture rather than the architecture in its entirety A pattern imposes a rule on the architecture, describing how the software will handle some aspect of its functionality at the infrastructure level (e.g. concurrency) Architectural patterns tend to address specific behavioral issues within the context of the architecture (e.g. how real-time applications handle synchronization or interrupts) These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 8/e (McGraw-Hill, 2014). Slides copyright 2014 by Roger Pressman.
Data-Centered Architecture A data store (e.g., a file or database) resides at the center of this architecture and is accessed frequently by other components that update, add, delete, or otherwise modify data within the store. Client software accesses a central repository. In some cases the data repository is passive. That is, client software accesses the data independent of any changes to the data or actions of other client software. A variation on this approach transforms the repository into a “blackboard” that sends notifications to client software when data of interest to the client changes. Data-centered architectures promotes integrability. That is, existing components can be changed and new client components added to the architecture without concern about other clients (because the clients components operate independently) . In addition, data can be passed among clients using the blackboard mechanism (the blackboard component serves to coordinate the transfer of information b/w clients). Client components independently execute processes. These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 8/e (McGraw-Hill, 2014). Slides copyright 2014 by Roger Pressman.
Data Flow Architecture This architecture is applied when input data are to be transformed through a series of computational or manipulative components into output data. A pipe-an-filter pattern has a set of components, called filters, connected by pipes that transmit data form one component to the next. Each filter works independently of those components upstream and downstream, is designed to expect data input of a certain form, and produce data output of a specified form. The filter does not require knowledge of the workings of its neighboring filters. Batch sequential – the data flow degenerates into a single line of transforms This structure accepts a batch of data and then applies a series of sequential components to transform it. These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 8/e (McGraw-Hill, 2014). Slides copyright 2014 by Roger Pressman.
Call and Return Architecture This architectural style enables you to achieve a program structure that is relatively easy to modify and scale. A number of sub styles within this category Main program/ subprogram architecture: the classic program structure decomposes function into a control hierarchy where a “main” program invokes a number of program components that in turn may invoke still other components Remote procedure call architectures: The components of a main program/subprogram architecture are distributed across multiple computers on a network. These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 8/e (McGraw-Hill, 2014). Slides copyright 2014 by Roger Pressman.
Layered Architecture A number of different layers are defined, each accomplishing operations that progressively become closer to the machine instruction set. At outer layer, components service user interface operations, At the inner layer, components perform operating system interfacing. Intermediate layers provide utility services and application software functions. These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 8/e (McGraw-Hill, 2014). Slides copyright 2014 by Roger Pressman.
Architectural Patterns Concurrency—applications must handle multiple tasks in a manner that simulates parallelism operating system process management pattern task scheduler pattern Persistence—Data persists if it survives past the execution of the process that created it. Two patterns are common: a database management system pattern that applies the storage and retrieval capability of a DBMS to the application architecture an application level persistence pattern that builds persistence features into the application architecture Distribution— the manner in which systems or components within systems communicate with one another in a distributed environment A broker acts as a ‘middle-man’ between the client component and a server component. Architectural patterns address an application-specific problem within a specific context and under a set of limitations and constraints. The pattern proposes an architectural solution that can serve as the basis for architectural design. These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 8/e (McGraw-Hill, 2014). Slides copyright 2014 by Roger Pressman.
Architectural Design The software must be placed into context the design should define the external entities (other systems, devices, people) that the software interacts with and the nature of the interaction A set of architectural archetypes should be identified An archetype is an abstraction (similar to a class) that represents one element of system behavior The designer specifies the structure of the system by defining and refining software components that implement each archetype - The archetypes themselves do not provide enough implementation details. Therefore, the designer specifies --. These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 8/e (McGraw-Hill, 2014). Slides copyright 2014 by Roger Pressman.
Architectural Context Architectural Context Diagram (ACD) : model the manner in which software interacts with entities external to its boundaries. Type of External Entities: Superordinate systems: those systems that use the target system as part of some higher-level processing scheme Subordinate systems: those systems that are used by the target system and provide data or processing that are necessary to complete target system functionality Peer-level systems – those systems that interact on a peer-to-peer basis (i.e. provide information is either produced or consumed by the peers and the target system) Actors: entities (people, devices) that interact with the target system by producing or consuming information that is necessary for requisite processing. Each of these external entities communicates with the target system through an interface (the small rectangles) These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 8/e (McGraw-Hill, 2014). Slides copyright 2014 by Roger Pressman.
Archetypes An archetype is a class or pattern that represents a core abstraction that is critical to the design of an architecture for the target system. In general, a relatively small set of archetypes is required to design even relatively complex systems. The target system architecture is composed of these archetypes, which represent stable elements of the architecture but may be instantiated many different ways based on the behavior of the system. Node: represents a cohesive collection of input and output elements of the home security function (e.g. various sensors, a variety of alarm indicators) Detector: abstraction that encompasses all sensing equipment that feeds information into the target system. Indicator: abstraction that represents all mechanisms (e.g. alarm siren, flashing lights, bell) for indicating that an alarm condition is occurring. Controller: abstraction that depicts the mechanism that allows the arming or disarming of a node. If controllers on a network, they have the ability to communicate with one another. Recall that the archetypes form the basis for the architecture but are abstraction that must be further refined as architectural design proceed. These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 8/e (McGraw-Hill, 2014). Slides copyright 2014 by Roger Pressman.
Component Structure These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 8/e (McGraw-Hill, 2014). Slides copyright 2014 by Roger Pressman.
Refined Component Structure These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 8/e (McGraw-Hill, 2014). Slides copyright 2014 by Roger Pressman.
Architectural Considerations Economy – The best software is uncluttered and relies on abstraction to reduce unnecessary detail. Visibility – Architectural decisions and the reasons for them should be obvious to software engineers who examine the model at a later time. Spacing – Separation of concerns in a design without introducing hidden dependencies. Symmetry – Architectural symmetry implies that a system is consistent and balanced in its attributes. Emergence – Emergent, self-organized behavior and control. These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 8/e (McGraw-Hill, 2014). Slides copyright 2014 by Roger Pressman.
Architectural Decision Documentation Determine which information items are needed for each decision. Define links between each decision and appropriate requirements. Provide mechanisms to change status when alternative decisions need to be evaluated. Define prerequisite relationships among decisions to support traceability. Link significant decisions to architectural views resulting from decisions. Document and communicate all decisions as they are made. These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 8/e (McGraw-Hill, 2014). Slides copyright 2014 by Roger Pressman.
Architectural Tradeoff Analysis 1. Collect scenarios. 2. Elicit requirements, constraints, and environment description. 3. Describe the architectural styles/patterns that have been chosen to address the scenarios and requirements: • module view • process view • data flow view 4. Evaluate quality attributes by considered each attribute in isolation. 5. Identify the sensitivity of quality attributes to various architectural attributes for a specific architectural style. 6. Critique candidate architectures (developed in step 3) using the sensitivity analysis conducted in step 5. ATAM: establishes an iterative evaluation process for software architectures. [Kaz98] 3. The architecture style9s) should be described using one of the following architectural views: Module view: for analysis of work assignments with components and the degree to which information hiding has been achieved. Process view: for analysis of system performance Data flow view: for analysis of the degree to which the architecture meets functional requirements 4. The number of quality attributes chosen for analysis a function of the time available for review and the degree to which quality attributes are relevant to the system at hand. 5. This can be accomplished by making small changes in the architecture and determining how sensitive a quality attribute, say performance, is to the change. Any attributes that are significantly affected by variation in the architecture are termed sensitivity points. These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 8/e (McGraw-Hill, 2014). Slides copyright 2014 by Roger Pressman.
Architectural Complexity the overall complexity of a proposed architecture is assessed by considering the dependencies between components within the architecture [Zha98] Sharing dependencies represent dependence relationships among consumers who use the same resource or producers who produce for the same consumers. Flow dependencies represent dependence relationships between producers and consumers of resources. Constrained dependencies represent constraints on the relative flow of control among a set of activities. Sharing and flow dependencies are similar to the concept of Coupling. These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 8/e (McGraw-Hill, 2014). Slides copyright 2014 by Roger Pressman.
ADL Architectural description language (ADL) provides a semantics and syntax for describing a software architecture Provide the designer with the ability to: decompose architectural components compose individual components into larger architectural blocks and represent interfaces (connection mechanisms) between components. These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 8/e (McGraw-Hill, 2014). Slides copyright 2014 by Roger Pressman.
Architecture Reviews Assess the ability of the software architecture to meet the systems quality requirements and identify potential risks Have the potential to reduce project costs by detecting design problems early Often make use of experience-based reviews, prototype evaluation, and scenario reviews, and checklists These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 8/e (McGraw-Hill, 2014). Slides copyright 2014 by Roger Pressman.
Patter-Based Architecture Review Identify and discuss the quality attributes by walking through the use cases. Discuss a diagram of system’s architecture in relation to its requirements. Identify the architecture patterns used and match the system’s structure to the patterns’ structure. Use existing documentation and use cases to determine each pattern’s effect on quality attributes. Identify all quality issues raised by architecture patterns used in the design. Develop a short summary of issues uncovered during the meeting and make revisions to the walking skeleton. These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 8/e (McGraw-Hill, 2014). Slides copyright 2014 by Roger Pressman.
Agility and Architecture To avoid rework, user stories are used to create and evolve an architectural model (walking skeleton) before coding Hybrid models which allow software architects contributing users stories to the evolving storyboard Well run agile projects include delivery of work products during each sprint Reviewing code emerging from the sprint can be a useful form of architectural review These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 8/e (McGraw-Hill, 2014). Slides copyright 2014 by Roger Pressman.