CPSC 410: Software Architectural Style (Part I) By the end of this lecture, you will be able to: list various software architectural styles describe advantages.

Slides:



Advertisements
Similar presentations
A component- and message-based architectural style for GUI software
Advertisements

Architectural Mismatch: Why Reuse Is So Hard David Garlan, Robert Allen, and John Ockerbloom Presented by Hoang Bao CSC 509 – Winter 2005.
Hestia: Aarthi Giridharan Govindarajan Panneerselvam Nirmal Chander Shesha Chandrika Moka Sriram Rajendran Suryanarayanan Ganesh Melarkode Vignesh Swaminathan.
Applying Architectural Styles and Patterns. Outline  Defining Architectural Patterns and Style The activation model Styles and Quality Attributes  Common.
Architectural Styles. Definitions of Architectural Style  Definition. An architectural style is a named collection of architectural design decisions.
Lecture 23: Software Architectures
Design Patterns CS is not simply about programming
Applying Architectural Styles and Patterns
SWE Introduction to Software Engineering
Establishing the overall structure of a software system
1 CS115 Class 7: Architecture Due today –Requirements –Read Architecture paper pages 1-15 Next Tuesday –Read Practical UML.
Architectural styles and Case studies 1 | Website for Students | VTU NOTES | QUESTION PAPERS | NEWS | RESULTS.
Course Instructor: Aisha Azeem
Software Architecture – Pipe and Filter Model
Architectural Design Establishing the overall structure of a software system Objectives To introduce architectural design and to discuss its importance.
03 - ParnasCSC4071 A Sketchy Evolution of Software Design 1960s –Structured Programming (“Goto Considered Harmful”, E.W.Dijkstra) Emerged from considerations.
Architectural Design.
Chapter 7: Architecture Design Omar Meqdadi SE 273 Lecture 7 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
1/19 Component Design On-demand Learning Series Software Engineering of Web Application - Principles of Good Component Design Hunan University, Software.
CS451 Lecture 13: Architectural Design Chapter 10
1 CMPT 275 High Level Design Phase Architecture. Janice Regan, Objectives of Design  The design phase takes the results of the requirements analysis.
1 On the Criteria To Be Used in Decomposing Systems into Modules by D.L.Parnas Dec presented by Yuanhua Qu for spring 2003 CS5391.
Why Architecture? The architecture is not the operational software. Rather, it is a representation that enables a software engineer to: (1) analyze the.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 07. Review Architectural Representation – Using UML – Using ADL.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 10Slide 1 Architectural Design l Establishing the overall structure of a software system.
Architecture styles Pipes and filters Object-oriented design Implicit invocation Layering Repositories.
Patterns in programming 1. What are patterns? “A design pattern is a general, reusable solution to a commonly occurring problem in software. A design.
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 Architectural Styles.
Copyright © Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy. All rights reserved. Architectural Styles Part I Software Architecture Lecture 5.
Lecture 2 Introductory Case Studies Topics Architectural Styles Key Word In Context (KWIC) Other Cases Studies Evolution of Software Engineering January.
ECE450 - Software Engineering II1 ECE450 – Software Engineering II Today: Key Principles of Software Architecture and Design (I) adapted from Dave Penny’s.
CSCE 742 Software Architecture Lecture 1
Software Architecture and Patterns
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 10Slide 1 Architectural Design l Establishing the overall structure of a software system.
Architectural Design 10/24/2015ICS 413 – Software Engineering1.
Architectural Design Yonsei University 2 nd Semester, 2014 Sanghyun Park.
Chapter 6 Architectural Design.
Cohesion and Coupling CS 4311
Krista Lozada iAcademy First Term 2009
Pipes & Filters Architecture Pattern Source: Pattern-Oriented Software Architecture, Vol. 1, Buschmann, et al.
Developing Component- Based Systems X LIU, School of Computing, Napier University TIP This chapter discusses the techniques to develop component-based.
Unit 2 Architectural Styles and Case Studies | Website for Students | VTU NOTES | QUESTION PAPERS | NEWS | RESULTS 1.
John D. McGregor Class 4 – Initial decomposition
Chapter 6 – Architectural Design Lecture 1 1Chapter 6 Architectural design.
CSC480 Software Engineering Lecture 10 September 25, 2002.
ANU comp2110 Software Design lecture 8 COMP2110 Software Design in 2004 lecture 8 Software Architecture 1 of 2 (design, lecture 3 of 6) Goal of this small.
Review of Parnas’ Criteria for Decomposing Systems into Modules Zheng Wang, Yuan Zhang Michigan State University 04/19/2002.
“Architecture” The outcome of top-level design, reflecting principal design decisions Can (and should) be modified and updated Analogous to architecture.
Software Architectural Style By the end of this lecture, you will be able to: list various software architectural styles describe advantages and disadvantages.
Comparing Designs By Chris McCall. Comparing Designs A decision-making method for deciding between many designs for a single specification Provides a.
Slide 1 Lecture 15 Enterprise Systems Development ( CSC447 ) COMSATS Islamabad Muhammad Usman, Assistant Professor.
Lecture VIII: Software Architecture
CS223: Software Engineering
CS223: Software Engineering Lecture 14: Architectural Patterns.
Multimedia Retrieval Architecture Electrical Communication Engineering, Indian Institute of Science, Bangalore – , India Multimedia Retrieval Architecture.
From Use Cases to Implementation 1. Structural and Behavioral Aspects of Collaborations  Two aspects of Collaborations Structural – specifies the static.
1 Chapter : Architecture & User Interface Design.
Architectural Mismatch: Why reuse is so hard? Garlan, Allen, Ockerbloom; 1994.
From Use Cases to Implementation 1. Mapping Requirements Directly to Design and Code  For many, if not most, of our requirements it is relatively easy.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 10Slide 1 Chapter 5:Architectural Design l Establishing the overall structure of a software.
KWIC example The KWIC [key word in context] system accepts an ordered set of lines; each line is an ordered set of words, and each word is an ordered set.
SOFTWARE DESIGN AND ARCHITECTURE
Software Design and Architecture
CHAPTER 2 CREATING AN ARCHITECTURAL DESIGN.
John D. McGregor Quality attributes
Chapter 5 Designing the Architecture Shari L. Pfleeger Joanne M. Atlee
Software models - Software Architecture Design Patterns
Chapter 5 Architectural Design.
Lecture 2b Introductory Case Studies
Module Structure David Parnas Discusses “modularization”
Presentation transcript:

