(Perry & Wolf 92) Software Architecture (Garlan & Shaw
Total Page:16
File Type:pdf, Size:1020Kb
ICS 221, Winter 2001 Software Architecture Software Architecture (Perry & Wolf 92) “Architecture is concerned with the selection of architectural elements, their interactions, and the Software Architecture constraints on those elements and their interactions necessary to provide a framework in which to satisfy the requirements and serve as a basis for the design.” David S. Rosenblum ICS 221 “Design is concerned with the modularization and detailed interfaces of the design elements, their Winter 2001 algorithms and procedures, and the data types needed to support the architecture and to satisfy the requirements.” Software Architecture Software Architecture (Garlan & Shaw 93) (Shaw & Garlan 96) “Software architecture is a level of design that goes “The architecture of a software system defines beyond the algorithms and data structures of the that system in terms of computational computation; designing and specifying the overall components and interactions among those system structure emerges as a new kind of problem. Structural issues include gross organization and components. … In addition to specifying the global control structure; protocols for communication, structure and topology of the system, the synchronization, and data access; assignment of architecture shows the correspondence functionality to design elements; physical between the requirements and elements of distribution; composition of design elements; scaling the constructed system, thereby providing and performance; and selection among design some rationale for the design decisions.” alternatives.” Analogies with Differences Between Civil and Civil Architecture Software Architecture Civil Engineering and Civil Architecture “Software systems are like cathedrals—first we are concerned with the engineering and design of build them and then we pray.” civic structures (roads, buildings, bridges, etc.) — Sam Redwine ! Multiple views ! Civil: Artist renderings, elevations, floor plans, blueprints ! Physical vs. conceptual ! Software: Code, object design, boxes-and-arrows, GUI ! Static vs. dynamic ! Architectural styles ! Civil: Classical, Romanesque, Gothic, Renaissance, Baroque, ! Little evolution vs. frequent evolution Art Deco ! Different mathematical and scientific bases ! Software: Pipe-and-filter, client/server, layered system ! Influence of style on engineering principle ! Influence of style on choice of materials © 2001 David S. Rosenblum 1 ICS 221, Winter 2001 Software Architecture Elements of Software Architecture Components " Perry & Wolf " Shaw & Garlan: ! " Structural Elements " Components A component is a building block that is " Processing " Interconnections … " Data " Rules of Composition " Connecting (“glue”) " Rules of Behavior ! A unit of computation or a data store, with " Form: Weighted Properties and an interface specifying the services it Relationships " Rationale provides ! A unit of deployment ! Medvidovic & Taylor ! Architectural Elements: Components, Connectors, ! A unit of reuse Configurations ! Tool Support The Difference Between Components and Objects Connectors ! Objects have a unique identity ! A connector is a building block that enables interaction among components ! Shared variables ! Objects have a persistent state ! Procedure calls (local or remote) ! Messages and message buses ! Objects are instances of a class, with classes ! Events arranged in hierarchies according to ! Pipes inheritance relationships (object-oriented ! Client/server middleware design and programming) ! Connectors may be implicit or explicit ! Components vary more dramatically in size The Difference Between Components and Connectors Configurations ! A component is (or should) independent ! A configuration is … of the context in which it is used to ! The overall structure of a software architecture ! The topological arrangement of components and provide functionality connectors ! A framework for checking for compatibility between interfaces, communication protocols, ! A connector is (or should be) semantics, … completely dependent on the context in which it is used to connect components ! Usually constructed according to an architectural style © 2001 David S. Rosenblum 2 ICS 221, Winter 2001 Software Architecture Example: Architecture Description Architectures for a Compiler Languages Semantic Code ! An architecture description language (or architecture Scanner Parser Analyzer Generator definition language, or ADL) is a formal notation for describing the structure and behavior of a software File File File architecture ! ADLs provide ! a concrete syntax Semantic Code Scanner1 Parser Analyzer Generator ! a formal semantics ! a conceptual framework ! for explicitly modeling the conceptual architecture of a Parse Tree system ! A programming language is used to define the implementation architecture of a system Legend: Component Connector Why ADLs? Putting ADLs to Use Design Process ! The problem of software architectural Representation Support design can be viewed as a language problem Analysis E Traceability v Refinement o l ! Informal notations (boxes and arrows) u t are ambiguous, imprecise, i o unanalyzable, … n Simulation and Execution The Classical Style Architectural Styles of Civil Architecture ! An architectural style is … ! A set of rules for arranging the components and connectors of a system ! A family of architectures sharing a common pattern of structural organization The Pantheon Rome, Italy © 2001 David S. Rosenblum 3 ICS 221, Winter 2001 Software Architecture The Gothic Style The Mediterranean Style Nôtre-Dame Cathedral Irvine, California Paris, France Common Software Common Software Architectural Styles Architectural Styles (Cont.) ! Dataflow Systems ! Virtual Machines ! Batch sequential ! ! Pipes and filters Interpreters ! Call-and-Return Systems ! Rule-based systems ! Main program and subroutines ! Data-Centered Systems (Repositories) ! Object-oriented systems ! Hierarchical layers (onion layers) ! Databases ! Independent Components ! Hypertext systems ! Communicating processes (client/server and peer- to-peer) ! Blackboards ! Event systems ! Implicit invocation The Vision: Architecture- The Reality: Based Composition & Reuse Architectural Mismatch ! A framework for design and implementation ! Architectural mismatch refers to a of large-scale software systems mismatch between assumptions made ! A basis for early analysis of software system by different components about the properties structure of the system and the nature ! A framework for selection and composition of of the environment in which they reusable off-the-shelf components operate ! A basis for controlled evolution of software ! A basis for runtime evolution of software © 2001 David S. Rosenblum 4 ICS 221, Winter 2001 Software Architecture Assumptions Leading to Assumptions Leading to Architectural Mismatch (I) Architectural Mismatch (II) ! Assumptions about the nature of the ! Assumptions about the global configuration components ! topology ! substrate on which component is built ! presence of certain components or connectors ! control model ! absence of certain components or connectors ! data model ! Assumptions about the system construction ! Assumptions about the nature of the process connectors ! order in which elements are instantiated ! protocols ! order in which elements are combined ! data model Standards: The Solution? ! Standards define a set of “assumptions” that all components must adhere to ! Component interface standards (e.g., JavaBeans, ActiveX, Netscape Plug-in API) ! Component interoperability standards (e.g., CORBA, DCOM, Java RMI) ! Standard component frameworks (e.g., Microsoft Foundation Classes) ! Domain-Specific Software Architectures (DSSAs) ! But standards also reduce design flexibility © 2001 David S. Rosenblum 5.