Software Architecture in Practice

Slides:



Advertisements
Similar presentations
Computer Systems & Architecture Lesson 2 4. Achieving Qualities.
Advertisements

EE384y: Packet Switch Architectures
Process Description and Control
Zhongxing Telecom Pakistan (Pvt.) Ltd
AP STUDY SESSION 2.
1
Distributed Systems Architectures
Chapter 10 Architectural Design.
Chapter 7 System Models.
IS301 – Software Engineering Dept of Computer Information Systems
Part 3 Probabilistic Decision Models
1 Copyright © 2013 Elsevier Inc. All rights reserved. Chapter 4 Computing Platforms.
Processes and Operating Systems
1 Hyades Command Routing Message flow and data translation.
David Burdett May 11, 2004 Package Binding for WS CDL.
18 Copyright © 2005, Oracle. All rights reserved. Distributing Modular Applications: Introduction to Web Services.
Local Customization Chapter 2. Local Customization 2-2 Objectives Customization Considerations Types of Data Elements Location for Locally Defined Data.
Making the System Operational
The 5S numbers game..
Knowledge Extraction from Technical Documents Knowledge Extraction from Technical Documents *With first class-support for Feature Modeling Rehan Rauf,
Week 2 The Object-Oriented Approach to Requirements
Version 1.0 digitaloffice.intel.com Intel ® vPro Technology Intel ® Active Management Technology Setup and Configuration HP Laptop – Compaq 6910p Small.
Break Time Remaining 10:00.
Database Performance Tuning and Query Optimization
OOAD – Dr. A. Alghamdi Mastering Object-Oriented Analysis and Design with UML Module 3: Requirements Overview Module 3 - Requirements Overview.
PP Test Review Sections 6-1 to 6-6
Legacy Systems Older software systems that remain vital to an organisation.
CS 6143 COMPUTER ARCHITECTURE II SPRING 2014 ACM Principles and Practice of Parallel Programming, PPoPP, 2006 Panel Presentations Parallel Processing is.
Operating Systems Operating Systems - Winter 2010 Chapter 3 – Input/Output Vrije Universiteit Amsterdam.
Sample Service Screenshots Enterprise Cloud Service 11.3.
Copyright © 2012, Elsevier Inc. All rights Reserved. 1 Chapter 7 Modeling Structure with Blocks.
Database System Concepts and Architecture
Adding Up In Chunks.
Lecture 6: Software Design (Part I)
SLP – Endless Possibilities What can SLP do for your school? Everything you need to know about SLP – past, present and future.
1 Processes and Threads Chapter Processes 2.2 Threads 2.3 Interprocess communication 2.4 Classical IPC problems 2.5 Scheduling.
Executional Architecture
Global Analysis and Distributed Systems Software Architecture Lecture # 5-6.
2004 EBSCO Publishing Presentation on EBSCOadmin.
Chapter 10: The Traditional Approach to Design
Systems Analysis and Design in a Changing World, Fifth Edition
Chapter 12 Working with Forms Principles of Web Design, 4 th Edition.
Clock will move after 1 minute
Chapter 11 Component-Level Design
Chapter 11 Creating Framed Layouts Principles of Web Design, 4 th Edition.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 13 Slide 1 Application architectures.
 2003 Prentice Hall, Inc. All rights reserved. 1 Chapter 13 - Exception Handling Outline 13.1 Introduction 13.2 Exception-Handling Overview 13.3 Other.
Select a time to count down from the clock above
Introduction Peter Dolog dolog [at] cs [dot] aau [dot] dk Intelligent Web and Information Systems September 9, 2010.
Quality Attributes Or, what’s wrong with this: Exterminator kit – place bug on block, strike with mallet.
Lecture 13 Enterprise Systems Development ( CSC447 ) COMSATS Islamabad Muhammad Usman, Assistant Professor.
Architectural Design Principles. Outline  Architectural level of design The design of the system in terms of components and connectors and their arrangements.
Vakgroep Informatietechnologie – IBCN Software Architecture Prof.Dr.ir. F. Gielen Quality Attributes & Tactics (4) Modifiability.
Achieving Qualities. Architectural Tactics  A tactic is a design decision that influences the control of a quality attribute response.  A collection.
Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Software Systems.
Achieving Qualities 1 Võ Đình Hiếu. Contents Architecture tactics Availability tactics Security tactics Modifiability tactics 2.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 07. Review Architectural Representation – Using UML – Using ADL.
SAMANVITHA RAMAYANAM 18 TH FEBRUARY 2010 CPE 691 LAYERED APPLICATION.
1 Software Architecture in Practice Architectural Design (Again, the amputated version)
Dr. Awais Majeed Achieving Quality CSE 861- Software System Design & Architecture.
1 Advanced Software Architecture Muhammad Bilal Bashir PhD Scholar (Computer Science) Mohammad Ali Jinnah University.
Design Patterns-1 7 Hours.
Achieving Qualities.
Chapter 5 Designing the Architecture Shari L. Pfleeger Joanne M. Atlee
Quality Attributes Or, what’s wrong with this:
Software Architecture
Quality Attributes Or, what’s wrong with this:
SAMANVITHA RAMAYANAM 18TH FEBRUARY 2010 CPE 691
Quality Attributes Or, what’s wrong with this:
Presentation transcript:

