Feb. 9, 2004CS WPI1 CS 509 Design of Software Systems Lecture #4 Monday, Feb. 9, 2004
Feb. 9, 2004CS WPI2 §Term Project Administration §Questions §Quiz #2 §Review of Chapters 6 & 7: §Design Exercises: l Discuss how to organize design documentation l Begin CTS system design Class Format for Today
Feb. 9, 2004CS WPI3 CTS Project & Questions §Phase 2 (Functional Specs) documents and Project Journals are due today. §Hand out Phase 3 (Design) assignment §Questions? l About Term Project l From last week’s class l From the reading l Anything else?
Feb. 9, 2004CS WPI4 Quiz #2 Chapters 3, 5, 6 You have 15 minutes
Feb. 9, 2004CS WPI5 Chapter 6 System Design: Decomposing the System
Feb. 9, 2004CS WPI6 Intro to System Design §Define design goals of system §Decompose system into smaller subsystems §Select strategies for building system: l Hardware & software l Persistent data management l Global control flow l Access control policies l Handling of boundary conditions
Feb. 9, 2004CS WPI7 Purpose of System Design §Make trade-off decisions: l Identify & prioritize qualities to optimize l Decide how to achieve various goals l Goals may conflict with each other §Produce design model of system including: l System decomposition addressing design goals l Description of design strategies
Feb. 9, 2004CS WPI8 Overview of System Design §Design goals derived from nonfunctional req’s §Software architecture describes decomposition: l Subsystem responsibilities l Dependencies among subsystems l Mappings to hardware l Policy decisions (control flow, access control, etc.) §Boundary use cases: l Config, startup, shutdown, exception handling
Feb. 9, 2004CS WPI9 System Design Concepts §Decomposition: l Subsystems, Packages, Classes §Services & subsystem interfaces §Coupling vs. Cohesion §Layering and Partitioning §Architectural Styles
Feb. 9, 2004CS WPI10 Decomposition §What’s the difference between a Subsystem and a Package? §How many subsystems or packages do we need? §What classes make up a subsystem/package? §Where do we draw the lines?
Feb. 9, 2004CS WPI11 Services & Interfaces §A subsystem is characterized by the services it provides to other subsystems. §A service is a set of related operations that share a common purpose. §Examples of types of services? l What operations are involved? §Interface independent of implementation, often defined during Object Design
Feb. 9, 2004CS WPI12 Coupling and Cohesion §Coupling measures dependencies between 2 subsystems §Cohesion measures dependencies among classes within a subsystem l Want to minimize coupling and maximize cohesion l How can we do both? How are they related?
Feb. 9, 2004CS WPI13 Layers & Partitions §Both are ways to manage complexity §Layers are hierarchical; partitions are not §Each layer uses services provided by which other layer(s)? §Layers have no knowledge of which other layer(s)? §Difference between open and closed architectures?
Feb. 9, 2004CS WPI14 Architectural Styles §Repository §Model-View-Controller (MVC) §Client-server §Peer-to-peer §Tiered styles (3-tier, 4-tier) §Pipe and filter
Feb. 9, 2004CS WPI15 Chapter 7 System Design: Addressing Design Goals
Feb. 9, 2004CS WPI16 Activities Overview §Select off-the-shelf and legacy components §Mapping of subsystems to hardware §Design of persistent data management §Specification of access control policy §Design of global control flow §Handling of boundary conditions §Reviewing system design
Feb. 9, 2004CS WPI17 Select Existing Components §What is a legacy component? l How do we know if it’s useful? §Other pre-existing components l 3 rd party packages may need to be “wrapped” What does this mean? §What are the trade-offs? §Does building a component cost more than buying it?
Feb. 9, 2004CS WPI18 Mapping to Platform §Select deployment hardware configuration l “Who” is responsible for which functionality? l How is communication realized? §Select software platform: l Operating system l Virtual machine for development l Other needed SW components §Reliability and performance issues
Feb. 9, 2004CS WPI19 Persistent Data §Data that outlives a single run of the system §Identification of storage subsystem(s) l What data should be persistent? l Where and how is data stored? l How is it retrieved? (Who has access to what?) §Storage management strategies: l Flat files (serialization), RDBMS, OODB, etc.
Feb. 9, 2004CS WPI20 Access Control Policy §Shared objects are protected to control use l How is access specified and realized? l Impacts how objects are distributed §Policy should be consistent system-wide l User roles & authentication Who has access to what, how are users identified? l Who can change access rights / privileges l Data encryption, etc. §Use cases can help define policy
Feb. 9, 2004CS WPI21 Global Control Flow §Determine sequence of operations from 3 types: l Procedure-driven Operations wait for input from user Top-down, step-by-step, pre-defined flow Well suited to procedural or functional languages l Event-driven Flow determined by user action at run time Better suited to object-oriented languages l Multi-threaded (concurrent) Handle > 1 user or system interaction at the same time Requires language support
Feb. 9, 2004CS WPI22 Boundary Conditions §System initialization, startup and shutdown §Detection & handling of exceptional cases l Hardware failures including system crash, data corruption, network outages l Changes in operating environment l User errors such as data input §Impossible to anticipate all SW failures l Can anticipate some unusual circumstances l Handle in an appropriate way – “nice” messages
Feb. 9, 2004CS WPI23 Reviewing System Design §Peer review helps ensure quality of design §Strive for following properties: l Correct – based on req’s & analysis l Complete – all req’s & design issues addressed l Consistent – model contains no contradictions l Realistic – possible to implement system l Readable / understandable
Feb. 9, 2004CS WPI24 Design Exercise CTS System Design
Feb. 9, 2004CS WPI25 Meeting Agenda §Objective: l Get started on system design of CTS §Tasks: l How to organize design documentation l Who will design what l Discuss system design goals §Request for volunteer: l To record minutes
Feb. 9, 2004CS WPI26 For Next Time §No class next week (2/16) – Presidents Day §Read Chapters 8 & 9 – Object Design §Begin working on System Design document §Next class (2/23) l Quiz #3 on Chapters 7, 8, 9 l Lecture on Object Design l More in-class work on design documents