CPSC 410: Software Architectural Style (Part I) By the end of this lecture, you will be able to: list various software architectural styles describe advantages and disadvantages of call-and-return and data-flow (sub-)styles be able to select and apply one of these styles

2 Architectural style (Buildings) 18th Century Georgian Architecture “Old Corner Bookstore” Boston MA Early Gothic Architecture Notre Dame, Paris

3 Styles and patterns Identifying styles (and patterns) can help codify and share knowledge/expertise Architectural Styles [Shaw and Garlan, Software Architecture, Prentice Hall 96] Design Patterns [Gamma, Helm, Johnson, Vlissides, Design Patterns, Addison Wesley 95] [Buschmann et. Al, Pattern-oriented Software Architecture: A System of Patterns, John Wiley & Sons 96] Code Patterns [Coplien, Advanced C++ Programming Styles and Idioms, Addison-Wesley 91]

4 Architectural styles A style consists of: a set of component types (e.g., process, procedure) that perform some function at runtime a topological layout of the components showing their runtime relationships a set of semantic constraints a set of connectors (e.g., data streams, sockets) that mediate communication among components Styles provide a framework on which to base design From Chapter 5, Software Architecture in Practice, p. 94

5 A catalog of architectural styles Today Next Time

6 Example System: KWIC The KWIC index system accepts: an ordered set of lines each line is an ordered set of words each word is an ordered set of characters Every line is "circularly shifted" and copied by: repeatedly removing the first word appending it at the end of the line Outputs a listing of all circular shifts of all lines in alphabetical order “On the Criteria To Be Used in Decomposing Systems into Modules” –David Parnas

7 KWIC Example Input: bar sock car dog town fog Output: bar sock car dog dog car fog town sock bar town fog Four steps: Input Circular shift Alphabetize Output Circular shift positions: Alphabetize:

8 Design Considerations Changes in algorithm: line shifting can be performed … on each line as it is read from the input device on all the lines after they are read on demand when the alphabetization requires a new set of shifted lines Changes in data representation: circular shifts … can be stored explicitly implicitly (as index and offsets) Extra Features: Have the system eliminate circular shifts that start with certain noise words (such as "a", "an", "and", etc.). Make the system interactive allow the user to delete lines from original list and re-output alphabetized list Performance: Both space and time Reuse: To what extent can the components serve as reusable entities