Software Architecture in Practice Architectural Design

... once everything has been said, software is defined by code. The bottom line Bertrand Meyer: ... once everything has been said, software is defined by code. Or – in other words: Architectural views, UML, quality attribute scenarios don’t pay the bills...

What do we do? We have identified that our architecture should strike a balance between qualities A, B, and C – in various scenarios. and - Conceptual integrity, Correctness and completeness, and Buildability Question: How do we then use this information to guide the design ??? Architectural Design ?

Architectural design The idealized process Architectural Evaluation Functional requirements Architectural Design Architectural Design Proposals Architectural qualities Best Architecture Code

Architectural Design The process of designing a software architecture that meets quality attribute requirements And enables implementation of functional requirements Characteristics of the process Creative Iterative (and incremental) Functional decomposition Quality decomposition Experimental Architectural prototyping Based on experience This lesson

Overview Architectural Styles Architectural Patterns Tactics A vocabulary of large-scale structure Architectural Patterns Name, Problem, Solution, Consequences Patterns = Styles? Tactics Surgical bits and pieces

Architectural Style

Architectural Style An architectural style is a description of component types and a pattern of their runtime control and/or data transfer. defines constraints on component types and interaction patterns thereby delimits/spans a set of architectures (also called architectural pattern ) Ex.: Client-Server Iflg. Bass §2.2 (se også Hofmeister §1.1.3) Bemærk: fokus på runtime! Altså Style defineret ved (Bass §5.1): mængde af komponent typer topologi = runtime relationer mellem komponenterne mængde af semantiske begrænsninger (typisk data/control adgang) mængde af connectorer som medierer kommunikation, koordinering, samarbejde

The parts of a ’style’ Parts of a style A set of component types with a given role/functionality A topology of relations (usually runtime relations) A set of connectors (RMI, socket, memory, etc.) that handle communication, coordination or collaboration. A set of semantic constraints i.e. what can components/connectors do or not do?

Exercise: Client-server Component types? categories of components Topology? (“the landscape” / set of relations) Connectors? what are the carriers of data- and control flow? Semantic constraints? what rule must the components/connectors obey?

Why are architectural styles / patterns interesting and important? Why is it interesting? Why are architectural styles / patterns interesting and important?

describe architectures with specific qualities Why is it interesting? Because they describe architectures with specific qualities …and document it provides a vocabulary

Classification in Bass Independent Components Event Systems Communicating Processes Data Flow Batch sequential Pipes and filters Data-Centered Repository Blackboard Baseret på Bass figur 5.1. Bemærk at klassifikation i en given familie ikke er entydig. F.eks. tilhører en client-server arkitektur både ’independent components’ og ’data-centered’ familien.

Classification Virtual Machine Call and Return Heterogeneous styles Interpreter Rule-based system Call and Return Layered Object-oriented Main program and subroutine Heterogeneous styles different styles mixed at different levels

Data-centered Repository and Blackboard QA: Data integrability: clients are independent Exercise: Name some examples of systems SAP-Fig 5.2 Repository: Passiv datalagring Blackboard: Publish/subscribe notifikation på ændringer Quality attributes: (data) integrability, modifiability i mindre grad Eks.: client-server, SCM systemer; voice-recognition

Data-flow Batch-sequential and Pipes-and-filters QA: Modifiability, Reusability Exercise: Name some examples of systems SAP-Fig 5.3 Batch-sequential: Een process helt færdig før næste tager over; Pipes-and-filters: Incrementel transformation af data Quality Attributes: Reuse, modifiability. Anti-QA: Performance Ulemper: umuligt at lave interaktive systemer. Ofte dårlig performance fordi komponenterne ikke kan kommunikere indbyrdes og dermed optimere, og ofte bruges et lav-niveau format over pipes (ASCII). Eks.: ’Gamle’ tape-baserede systemer, UNIX shell, billed-behandling IS2000

