Software Engineering



Similar documents
Advanced Analysis and Design

An Introduction to Software Architecture

High-level Design. What is software architecture?

KWIC Exercise. 6/18/ , Spencer Rugaber 1

KWIC Implemented with Pipe Filter Architectural Style

Architecture Design & Sequence Diagram. Week 7

Architecture. Reda Bendraou

Information Systems Analysis and Design CSC John Mylopoulos. Software Architectures Information Systems Analysis and Design CSC340

COSC 3351 Software Design. Recap for the first quiz. Edgar Gabriel. Spring For the 1 st Quiz

Software Life-Cycle Management

Software Architecture Document

Architectural patterns

CS 5150 So(ware Engineering System Architecture

Architectural Patterns: From Mud to Structure

Service Oriented Architecture

Web Services Software Architecture

Vragen. Architecture presentations in practice. Some terms (from IEEE standard)

Software design (Cont.)

Protocols and Architecture. Protocol Architecture.

Decomposition into Parts. Software Engineering, Lecture 4. Data and Function Cohesion. Allocation of Functions and Data. Component Interfaces

SOFT 437. Software Performance Analysis. Ch 5:Web Applications and Other Distributed Systems

ARCHITECTURAL DESIGN OF MODERN WEB APPLICATIONS

Construction Principles and Design Patterns. Flyweight, Bridge, Builder

Software Quality Factors OOA, OOD, and OOP Object-oriented techniques enhance key external and internal software quality factors, e.g., 1. External (v

CHAPTER 2 MODELLING FOR DISTRIBUTED NETWORK SYSTEMS: THE CLIENT- SERVER MODEL

Service Oriented Architecture 1 COMPILED BY BJ

Patterns in Software Engineering

Systems Integration: Co C mp m onent- t bas a e s d s o s ftw ft a w r a e r e ngin i eeri r n i g

Event-based middleware services

Architectural Patterns. Layers: Pattern. Architectural Pattern Examples. Layer 3. Component 3.1. Layer 2. Component 2.1 Component 2.2.

On Applying Normalized Systems Theory to the Business Architectures of Information Systems

Software Architecture

Objectives of Lecture. Network Architecture. Protocols. Contents

On the Criteria To Be Used in Decomposing Systems into Modules

Client/Server and Distributed Computing

Software Architecture. New wine in old bottles? (i.e., software architecture global design?, architect designer)

PERANCANGAN SISTEM INFORMASI

Computer Network. Interconnected collection of autonomous computers that are able to exchange information

A distributed system is defined as

Component-based Development Process and Component Lifecycle Ivica Crnkovic 1, Stig Larsson 2, Michel Chaudron 3

Chapter 11 I/O Management and Disk Scheduling

Engineering Design. Software. Theory and Practice. Carlos E. Otero. CRC Press. Taylor & Francis Croup. Taylor St Francis Croup, an Informa business

Software Architecture. Schahram Dustdar Distributed Systems Group TU Wien

How To Develop Software

Service Oriented Architecture

What is a database? COSC 304 Introduction to Database Systems. Database Introduction. Example Problem. Databases in the Real-World

Software Design Principles and Guidelines

The SPES Methodology Modeling- and Analysis Techniques

Service Oriented Architecture (SOA) An Introduction

Chapter 2 Database System Concepts and Architecture

The Role of the Software Architect

Engineering Process Software Qualities Software Architectural Design

22C:22 (CS:2820) Object-Oriented Software Development

Verifying Semantic of System Composition for an Aspect-Oriented Approach

Programming Languages

Components of a Computer System

CS 377: Operating Systems. Outline. A review of what you ve learned, and how it applies to a real operating system. Lecture 25 - Linux Case Study

Oct 15, Internet : the vast collection of interconnected networks that all use the TCP/IP protocols

COMP5426 Parallel and Distributed Computing. Distributed Systems: Client/Server and Clusters

28 Application Architectures

Engr. M. Fahad Khan Lecturer Software Engineering Department University Of Engineering & Technology Taxila

HELP DESK SYSTEMS. Using CaseBased Reasoning

IndustrialIT System 800xA AC 870P/Melody Engineering

Literature Review Service Frameworks and Architectural Design Patterns in Web Development

Network Security 網 路 安 全. Lecture 1 February 20, 2012 洪 國 寶

Industrial IT Ó Melody Composer

Implementation of hybrid software architecture for Artificial Intelligence System

Information and Communications Technology Courses at a Glance

AP Computer Science AB Syllabus 1

Review from last time. CS 537 Lecture 3 OS Structure. OS structure. What you should learn from this lecture

Mobile and Heterogeneous databases Database System Architecture. A.R. Hurson Computer Science Missouri Science & Technology

Motivation Definitions EAI Architectures Elements Integration Technologies. Part I. EAI: Foundations, Concepts, and Architectures

Application Architectures

Operating Systems 4 th Class

Karunya University Dept. of Information Technology

Chapter 3: Operating-System Structures. System Components Operating System Services System Calls System Programs System Structure Virtual Machines

Software Architecture Document

A Case Study of the Systems Engineering Process in Healthcare Informatics Quality Improvement. Systems Engineering. Ali M. Hodroj

Outline. TIM 50 - Business Information Systems. Lecture 10. Instructor: Terry Allen UC Santa Cruz 10/28/2011

ARMMS - Architecture Reference Model for Multilingual Software

Functional Decomposition Top-Down Development

Best-Practice Software Engineering: Software Processes to Support Project Success. Dietmar Winkler

Real-Time Component Software. slide credits: H. Kopetz, P. Puschner

Challenges and Opportunities for formal specifications in Service Oriented Architectures

Service-Oriented Architecture and Software Engineering

Communications and Computer Networks

ARIS Design Platform Getting Started with BPM

JOURNAL OF OBJECT TECHNOLOGY

Web Application Architectures

Software, Process, Business Process and Software Process

Distributed Objects and Components

Glossary of Object Oriented Terms

Transcription:

Software Engineering Lecture 06: Design an Overview Peter Thiemann University of Freiburg, Germany SS 2013 Peter Thiemann (Univ. Freiburg) Software Engineering SWT 1 / 35

The Design Phase Programming in the large GOAL: transform results of analysis (requirements specification, product model) into a software architecture Main Activities Decomposition into components Development of software architecture Peter Thiemann (Univ. Freiburg) Software Engineering SWT 2 / 35

Software Architecture SW architecture ˆ= components, connectors, topology Component Designated computational unit with specified interface Examples: client, server, filter, layer, database Connector Interaction point between components Examples: procedure call, event broadcast, pipe Topology Guidelines and restrictions on connecting components Peter Thiemann (Univ. Freiburg) Software Engineering SWT 3 / 35

Architectural Styles Overview Dataflow systems Batch sequential, Pipes and filters Call-and-return systems Main program/subroutine, OO systems, Hierarchical layers Independent components Communicating processes, Event systems, Actors Virtual machines Interpreters, Rule-based systems Data-centered systems (repositories) Databases, Hypertext systems, Blackboards (according to Shaw and Garlan, Software Architecture, Prentice Hall) Peter Thiemann (Univ. Freiburg) Software Engineering SWT 4 / 35

Classification of an Architectural Style design vocabulary types of components and connectors allowable structural patterns underlying computational model (semantic model) essential invariants common examples of use advantages/disadvantages common specializations Peter Thiemann (Univ. Freiburg) Software Engineering SWT 5 / 35

Some Example Architectures Peter Thiemann (Univ. Freiburg) Software Engineering SWT 6 / 35

Architecture: Batch Sequential Separate, sequential passes Data passed linearly Each pass runs to completion before the next starts Example: traditional compiler architecture Text Lex Syn Sem Opt Code Code Peter Thiemann (Univ. Freiburg) Software Engineering SWT 7 / 35

Archtecture: Pipes and Filters Data passes continually through the system Each component (filter) transforms input streams to output streams incrementally Buffered channels (pipes) connect inputs to outputs Filters are independent entities Common specializations: pipeline (linear sequence of filters), bounded pipes, typed pipes Filters Pipes Peter Thiemann (Univ. Freiburg) Software Engineering SWT 8 / 35

Properties of Pipes and Filters + global understanding + reuse + easy to maintain and enhance + specialized analysis + potential for concurrent execution interactive applications correpondences between streams common format for data transmission Peter Thiemann (Univ. Freiburg) Software Engineering SWT 9 / 35

Architecture: Event-based, Implicit Invocation Also: reactive integration or selective broadcast Each component may announce events register an interest in certain events, associated with a callback When event occurs, the system invokes all registered callbacks Announcer of event does not know which components are registered Order of callback invocation cannot be assumed Applications: integration of tools, maintaining consistency constraints, incremental checking Peter Thiemann (Univ. Freiburg) Software Engineering SWT 10 / 35

Properties of Implicit Invocation + reuse + system evolution lack of control data passed through shared repository correctness? Peter Thiemann (Univ. Freiburg) Software Engineering SWT 11 / 35

Architecture: Layered Systems Hierarchy of system components, grouped in layers Inside of layer: arbitrary access between components Between layers access restricted to lower layers: linear, strict, treeshaped small interfaces Advantages: clarity, reusability, maintainability, testability Disadvantages: not always appropriate, loss of efficiency, no restrictions inside layers Examples: communication protocols (OSI), database systems, operating systems Peter Thiemann (Univ. Freiburg) Software Engineering SWT 12 / 35

Peter Thiemann (Univ. Freiburg) Software Engineering SWT 13 / 35

Typical Setup I/O layer dialogue layer user interface application specific application general application logical data access physical data access data management Peter Thiemann (Univ. Freiburg) Software Engineering SWT 14 / 35

Example: Three-Tier Architecture UserInterface TransactionManagement AccountManagement Three kinds of subsystems user interface control transaction management database account management Enables consistent look-and-feel Useful with single data repository Web architecture each tier runs on different location browser, web server, application server Peter Thiemann (Univ. Freiburg) Software Engineering SWT 15 / 35

Architecture: Repository Central data structure (current state, blackboard) Independent components acting on it Example: architecture of modern compilers, theorem provers Sem Opt1 Syn Opt2 Lex Tree Code Edit Sym tab Syn Peter Thiemann (Univ. Freiburg) Software Engineering SWT 16 / 35

Architecture: Interpreter Virtual machine in software Bytecode program + interpretation engine Examples: programming language, malware packers Inputs Data (program state) Memory Program being interpreted Computation (State Machine) Outputs Simulated Interpretation Engine Selected Instruction Selected Data Data Access (fetch/store) Internal Interpreter State Peter Thiemann (Univ. Freiburg) Software Engineering SWT 17 / 35

Further Architectural Styles Distributed processes topological features interprocess protocols client-server organization Main program/subroutine: mirroring the programming language Domain specific SW architectures tailored to family of applications structured, e.g., according to hardware requirements Examples: avionics, vehicle management,... State transition systems Combinations of architectural styles hierarchically mixture of connectors Peter Thiemann (Univ. Freiburg) Software Engineering SWT 18 / 35

Developing a Software Architecture Peter Thiemann (Univ. Freiburg) Software Engineering SWT 19 / 35

Developing a Software Architecture The choice of a software architecture is a far reaching decision that can influence the effort required to change the system later on. Criteria for decomposition A case study (David Lorge Parnas) Peter Thiemann (Univ. Freiburg) Software Engineering SWT 20 / 35

Criteria for Decomposition Composing a Component Major processing activity: business rules, user interface, database access, system dependencies Consistent abstraction Information hiding: encapsulate a design decision or hide complexity e.g., input format, data layout, choice of algorithm, computed data vs. stored data,... Anticipate change Maximize cohesion: all elements of a component should contribute to accomplish a single functionality Minimize coupling: component only gains access to data essential for accomplishing its functionality Peter Thiemann (Univ. Freiburg) Software Engineering SWT 21 / 35

Cohesion Qualitative measure of dependency of items within a single component Kinds of cohesion Coincidental Cohesion: (Worst) Component performs multiple unrelated actions Logical Cohesion: Elements perform similar activities as selected from outside component Temporal Cohesion: Elements are related in time (e.g. initialization() or FatalErrorShutdown()) Procedural Cohesion: Elements involved in different but sequential activities Communicational Cohesion: Elements involved in different activities based on same input info Sequential Cohesion: output from one function is input to next (pipeline) Informational Cohesion: independent actions on same data structure Functional Cohesion: all elements contribute to a single, well-defined task Peter Thiemann (Univ. Freiburg) Software Engineering SWT 22 / 35

Coupling Qualitative measure of interdependence of a collection of components Kinds of coupling Content Coupling: (worst) component directly references data in another Control Coupling: two components communicating with a control flag Common Coupling: two components communicating via global data Stamp Coupling: Communicating via a data structure passed as a parameter. The data structure holds more information than the recipient needs. Data Coupling: (best) Communicating via parameter passing. The parameters passed are only those that the recipient needs. No coupling: independent components. Peter Thiemann (Univ. Freiburg) Software Engineering SWT 23 / 35

Case Study Peter Thiemann (Univ. Freiburg) Software Engineering SWT 24 / 35

Example: Key Word in Context [KWIC] The KWIC index system accepts an ordered set of lines, each line is an ordered set of words, and each word is an ordered set of characters. Any line may be circularly shifted by repeatedly removing the first word and appending it at the end of the line. The KWIC index system outputs a listing of all circular shifts of all lines in alphabetical order. David L. Parnas. On the criteria to be used in decomposing systems into modules. Communications of the ACM, 15(12):1053-1058, December 1972 Classical problem with practical applications Four different designs Assessment Peter Thiemann (Univ. Freiburg) Software Engineering SWT 25 / 35

Guidelines for Assessment Is the architecure amenable to... Changes in processing algorithm Example: line shifting Changes in data representation Enhancement to system function Example: noise words, interactive Reuse Good performance Peter Thiemann (Univ. Freiburg) Software Engineering SWT 26 / 35

Solution 1: Main program/subroutine with shared data Four basic functions: input, shift, alphabetize, and output Subroutines coordinated by main program Shared storage with unconstrained access (why does this work?) System I/O Direct Memory Access Subprogram call Master control Input Circular shift Alphabetizer Output Input medium Characters Index Alphabetized Index Output medium Peter Thiemann (Univ. Freiburg) Software Engineering SWT 27 / 35

Solution 1: Assessment + efficient data representation + distinct computational aspects are isolated in different modules but serious drawbacks in terms of its ability to handle changes change in data storage format will affect almost all of the modules similarly: changes in algorithm and enhancements to system function reuse is not well-supported because each module of the system is tied tightly to this particular application Peter Thiemann (Univ. Freiburg) Software Engineering SWT 28 / 35

Solution 2: Abstract data types decomposition into five modules data no longer shared access through procedural interfaces System I/O Subprogram call Master control Input Output setchar char word setup setchar char word alph i th Input medium Characters Circular shift Alphabetic shifts Output medium Peter Thiemann (Univ. Freiburg) Software Engineering SWT 29 / 35

Solution 2: Assessment Same processing modules as the first solution, but better amenable to change. + algorithms and data representations can be changed in individual modules without affecting others + reuse is better supported because modules make fewer assumptions about the others with which they interact not well suited to enhancements: to add new functionality modify the existing modules compromising their simplicity and integrity or add new modules that lead to performance penalties. Peter Thiemann (Univ. Freiburg) Software Engineering SWT 30 / 35

Solution 3: Implicit Invocation component integration based on shared data but abstract access to data operations invoked implicitly as data is modified System I/O Implicit invocation Subprogram call Master control Input Circular shift Alphabetizer Output Input medium insert delete i th Lines insert delete i th Lines Output medium Peter Thiemann (Univ. Freiburg) Software Engineering SWT 31 / 35

Solution 3: Assessment + functional enhancements easy: register additional modules + computations insulated from changes in data representation + supports reuse since modules only rely on externally triggered events processing order difficult to control requires more space than previous decompositions Peter Thiemann (Univ. Freiburg) Software Engineering SWT 32 / 35

Solution 4: Pipes and Filters four filters: input, shift, alphabetize, output distributed control data sharing limited to pipes Input medium Input Circular shift Pipe System I/O Output Alphabetizer Output medium Peter Thiemann (Univ. Freiburg) Software Engineering SWT 33 / 35

Solution 4: Assessment + intuitive flow of processing + supports reuse: each filter usable in isolation + supports enhancements: new filters are easily incorporated + amenable to modification: each filter is independent of the others hard to support an interactive system potentially inefficient use of space overhead for parsing and unparsing data Peter Thiemann (Univ. Freiburg) Software Engineering SWT 34 / 35

Summary Abstract Implicit Shared Data Data Type Invocation Pipes and Filters Change in Algorithm + + Change in Data Rep + Change in Function + + + Performance + o Reuse + + + Peter Thiemann (Univ. Freiburg) Software Engineering SWT 35 / 35