9 Call-and-Return style Goal: achieve modifiability and scalability Substyles: Main-program-and-subroutine Decompose program hierarchically. Each component gets control from its parent. Object-oriented

10 Object-oriented sub-style Objects help achieve modifiability by encapsulating internal secrets from environment Access to objects is only through methods (constrained forms of procedure calls)

11 Input: read lines and stores them in Text array (buffer), index records starting position of each line Circular shift: Creates an index of starting positions for circular shifts, stores these in Word index Alphabetizer: Takes the input from Text array and Word index, creates an index of shifts which are alphabetized

12 Design Considerations Changes in algorithm: Somewhat, however explicit data structure limits possibilities “Show me your data structures and I’ll tell you your algorithm” – Fred Brooks Changes in data representation: Not possible, because data is made available explicitly to all components. Extra Features: Have the system eliminate circular shifts that start with certain noise words Medium, requires changes to existing component Make the system interactive Medium, requires changes to Alphabetizer Performance: Space: Good, data is shared Time: Bad, no concurrency Reuse: To what extent can the components serve as reusable entities Bad, explicit data representation dependencies

13 Line storage: Exports operations for getting characters in different positions Circular shifter: function SHIFT(l,w,c) returns cth character in the wth word of the lth shift Alphabetizer: function ITH(i) returns lines in sorted order

14 Design Considerations Changes in algorithm: Good, data is made available through fine-grained operations Example: Alphabetizer can compute lines “on-demand” saving work if we stop early Changes in data representation: Good, data is hidden behind interface Example: Line storage could keep information from disk Extra Features: Have the system eliminate circular shifts that start with certain noise words Medium, requires changes to existing component Make the system interactive Medium, may require Alphabetizer to interact with Line storage Performance: Space: Good, data can be shared through function calls Time: Bad, no concurrency Reuse: To what extent can the components serve as reusable entities Medium, explicit interface dependencies

15 Data-Flow style Data-flow Batch Sequential Pipes and Filters components are independent programs each step runs to completion before the next starts each batch of data is transmitted as a whole between steps Classic data-processing approach Goals: achieve reuse and modifiability

16 Pipe-and-Filter sub-style Incremental transformation of data by successive components Filters transform data using little contextual information and retain no state between instantiations Pipes are stateless and are used to move streams of data between filters A pipe’s source end connects to a filter’s output port; sink end connects to filter’s input port Ex. cat file | gawk ‘/.*/ { if (match($0,”;{}”)) print $0; }’ | wc

17 Pipe-and-Filter substyle... Pipes and filters run non-deterministically until no more computations or transmissions are possible Ex. In Unix this means EOF +Simple to reason about, eases maintenance, enhances reuse, can easily enhance performance by parallelizing or distributing - Interactive apps are difficult, filters can’t cooperate to solve a problem

18 Each component creates actual text representation for output to passes to next component Simple design, easy to understand

19 Design Considerations Changes in algorithm: Good, as long as it doesn’t require sharing data Example: Alphabetizer can use any sorting routine Changes in data representation: Bad, data is passed explicitly as complete text Extra Features: Have the system eliminate circular shifts that start with certain noise words Good, easy to insert new component in pipeline Make the system interactive Bad, there is no stored intermediate representation Performance: Space: Bad, data must be copied Time: Good, components run in parallel Bad, copying takes time Reuse: To what extent can the components serve as reusable entities. Good, depends only on very common textual representation

20 Heterogeneous Use Systems are generally built from multiple styles Three kinds of heterogeneity: Locationally heterogeneous: Some components in one style participate in another style Ex. A layer in a layered style is also a client in client-server architecture Components make use of other styles Simultaneously heterogeneous: its actually two different styles Ex. Client-Server Layered Style All components play simultaneous roles Hierarchically heterogeneous: a component of one style, when decomposed is structured according to another style Ex. A filter written using objects Complete encapsulation

21 Key points from today Describe advantages and disadvantages of call-and- return and data-flow (sub-)styles Be able to select and apply the call-and-return or data-flow (sub-)styles Sample questions: Portability is important for the system being built, what style might you choose? Here are the requirements for a system x … sketch a pipe- and-filter architectural design for the system