Virtual machine Interpreter Rule-based systems QA: Portability Exercise: Name some examples of systems SAP-Fig5.4 QA: Portability. Anti-QA: Performance Eks.: Java virtuelle maskiner

Call-and-Return MPS style [OO style] Layered style QA: Modifiability, Scalability (Layers:Portability) SAP-Fig 5.5 & 5.7 QA: Modifiability, Scalability Diskuter n-tier versus layered arkitektur. Diskuter Layer bridging. Sammenlign ’virtual machine’ Eks.: TCP/IP en typisk lagdelt arkitektur. Stepwise refinement -> MPS Figuren for layers ikke så vældig god. F.eks. pile OP i lagene hvilket bryder noget med modifiability QA.

Independent components Communicating processes client-server is a prominent case Event systems publish-subscribe systems message/channel based systems QA: Modifiability (decouple sender and receiver) Uafhængige processer ELLER objekter som kommunikerer via beskeder. Event systemer: Hvorledes kontrol fordeles er en del af style’n. Implicit invokation er ’publish/subscribe’ (Observer pattern). Eks.: Windows event-dispatching; Java Swing registrering af listener instanser (Samme mekanisme i EJB?)

Heterogeneous styles Most large systems use several styles in a mix The categories are not disjoint Ex.: CORBA-based client-server Object-oriented call-and-return Layered Independent components

Summary Architectural styles/patterns are proven templates for organizing components and connectors to achieve certain QA. Can be classified Data-flow Data-centred Communicating processes Call and return Most real architectures are mixes of styles.

Architectural Patterns Same wine on new bottles?

Christopher Alexander: Pattern Each pattern describes a problem which occurs over and over again in our envi-ronment, and then descri-bes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice. Christopher Alexander worked on planning towns and buildings, but the definition works just as well for object-oriented patterns. In software the solution is expressed in terms of objects, roles, interfaces, and collaboration patterns instead of windows, doors and walls, but the contents of a patter is always: A solution to a problem in a context

‘Alcoves’: One of Alexander’s patterns ... many large rooms are not complete unless they have smaller rooms and alcoves opening off them.  No homogeneous room, or homogeneous height, can serve a group of people well. To give a group a chance to be together, as a group, a room must also give them the chance to be alone, in one’s and two’s in the same space. This problem is felt most acutely in the common rooms of a house – the kitchen, the family room, the living room. In fact it is so critical there, that the house can drivee the family apart when it remains unsolved... In modern life, the main function of a family is emotional; it is a source of security and love. But these qualities will only come into existence if the members of the house are physically able to be together as a family. This is often difficult. The various members of the family come and go at different times of day; even when they are in the house, each has his own private interests... To solve the problem, there must be some way in which the members of the family can be together, even when they are doing different things. Therefore: Make small places at the edge of any room, usually no more than 6 feet wide and 3 to 6 feet deep and possibly much smaller. These alcoves should be large enough for two people to sit, chat, or play and sometimes large enougf to contain a desk or table.  Give the alcove a ceiling which is markedly lower than the ceiling height in the main room... (Alexander, 1977)

Branding? Buschmann et al. (1st ed) Patterns that are Examples Pattern-oriented software architecture Patterns that are more coarse-grained than design p. more specific focus than design p. Examples Model-view-controller, Blackboard, Broker, Forwarder/Receiver, ... Two other volumes concurrency, networking, resource management

Forwarder/Receiver Forwarder/Receiver decouples Inter Process Communication + portability, modifiability wrt. network IPC + marshalling/unmarshalling - modifiability wrt. re-configurations of network As forwarder is tightly coupled to receiver

Forwarder/Receiver

Client/Dispatcher/Server provide location transparency + modifiability wrt. location - performance - does not encapsulate IPC - no marshalling

Client/Dispatcher/Server

Broker (Java RMI, .NET Remoting) Recipe: Take one forwarder/receiver and combine it with a client/dispatcher/server Add rules for marshalling, a request/reply protocol, definition of identity, and error handling Fry for half a minute in an IDL-to-code generator Spice it up with some directory service Serve it running 

Broker

Discussion Relate to CORBA TS-05

Summary As Broker shows, architectural patterns may be much more complex than design patterns involving a lot of sub-patterns, tools, protocols, constraints deal with problems a higher level of abstraction – more “architectural” much more restricted in its usage compared to design patterns

Surgical means for getting a quality Tactics Surgical means for getting a quality

