260 likes | 273 Views
Explore system design goals, decomposition strategies, and design models. Learn about subsystems, interfaces, coupling, cohesion, and architectural styles. Discuss access control, global control flow, and more.
E N D
CS 509Design of Software Systems Lecture #4 Monday, Feb. 9, 2004 CS 509 - WPI
Class Format for Today • Term Project Administration • Questions • Quiz #2 • Review of Chapters 6 & 7: • Design Exercises: • Discuss how to organize design documentation • Begin CTS system design CS 509 - WPI
CTS Project & Questions • Phase 2 (Functional Specs) documents and Project Journals are due today. • Hand out Phase 3 (Design) assignment • Questions? • About Term Project • From last week’s class • From the reading • Anything else? CS 509 - WPI
Quiz #2 Chapters 3, 5, 6 You have 15 minutes CS 509 - WPI
Chapter 6 System Design: Decomposing the System CS 509 - WPI
Intro to System Design • Define design goals of system • Decompose system into smaller subsystems • Select strategies for building system: • Hardware & software • Persistent data management • Global control flow • Access control policies • Handling of boundary conditions CS 509 - WPI
Purpose of System Design • Make trade-off decisions: • Identify & prioritize qualities to optimize • Decide how to achieve various goals • Goals may conflict with each other • Produce design model of system including: • System decomposition addressing design goals • Description of design strategies CS 509 - WPI
Overview of System Design • Design goals derived from nonfunctional req’s • Software architecture describes decomposition: • Subsystem responsibilities • Dependencies among subsystems • Mappings to hardware • Policy decisions (control flow, access control, etc.) • Boundary use cases: • Config, startup, shutdown, exception handling CS 509 - WPI
System Design Concepts • Decomposition: • Subsystems, Packages, Classes • Services & subsystem interfaces • Coupling vs. Cohesion • Layering and Partitioning • Architectural Styles CS 509 - WPI
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? CS 509 - WPI
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? • What operations are involved? • Interface independent of implementation, often defined during Object Design CS 509 - WPI
Coupling and Cohesion • Coupling measures dependencies between 2 subsystems • Cohesion measures dependencies among classes within a subsystem • Want to minimize coupling and maximize cohesion • How can we do both? How are they related? CS 509 - WPI
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? CS 509 - WPI
Architectural Styles • Repository • Model-View-Controller (MVC) • Client-server • Peer-to-peer • Tiered styles (3-tier, 4-tier) • Pipe and filter CS 509 - WPI
Chapter 7 System Design: Addressing Design Goals CS 509 - WPI
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 CS 509 - WPI
Select Existing Components • What is a legacy component? • How do we know if it’s useful? • Other pre-existing components • 3rd 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? CS 509 - WPI
Mapping to Platform • Select deployment hardware configuration • “Who” is responsible for which functionality? • How is communication realized? • Select software platform: • Operating system • Virtual machine for development • Other needed SW components • Reliability and performance issues CS 509 - WPI
Persistent Data • Data that outlives a single run of the system • Identification of storage subsystem(s) • What data should be persistent? • Where and how is data stored? • How is it retrieved? (Who has access to what?) • Storage management strategies: • Flat files (serialization), RDBMS, OODB, etc. CS 509 - WPI
Access Control Policy • Shared objects are protected to control use • How is access specified and realized? • Impacts how objects are distributed • Policy should be consistent system-wide • User roles & authentication • Who has access to what, how are users identified? • Who can change access rights / privileges • Data encryption, etc. • Use cases can help define policy CS 509 - WPI
Global Control Flow • Determine sequence of operations from 3 types: • Procedure-driven • Operations wait for input from user • Top-down, step-by-step, pre-defined flow • Well suited to procedural or functional languages • Event-driven • Flow determined by user action at run time • Better suited to object-oriented languages • Multi-threaded (concurrent) • Handle > 1 user or system interaction at the same time • Requires language support CS 509 - WPI
Boundary Conditions • System initialization, startup and shutdown • Detection & handling of exceptional cases • Hardware failures including system crash, data corruption, network outages • Changes in operating environment • User errors such as data input • Impossible to anticipate all SW failures • Can anticipate some unusual circumstances • Handle in an appropriate way – “nice” messages CS 509 - WPI
Reviewing System Design • Peer review helps ensure quality of design • Strive for following properties: • Correct – based on req’s & analysis • Complete – all req’s & design issues addressed • Consistent – model contains no contradictions • Realistic – possible to implement system • Readable / understandable CS 509 - WPI
Design Exercise CTS System Design CS 509 - WPI
Meeting Agenda • Objective: • Get started on system design of CTS • Tasks: • How to organize design documentation • Who will design what • Discuss system design goals • Request for volunteer: • To record minutes CS 509 - WPI
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) • Quiz #3 on Chapters 7, 8, 9 • Lecture on Object Design • More in-class work on design documents CS 509 - WPI