Rationale for Software Architecture Design Bedir Tekinerdoğan Billkent University, Department of Computer Engineering e:mail - bedir@cs,bilkent..edu.tr http://www.cs.bilkent.edu.tr/~bedir/ Contents Definitions for Software Architecture Rationale for Software Architecture Common Misconceptions Software Architecture in the Life Cycle Example Architecture Project Bedir Tekinerdoğan Software Architecture Design 2 1
Definitions for Software Architecture Bedir Tekinerdoğan Software Architecture Design 3 What is Architecture? Architecture (Webster s): 1: the art or science of building; specifically: the art or practice of designing and building structures and especially habitable ones 2 a>:formation or construction as or as if as the result of conscious act <the architecture of the garden> b: a unifying or coherent form or structure <the novel lacks architecture> 3: architectural product or work 4: a method or style of building 5: the manner in which the components of a computer or computer system are organized and integrated Bedir Tekinerdoğan Software Architecture Design 4 2
Architecture is... The structure of things: Buildings Vehicles Computers... Software Bedir Tekinerdoğan Software Architecture Design 5 Discussion... What is software architecture according to you? Software Architecture is Bedir Tekinerdoğan Software Architecture Design 6 3
Software Architecture - Booch 1991 The logical and physical structure of a system, forged by all the strategic and tactical design decisions applied during development Architecture is high level structure of software system G. Booch. Object-Oriented Analysis and Design. Addison-Wesley, 1991 Bedir Tekinerdoğan Software Architecture Design 7 Software Architecture - Perry and Wolf 92 We distinguish three different classes of architectural elements: processing elements; data elements; and connection elements. The processing elements are those components that supply the transformation on the data elements; the data elements are those that contain the information that is used and transformed; the connecting elements (which at times may be either processing or data elements, or both) are the glue that holds the different pieces of the architecture together. explicitly considers the types of architectural components and relations. D.E. Perry & A.L. Wolf. Foundations for the Study of Software Architecture. Software Engineering Notes. Vol. 17. No. 2. pp 40-52, 1992. Bedir Tekinerdoğan Software Architecture Design 8 4
Software Architecture - Garlan and Shaw 1993...beyond the algorithms and data structures of the computation; designing and specifying the overall system structure emerges as a new kind of problem. Structural issues include gross organization and global control structure; protocols for communication, synchronization, and data access; assignment of functionality to design elements; physical distribution; composition of design elements; scaling and performance; and selection among design alternatives. This is the software architecture level of design. provides additional specializations of the structural issues has led to so-called architectural styles D. Garlan & M. Shaw. An Introduction to Software Architecture. In. V. Ambriola and G. Tortora (eds.). Advances in Software Engineering and Knowledge Engineering, Vol 2. World Scientific, 2003. Bedir Tekinerdoğan Software Architecture Design 9 Software Architecture Garlan and Perry 1995 The structure of the components of a program/system, their interrelationships, and principles and guidelines governing their design and evolution over time. design information in the architectural specification D. Garlan & D. Perry. Introduction to the Special Issue on Software Architecture. IEEE Transactions on Software Engineering, Vol. 21, No. 4, pp. 269-274, 1995. Bedir Tekinerdoğan Software Architecture Design 10 5
Software Architecture - IEEE 1471-2000 Software architecture is the fundamental organization of a system, embodied in its components, their relationships to each other and the environment, and the principles governing its design and evolution IEEE. IEEE Product No. : SH94869-TBR: Recommended Practice for Architectural Description of Software Intensive Systems. IEEE Standard No. 1471-2000. Available at: http://shop.ieee.org/store/. Bedir Tekinerdoğan Software Architecture Design 11 Software Architecture - Bass et al. 2003 The software architecture of a program or computing system is the structure or structures of the system, which comprise software components, the externally visible properties of those components, and the relationships among them. more than one structure and includes the behavior of the components as part of the architecture. The term component here is used as an abstraction of varying components. L. Bass. P. Clements. R. Kazman. Software Architecture in Practice. Addison-Wesley, 2003. Bedir Tekinerdoğan Software Architecture Design 12 6
Summary on Definitions Definition of Software Architecture Design has evolved together with technical developments Different definitions but a common agreement on Architecture includes gross level structure including components and connections among these components Bedir Tekinerdoğan Software Architecture Design 13 Rationale for Software Architecture Bedir Tekinerdoğan Software Architecture Design 14 7
Discussion... What is the rationale for software architecture according to you? Bedir Tekinerdoğan Software Architecture Design 15 Rationale for Software Architecture 1. Improved understanding because of a higher level abstract specification 2. Vehicle for communication among different stakeholders because of a common abstract specification 3. Manifestation of the earliest design decisions 4. Guides software development process 5. Supports organization of development project 6. Provides gross level reuse Bedir Tekinerdoğan Software Architecture Design 16 8
1 Abstract Specification Abstraction Focus only on relevant properties of the problem Ignore details. G. Booch. Object-Oriented Analysis and Design. Addison-Wesley, 1991 Bedir Tekinerdoğan Software Architecture Design 17 Abstract Specification Engine rotates carries carries Chassis carries Wheels stops Break Bedir Tekinerdoğan Software Architecture Design 18 9
Abstract Specification Architecture represents a high level abstract specification. Abstraction helps to cope with complexity Abstraction improves understanding of the software system. from: RUP Bedir Tekinerdoğan Software Architecture Design 19 2 - Stakeholder Communication Stakeholder is any person who has interest in the architecture Stakeholders: end users managers developers maintainers analysts Designer Bedir Tekinerdoğan Software Architecture Design 20 10
2 - Stakeholder Communication Software architecture provides a common medium for communication among stakeholders This will improve understanding of the system among stakeholders Bedir Tekinerdoğan Software Architecture Design 21 3 Coping with Evolution About 80% cost of a software system occurs after initial deployment. Software systems change over their lifetimes. Often! Changes can be categorized into: Local: change to a single element Non-Local: change to multiple elements but leaves architecture intact Architectural: change is systemic, and affects the overal structure Effective Architecture is one in which the most likely changes are also the easiest to make Bedir Tekinerdoğan Software Architecture Design 22 11
3 Coping with Evolution Architecture can help dealing with changes and evolution. In case of proper architecture definition, the changes will be limited to the abstraction boundaries. Architecture provides the balance between fixed and adaptable parts of the system There is nothing permanent except change. ~ Heraclitus Bedir Tekinerdoğan Software Architecture Design 23 4 - Guides Software Development Process Problem understanding Software Architecture Analysis Design Implementation Architecture is explicit Focus on Architectural Components. Analyse and Design based on architectural components. Bedir Tekinerdoğan Software Architecture Design 24 12
5 Organization of the Development Project The architecture influences the organizational structure for development/maintenance efforts. Examples include division into teams units for budgeting, planning basis of work breakdown structure organization of documentation basis of integration basis of test plans, testing basis of maintenance Incremental deployment Bedir Tekinerdoğan Software Architecture Design 25 6 Large Scale Reuse Software Architecture is an abstract specification representing set of systems and as such can be reused for systems exhibiting similar structure and requirements can promote software product lines Car Architecture carries Engine carries rotates Wheels Break stops Chassis carries Bedir Tekinerdoğan Software Architecture Design 26 13
Common Misconceptions Bedir Tekinerdoğan Software Architecture Design 27 Architecture is Just paper Design Infrastructure Technology Structure Is flat Art G. Booch. Handbook of Software Architecture, 2004. Bedir Tekinerdoğan Software Architecture Design 28 14
Architecture is just paper... Every system has an architecture; either visible or not The architecture eventually resides in executable code A system s architecture may be visualized in models; which can be executable Bedir Tekinerdoğan Software Architecture Design 29 Architecture vs. Design All architecture is design, but not all design is architecture (e.g. detailed design) Architecture focuses on significant design decisions, decisions that are both structurally and behaviorally important as well as those that have a lasting impact on the performance, reliability, cost, and resilience of the system Architecture is at a higher abstraction level Bedir Tekinerdoğan Software Architecture Design 30 15
Architecture vs. Infrastructure Infrastructure is an important part of architecture, but architecture is more than just infrastructure infrastructure could be just a view on the architecture Bedir Tekinerdoğan Software Architecture Design 31 Architecture vs. Technology A given technology only serves to implement some dimension of an architecture The network is the architecture The transaction server is the architecture J2EE is the architecture Architecture is more than just a list of products Architecture implementation is shaped by technology, but a robust architecture is not directly bound to technology Bedir Tekinerdoğan Software Architecture Design 32 16
Architecture vs. Structure Architecture includes structure, but not every structure is architecture Architecture is an abstraction of underlying structures Architecture is more than structure; it also involves behavior, design decisions, constraints... Bedir Tekinerdoğan Software Architecture Design 33 Architecture - Views Architecture is flat only in trivial systems in which one architectural view is sufficient However, multiple stakeholders with multiple concerns lead to multiple architectural views A complex system can usually not be presented using a single architectural view Bedir Tekinerdoğan Software Architecture Design 34 17
Architecture vs. Art Current software applications are too complex The art or creative part of software architecture is minimal Architecture design is an explicit rational activity Several architecture design methods exist for this purpose Bedir Tekinerdoğan Software Architecture Design 35 Software Architecture in the Life Cycle Bedir Tekinerdoğan Software Architecture Design 36 18
Software Engineering Phases Phases Requirements Analysis Analysis Design Implementation Testing What? (client) What? (domain) How? (Detailed) Do Test Where is Architecture Design? Bedir Tekinerdoğan Software Architecture Design 37 Software Architecture - Design Phase Phases Requirements Analysis Software Architecture Analysis Design Implementation Testing What? (client) What? (domain, gross-level) What? (domain, arch. comp) How? (Detailed) Do Test Bedir Tekinerdoğan Software Architecture Design 38 19
Design, Evaluate and Realize Architecture Requirements Analysis Design Software Architecture Design Evaluate (Test) Realize (Implement) Analysis & Design Bedir Tekinerdoğan Software Architecture Design 39 Influences on Software Architecture Bedir Tekinerdoğan Software Architecture Design 40 20
Influences on Architecture - Stakeholders Different stakeholders who have interest in the architecture Stakeholders have different concerns Some of the concerns might be contradictionary The architect must be able to identify and balance the stakeholders concerns Bedir Tekinerdoğan Software Architecture Design 41 Influences on Architecture - Organization An architecture is influenced by the structure or nature of the development organization. Three classes of influence that come from the developing organization: immediate business An organization may have an immediate business investment in certain assets, such as existing architectures and the products based on them. The foundation of a development project may be that the proposed system is the next in a sequence of similar systems, and the cost estimates assume a high degree of asset re-use. long-term business, An organization may wish to make a long-term business investment in an infrastructure to pursue strategic goals and may view the proposed system as one means of financing and extending that infrastructure. organizational structure. The organizational structure can shape the software architecture Bedir Tekinerdoğan Software Architecture Design 42 21
Influences on Architecture - Experience Architecture is influenced by the background and experience of the architect From experience architect will use best practices and avoid approaches did not work for earlier projects Architectural choices may also come from an architect's education and training, exposure to successful architectural patterns, or exposure to systems that have worked particularly poorly or particularly well. Bedir Tekinerdoğan Software Architecture Design 43 Influences on Architecture Environment Architectures are influenced by the technical environment Might include adopted tools, standard industry practices, or software engineering techniques Bedir Tekinerdoğan Software Architecture Design 44 22
Influences on the Architecture Architects are influenced by the requirements for the product as derived from its stakeholders, the structure and goals of the developing organization, the available technical environment, and their own background and experience. Architect needs more than just technical skills. Diplomacy, negotiation, and communication skills are essential! Bedir Tekinerdoğan Software Architecture Design 45 Architecture Influences Organization The architecture affects the structure of the developing organization it particularly prescribes the units of software that must be implemented (or otherwise obtained) and integrated to form the system. These units are the basis for the development project's structure. The architecture can affect the goals of the developing organization A successful system built from architecture can enable a company to establish a foothold in a particular market area. The architecture can provide opportunities for the efficient production and deployment of similar systems and the organization may adjust its goals to take advantage of its newfound expertise to plumb the market. Bedir Tekinerdoğan Software Architecture Design 46 23
Architecture Influences - Requirements The architecture can affect customer requirements for the next system by giving the customer the opportunity to receive an enhanced system The customer may be willing to relax some requirements to benefit from the architecture (reuse!) Bedir Tekinerdoğan Software Architecture Design 47 Architecture Influences - Environment The Architecture will influence the technical environment. A proper architecture might require standard industry practices, architectural patterns, tools, software engineering techniques Bedir Tekinerdoğan Software Architecture Design 48 24
Mutual Influences Several factors influence the architecture The architecture influences these factors A cycle of influence Bedir Tekinerdoğan Software Architecture Design 49 Example Software Architecture Project Bedir Tekinerdoğan Software Architecture Design 50 25
Trader Project Industry-as-laboratory project Television Related Architecture Design to Enhance Reliability (Trader) Context: Embedded Systems and in particular consumer electronics (Digital TV) Period: Sept.2004-Aug. 2009 10 partners (industrial and academic) 22 fte/yr, 7 PhDs, 2 Postdocs, around 3-4 miljon euro funded by The Netherlands Ministry of Economical Affairs under the Bsik programme ESI, Eindhoven: project location Carrying Industrial Partner Bedir Tekinerdoğan Software Architecture Design 51 Software that controls the system Slide from: B. Pronk, NXP (Philips Semiconductors) Bedir Tekinerdoğan Software Architecture Design 52 26
Conceptual Architecture DTV Control Layer Command Handler Communication Manager Application Manager Program Manager Program Installer Content Browser Teletext EPG Last State Manager Graphics Controller C/A Video Controller Audio Controller Streaming Layer Tuner Audio Out Video Out Data Decoder & Interpreter Graphics Video Processor Audio Processor KEY Layer Module Dependency (uses) Bedir Tekinerdoğan Software Architecture Design 53 Trader Context The universal trend of the increased functionality, openness and shift from hardware to software puts serious challenges on quality factors such as performance, availability and reliability In fact, embedded systems are now largely defined and controlled by software as such the required quality factors are likewise more dependent on the quality of the adopted software and to a lesser degree on the hardware. it is expected that the risk of failures in embedded systems can increase to a mission critical level. to minimize this risk it is required that appropriate reliability analysis and design techniques are provided so that potential failures can be predicted or corrected in time. Bedir Tekinerdoğan Software Architecture Design 54 27
DTV Reliability Problems Aspect Ratio Problems Mode Confusion Decreased Resolution H. Sözer, C. Hofmann, B. Tekinerdogan, & M. Akşit. Detecting Mode Inconsistencies in Component-Based Embedded Software, in proceedings of workshop on Architecting Dependable Systems, Edinburgh, Scotland, 2007. Bedir Tekinerdoğan Software Architecture Design 55 Three important steps for improving the reliability 1. Detect the unhealthy state at run-time; 2. Keep unhealthy state local; 3. Hide consequences for user and recover from the unhealthy state. All within the TV domain and its legacy, and also shaped by the resource constraints. Bedir Tekinerdoğan Software Architecture Design 56 28
Some important issues to consider 1. It is not feasible to design a TV HW and SW architecture with zero defects; 2. Localizing and recovering from failures is the only feasible option: This implies a control system solution. 3. Due to different TV sub-systems it is not possible to generalize the problem to a single control strategy: This implies various control architectures dedicated to the TV subsystems; Bedir Tekinerdoğan Software Architecture Design 57 Important features to consider 4. Subsystems are connected together to form the TV system: This implies coordinated distributed control architecture; 5. There are a large set of control strategies shaped by the resource constraints. Design and run-time strategies are required to select the optimal strategy for a given TV system: This requires techniques for dealing with large problem & solution spaces and adaptive control strategies. Bedir Tekinerdoğan Software Architecture Design 58 29
To design a stable control system, a common TV architecture must be defined Is it possible to define a general TV SW HW architecture? What are the variations/commonalities among multiple TV systems? Common architecture Bedir Tekinerdoğan Software Architecture Design 59 Determining the domain of control Designing various control architectures dedicated to the TV subsystems: What is the domain & granularity of the control for optimally localizing and recovering from the errors? Control 1 Control 2 Control N Bedir Tekinerdoğan Software Architecture Design 60 30
What is the trade-off between the control and TV viewpoints? What if the control architecture requires different decomposition of the TV architecture so that errors can be localized and handled? How to deal with the resource constraints? Control 1 Bedir Tekinerdoğan Software Architecture Design 61 Summary Software architecture design plays an important role in structuring software Several software architecture design definitions which have evolved over the years There is now a more mature understanding on the concept of software architecture Software architecture represents the high level abstraction and as such improves understanding of the system, supports stakeholder communication, guides subsequent software development process, supports the organization of project, and provides gross level reuse. Software architecture is influenced by stakeholder requirements, organization, technical environment and experience of the architect; and vice versa. Bedir Tekinerdoğan Software Architecture Design 62 31