Architectural Tactics A design decision that influences the control of a quality attribute response E.g., Heartbeat to control availability Architectural strategy Collection of tactics Characteristics Capture what architects do in practice Tactics may refine other tactics Tactics may influence more than one quality attribute Since quality attributes are interdependent

POS Revisited – Component and Connector View

POS Revisited – Module View (Revised compared to [Christensen et al, 2007])

POS Revisited – Allocation View

Categories of Tactics Classified according to (main) quality attribute concern Availability Modifiability Performance Security Testability Usability

Availability Tactics (1)

Availability Tactics (2) Fault detection Ping/echo One component pings Expects response within predefined time Heartbeat (dead man timer) One component emits heartbeat message periodically Other components listen for it Often carry payload (like T in TS-05) Exceptions Raise exception when fault class is encountered Omission, crash, timing, response fault Fault recovery – repair Voting Redundant processes and processors Voter process check responses – fail if deviant Active redundancy (hot restart) Maintain redundant, parallel components Only use one response Passive redundancy (warm restart) Primary component responds, informs standbys of updates to make Resume standby if primary fails Spare Standby computing platform Boot and initialize state when needed Fault recovery – reintroduction Shadow operation Previously failed component runs in “shadow mode” Restore when sure that it works State resynchronization Redundancy requires restoring after downtime Checkpoint/rollback Create checkpoint recording consistent state at points in time Rollback to previous checkpoint if inconsistent state detected Fault prevention Removal from service (Periodically) remove component to prevent anticipated failure Transactions Bundling sequential steps Undo all if necessary Give examples of each!

POS Availability Scenarios Exercise Which tactics can be used to handle the scenarios? Are other tactics relevant to POS?

Modifiability Tactics (1)

Modifiability Tactics (2) Assumption Restricting modifications to small set of module will reduce cost of change Localize changes Semantic coherence Ensure responsibilities of a module are coherent Low coupling + high coherence + measured against scenarios of change Anticipate expected changes Make decomposition so that considered changes affect minimal number of modules Based on assumptions of what changes will be Generalize module Make module compute broader range of functions E.g., constants -> input parameters Limit possible options Reduce options for modifications Prevention of ripple effect Hide information Decompose responsibilities Choose which to make public, hide others Maintain existing interface Mask variations Restricts communication paths Restrict the number of module with which a component shares data Use an intermediary Create module handling dependencies between components (e.g., Adapter) Defer binding time Runtime registration Configuration files Polymorphism Component replacement Adherence to defined protocols Give examples of each!

POS Modifiability Scenario Exercise Which tactics can be used to handle the scenario? Are other tactics relevant to POS?

Performance Tactics (1)

Performance Tactics (2) Resource Demand Increase Computation Efficiency Better algorithms to reduce latency Reduce Computational Overhead Avoid intermediaries, communicate directly (tight coupling) Cmp adapters and other modifiability tactics Manage Event Rate Lower the rate of sampling of environmental variables Control Frequency of Sampling Use queues to buffer external events, and sample this using a lower frequency Resource Management Introduce Concurrency Process requests in parallel, load balancing Maintain multiple copies of data or computations Caching, dynamic programming Increase Available Resources Faster processors, additional processors, more memory, faster network, ... Resource Arbitration Scheduling Policy FIFO Fixed-priority scheduling Dynamic priority scheduling Static scheduling Give examples of each!

POS Performance Scenario

Security Tactics

Testability Tactics

Testability Tactics (2) Manage Input/Output Record/Playback Record information across an interface, using it later as input for test harness Separate Interface from Implementation Allows replacing production units with test stubs (fakes, mock objects, spies) Specialized access routes/interfaces Add accessors to internal state inspection for testing internal algorithms Keep separate from production code interfaces Internal Monitoring Built-in Monitors Maintain performance load, capacity, security information for inspection Turn on/off using macros/aspect oriented techniques May influence results (monitoring takes time, increase resource demand, etc.) Give examples of each!

Usability Tactics

Usability Tactics (2) Separate User Interface Handle rapid changes in UI requirements (Modifiability tactics?) Support User Initiative Cancel Undo Aggregate Allow user to make composite operations Show multiple views Support Systemt Initiative User Model Collect data on usage to predict user behaviour and experience Task Model Know the overall task to support users’ interaction with the invidiual steps System Model Know state of system to report to user Give examples of each!

Discussion Tactics help make quality attribute decisions Does it make sense to divide tactics according to quality attributes – cf. interdependence? Do tactics make sense regardless of domain? Are the tactics really just design ideas? Cf. patterns… Bass’ list of tactics Is it complete? What is the level of granularity? What is the quality of their presentation?