24 October 2006Kaiser: COMS W4156 Fall COMS W4156: Advanced Software Engineering Prof. Gail Kaiser
24 October 2006Kaiser: COMS W4156 Fall Software Process Characterizes the software product to four discrete parts: –Requirements – As specified by the customer or user –Architectural Design – Selection of architectural elements, their interactions, and the constraints on those elements Selection should satisfy the requirements Selection should serve as the base for the modular design –Modular Design – Detailed interfaces between the design elements, their algorithms, data types and procedures Should satisfy the requirements and the architecture –Implementation – Representation of algorithms and data types Should satisfy the requirements, architecture and design
24 October 2006Kaiser: COMS W4156 Fall Design Concerned with making major decisions, often of a structural nature Shares with programming a concern for abstracting information representation and processing sequences, but at different level Builds coherent, well-planned representations of programs that concentrate on –the interrelationships of parts at the higher levels –the logical operations at the lower levels
24 October 2006Kaiser: COMS W4156 Fall Design Architectural design - “How does it all fit together?” –High-level partitioning of a software system into separate modules (components) –Focus on the interactions among parts (connections) –Focus on structural properties (configuration) Modular design - “How does it work?” –Detailed design of a component (unit) –Focus on the internals of a component and computational properties (data structures, algorithms)
24 October 2006Kaiser: COMS W4156 Fall Example Architectural design Module design Provided Interface Audio Encoder Required Interface Provided Interface Tuner Required Interface Provided Interface Audio Player Required Interface Compressor Provided Interface EncoderReader Required Interface
24 October 2006Kaiser: COMS W4156 Fall Compare to Building Architecture Overall shape of the physical structure Manner in which the various components of the building are integrated to form a cohesive whole The way in which the building fits into its environment and meshes with other buildings in its vicinity Degree to which the building meets its stated purpose and satisfies the needs of its owner
24 October 2006Kaiser: COMS W4156 Fall Building Architecture as Art The aesthetic feel of the structure The visual impact of the building The way textures, colors and materials are combined to create the external façade and the internal living environment Even small details – the design of lighting fixtures, the type of flooring, the placement of wall hangings, …
24 October 2006Kaiser: COMS W4156 Fall Architectural Design Elements Floors Walls Rooms Types Office building Villa Aircraft hanger Elements Components Interfaces Connections Types Office automation Game Space shuttle control Buildings Software
24 October 2006Kaiser: COMS W4156 Fall Architectural Design Styles Colonial Cape Cod Ranch Rules and regulations Electrical Structural Styles Pipe and filter Layered Implicit invocation Rules and regulations Use of interfaces Methods of change Buildings Software
24 October 2006Kaiser: COMS W4156 Fall Software Architecture A high-level model of a thing –Describes critical aspects of the thing –Understandable to many stakeholders –Allows evaluation of the thing’s properties before it is built –Provides well understood tools and techniques for constructing the thing from its blueprint A representation that enables a software engineer to –Analyze the effectiveness of the design in meeting its stated requirements –Consider architectural alternatives at a stage when making design changes is still relatively easy –Reduce the risks associated with the construction of the software
24 October 2006Kaiser: COMS W4156 Fall What is the Problem? This is a simple software system!
24 October 2006Kaiser: COMS W4156 Fall Design Abstraction
24 October 2006Kaiser: COMS W4156 Fall Architectural Abstraction
24 October 2006Kaiser: COMS W4156 Fall Software Architecture: Essentials Components –What are the main parts? –What aspects of the requirements do they correspond to? –Both processing elements and data elements –Can be simple or composite –Examples: abstract data types, filters, databases, GUIs, servers Connections –How do components communicate? –Model interactions among components and rules that govern those interactions –Examples: shared variables, procedure calls, messages, multicast, pipes
24 October 2006Kaiser: COMS W4156 Fall Software Architecture: Essentials Configurations –What is the topology? –Connected graph of components and connectors that describes architectural structure –Defines proper connectivity, concurrent and distributed properties, adherence to architectural style Constraints on change (load bearing walls) –Architectural erosion – due to violations of the architecture – increases problems and brittleness –Architectural drift – due to insensitivity about the architecture – leads to inadaptability then disasters
24 October 2006Kaiser: COMS W4156 Fall Comparison to Programming (of Modules) ArchitectureModules interaction among parts implementation of parts structural properties computational properties system-level performance algorithmic performance outside module boundary inside module boundary
24 October 2006Kaiser: COMS W4156 Fall Comparison to Hardware Architecture Two important features: –Relatively small number of design elements. –Scale is achieved by replication of these design elements. Similarity between Software and Hardware Architectures: –Analogies to organization and configuration Differences between Software and Hardware Architectures: –Requires large number of design elements. –Scale is achieved (in most cases) by adding more distinct elements.
24 October 2006Kaiser: COMS W4156 Fall Comparison to Network Architecture Nodes and Connections act as the design elements. Features: –Two components – Nodes and Connections –Only a few topologies are considered (star, ring, grid) In software architecture, –Two components – Processes and Interprocess communication. –Large number of possible topologies, many without any proper names.
24 October 2006Kaiser: COMS W4156 Fall We Can Do Anything… Provided Interface Big Component Required Interface Provided Interface Tiny Component Required Interface Provided Interface B Component Required Interface Provided Interface Mr. Component Required Interface Provided Interface A Component Required Interface Provided Interface Yet Component Required Interface Provided Interface Some Component Required Interface Provided Interface One Component Required Interface Provided Interface Mrs. Component Required Interface
24 October 2006Kaiser: COMS W4156 Fall …But Style Has Proven to Help Architectural “styles” restrict the way in which components can be connected –Prescribe patterns of interaction –Promote fundamental principles Rigor, separation of concerns, anticipation of change, generality, incrementality Low coupling among elements High cohesion within elements Architectural styles are based on success stories –Almost all compilers are build as “pipe-and-filter” –Almost all network protocols are build as “layers”
24 October 2006Kaiser: COMS W4156 Fall Hierarchy Connections are function or method calls Provided Interface Main component Required Interface Provided Interface Subcomponent Required Interface Provided Interface Subcomponent Required Interface Provided Interface Subcomponent Required Interface Provided Interface Subcomponent Required Interface Provided Interface Subcomponent Required Interface Provided Interface Subcomponent Required Interface Provided Interface Subcomponent Required Interface Provided Interface Subcomponent Required Interface
24 October 2006Kaiser: COMS W4156 Fall Client-Server Connections are remote procedure calls or remote method invocations Provided Interface Client Required Interface Provided Interface Client Required Interface Provided Interface Client Required Interface Provided Interface Server Required Interface
24 October 2006Kaiser: COMS W4156 Fall Blackboard Connections are encapsulated global variables (tuple spaces) Provided Interface Blackboard Provided Interface One “Part” Required Interface Provided Interface My “Bit” Required Interface Provided Interface Her “Piece” Required Interface Provided Interface A “Part” Required Interface Provided Interface Another “Piece” Required Interface Provided Interface His “Bit” Required Interface
24 October 2006Kaiser: COMS W4156 Fall Peer-to-Peer Connections are remote procedure calls or remote method invocations Provided Interface Peer Required Interface Provided Interface Peer Required Interface Provided Interface Peer Required Interface
24 October 2006Kaiser: COMS W4156 Fall Pipe-and-Filter Connections are pipes (also called data flows) Provided Interface Filter Required InterfaceProvided Interface Filter Required InterfaceProvided Interface Filter Required InterfaceProvided Interface Filter Required Interface
24 October 2006Kaiser: COMS W4156 Fall Implicit Invocation Connections are events on the software bus Provided Interface Component Required Interface Provided Interface Component Required Interface Provided Interface Component Required Interface Provided Interface Component Required Interface Provided Interface Bus Required Interface
24 October 2006Kaiser: COMS W4156 Fall Layers Connections are function or method calls + “something in between” Provided Interface Layer 4 Required Interface Provided Interface Layer 3 Required Interface Provided Interface Layer 2 Required Interface Provided Interface Layer 1 Required Interface Provided Interface Layer 4 Required Interface Provided Interface Layer 3 Required Interface Provided Interface Layer 2 Required Interface Provided Interface Layer 1 Required Interface
24 October 2006Kaiser: COMS W4156 Fall Another Kind of Layers Connections are function or method calls extended basic core
24 October 2006Kaiser: COMS W4156 Fall Many Other (Variants of) Styles Interpreters (“little languages”) Batch sequential (degenerate case of pipe/filter) Distribution broker (e.g., CORBA) …
24 October 2006Kaiser: COMS W4156 Fall Example – Compiler SequentialParallel
24 October 2006Kaiser: COMS W4156 Fall Example - CASE toolset
24 October 2006Kaiser: COMS W4156 Fall Example - Version management system
24 October 2006Kaiser: COMS W4156 Fall Example - Film and picture library
24 October 2006Kaiser: COMS W4156 Fall Example – Packing robot control system
24 October 2006Kaiser: COMS W4156 Fall Choosing the Right Style Does a certain style makes sense? –The Internet as a blackboard - Does that scale? –Stock exchange as a layers - How to deal with the continuous change? –Math as hierarchy - How to properly call different modules for different functions? Draw a picture of the major entities Look for the natural paradigm Look for what “feels right”
24 October 2006Kaiser: COMS W4156 Fall Mixing Styles May Be Necessary Blackboard + Client-Server Provided Interface Blackboard Provided Interface One “Part” Required Interface Provided Interface My “Bit” Required Interface Provided Interface Her “Piece” Required Interface Provided Interface A “Part” Required Interface Provided Interface Another “Piece” Required Interface Provided Interface His “Bit” Required Interface
24 October 2006Kaiser: COMS W4156 Fall Mixing Styles May Be Necessary Blackboard + Implicit Invocation Provided Interface Blackboard Provided Interface One “Part” Required Interface Provided Interface A “Piece” Required Interface Provided Interface Some “Bit” Required Interface Provided Interface Bus Required Interface
24 October 2006Kaiser: COMS W4156 Fall Mixing Styles May Be Necessary Pipe-and-Filter + Client-Server + Hierarchy Pipe FCalls Provided Interface Audio Encoder Required Interface Provided Interface Tuner Required Interface Provided Interface Audio Player Required Interface
24 October 2006Kaiser: COMS W4156 Fall Architectural Models Different architectural models may be produced during the design process Each model presents different perspectives on the architecture –Static structural model that shows the major system components –Interface model that defines sub-system interfaces –Dynamic process model that shows the process structure of the system –Deployment model shows the relationship between system elements and hosts
24 October 2006Kaiser: COMS W4156 Fall Project Deliverables Project concept (P/F) Revised concept (P/F) First iteration (25%) –1 st iteration plan (5%) –1 st iteration progress report (5%) –1 st iteration demo (5%) –1 st iteration final report (10%) Second iteration (25%) –2 nd iteration plan –Code inspection –2 nd iteration progress report –2 nd iteration demo –2 nd iteration final report
24 October 2006Kaiser: COMS W4156 Fall Demo due November minutes total including any "setup" time Schedule –With Prof. Kaiser for in/after class time (Thursday November 9 th or Tuesday November 14 th, 11-12:15 or 12:30-1:30) –With your TA otherwise Be prepared to show the code corresponding to any portion of the demo system Be prepared to describe your system's utilization of the component model framework. One representative of each pair must be present at the demo
24 October 2006Kaiser: COMS W4156 Fall First Iteration Progress Report due November 14th realityThe purpose of this assignment is to revise your requirements, architecture and component-level design to reflect reality, and to evaluate your use of the chosen component model framework. Revise your requirements: –Include your complete set of requirements (use cases or user stories). –For any requirements that changed, show the new version of the requirement and explain the difference. –Indicate any requirements that have been dropped. –If any features are only partially completed, describe what does and does not work.
24 October 2006Kaiser: COMS W4156 Fall Architecture Revise your high-level architecture and lower- level design. Diagram and explain the process-level architecture of your system, including all communication paths. Describe the major expected "workflows" that a user would achieve with the system and explain the corresponding interactions among the architectural units during those scenarios. Consider both end-users and administrators, if applicable.
24 October 2006Kaiser: COMS W4156 Fall Component-Level Design For each internal architectural subsystem, break down into components. Diagram and explain the use of interfaces and control and data flows among the components. Indicate any previously planned subsystems, communication paths, components, interfaces, etc. that are "missing" for whatever reason from your system. Explain the roles of any external "systems" - e.g., databases, web browsers, facilities provided by the component model framework.
24 October 2006Kaiser: COMS W4156 Fall Evaluation of Component Model Framework Describe how you leveraged the main aspects of the component model framework Or "worked around" them if that is indeed what you did. Consider the main services provided by the framework, and discuss any you considered using - both those you did end up using and those you did not (and why not). Discuss any "challenges" that arose in deploying or utilizing the framework, and how you resolved them. State which specific implementation of the component model framework you used, including version number and where you got it from (e.g., url).
24 October 2006Kaiser: COMS W4156 Fall Deliverables An archive (e.g., a.zip file) with a main document that includes: 1. Cover page (1 page): Indicate the name of your team and list all team members with their full names and addresses. Indicate that this document presents your First Iteration Final Report. 2. Revised Requirements (no maximum page limit). 3. Revised high-level architecture and component-level design (no maximum page limit). 4. Component-model framework (no maximum page limit). 5. Controversies (maximum 1 page). Additional files in the archive should include: 6. The complete code for your system. Include a README file with installation instructions and a brief description of how to run the system.
24 October 2006Kaiser: COMS W4156 Fall Upcoming First iteration plan due TODAY! First iteration progress report due October 31 st First demo week November 8-14 First iteration final report due November 14
24 October 2006Kaiser: COMS W4156 Fall COMS W4156: Advanced Software Engineering Prof. Gail Kaiser