+ All Categories
Home > Documents > 091007 Software Architecture Knowledge...

091007 Software Architecture Knowledge...

Date post: 24-May-2018
Category:
Upload: doananh
View: 219 times
Download: 3 times
Share this document with a friend
40
Software Architecture Representation Oct 7 2009 © Philippe Kruchten, 2009 1 Software Architecture Knowledge Representation Knowledge Representation Philippe Kruchten JAOO October 7, 2009 2 Philippe Kruchten, Ph.D., P.Eng., CSDP Professor of Software Engineering NSERC Chair in Design Engineering Department of Electrical and Computer Engineering University of British Columbia University of British Columbia Vancouver, BC Canada [email protected] +1 604 8275654 Founder and president Kruchten Engineering Services Ltd Vancouver, BC Canada [email protected] +1 604 4182006 3
Transcript

Software Architecture Representation Oct 7 2009

© Philippe Kruchten, 2009 1

Software Architecture Knowledge RepresentationKnowledge Representation

Philippe KruchtenJAOO

October 7, 20092

Philippe Kruchten, Ph.D., P.Eng., CSDP

Professor of Software EngineeringNSERC Chair in Design EngineeringDepartment of Electrical and Computer EngineeringUniversity of British ColumbiaUniversity of British ColumbiaVancouver, BC [email protected]+1 604 827‐5654 

Founder and president

Kruchten Engineering Services LtdVancouver, BC [email protected]+1 604 418‐2006

3

Software Architecture Representation Oct 7 2009

© Philippe Kruchten, 2009 2

Outline

• Software architectureK l d t• Knowledge management

• Motivation• Architecture representation• AK = AD + ADD• ProcessesProcesses• Tools• Summary

4Slides at: pkruchten.wordpress.com/talks/

Software ArchitectureSoftware architecture encompasses the set of significant decisions about 

• the organization of a software system, • the selection of the structural elements and their interfaces by which the system is composed together with their behavior as specified in the collaboration among those elements

5

elements, • the composition of these elements into progressively larger subsystems,

Grady Booch, Philippe Kruchten, Rich Reitman, Kurt Bittner; Rational, circa 1995(derived from Mary Shaw)

Software Architecture Representation Oct 7 2009

© Philippe Kruchten, 2009 3

Software Architecture (cont.)• the architectural style that guides this organization, these elements and their interfaces, their collaborations, and their composition. 

Software architecture is not only concerned with structure and behavior, but also with usage, functionality performance resilience reuse

6

functionality, performance, resilience, reuse, comprehensibility, economic and technological constraints and tradeoffs, and aesthetics.

Software architecture…

• architecture = { elements, form, rationale } *P & W lf 1992

• A skeleton• More than structure• Embodies or addresses many “ilities”• Executable therefore verifiable

Perry & Wolf 1992

Executable, therefore verifiable

• Emergent? …. Sometimes…

7

Software Architecture Representation Oct 7 2009

© Philippe Kruchten, 2009 4

Knowledge

• Expertise, and skills acquired by a person through experience or education; thethrough experience or education;  the theoretical or practical understanding of a subject

• What is known in a particular field or in total; facts and information A f ili it i d b i• Awareness or familiarity gained by experience of a fact or situation

• Plato: knowledge is "justified true belief"8

Knowledge as an asset

• “Intellectual capital”

• Knowledge workers

• “Knowledge is power”

• Knowledge management: – sharing, distributing, creating, capturing and understanding the knowledge of an organization 

9

Software Architecture Representation Oct 7 2009

© Philippe Kruchten, 2009 5

“The major problem with intellectual capital is that it has legs and walks home every day.”

11

Rus & Lindvall 2002

Tacit  Knowledgevs. 

Explicit Knowledge

12

Software Architecture Representation Oct 7 2009

© Philippe Kruchten, 2009 6

SECI Model

Nonaka & Takeuchi 199513

System ‐ Specific  Knowledgevs. 

System ‐ Generic Knowledge

14

Software Architecture Representation Oct 7 2009

© Philippe Kruchten, 2009 7

Tacit

Generic Specific

ExplicitdeBoer & Farenhorst 2008

15

Tacitgeneric

Tacit specific

Tacit

generic specific

Explicit  Explicit

Generic Specific

generic specific

Explicit 16

Software Architecture Representation Oct 7 2009

© Philippe Kruchten, 2009 8

experienceexpertiseskills

goalsconstrainsassumptionsconcerns

TacitArchitecturalKnowledge

skills concernscontext

patterns, stylesreference 

architect re

requirementsdesign decisionsdesign rationale

Generic Specific

architectureADLs

standards

gviewsmodelscode (?)

ExplicitdeBoer & Farenhorst 2008

17

Tacit

Generic SpecificUtilization

Abstraction

Explicit 18

Software Architecture Representation Oct 7 2009

© Philippe Kruchten, 2009 9

Tacit

Generic SpecificUtilization

Abstraction

Explicit

RefinementMaturation

19

Knowledge management strategies

• Codification– Capture information, store it, retrieve it

• Personalisation– Define who knows what, “yellow pages”

Hansen et al. 1999 20

Software Architecture Representation Oct 7 2009

© Philippe Kruchten, 2009 10

Strategy & Knowledge type

P li ti Codification

FormalFormal

D t d

Documented

Personalisationstrategy

Codificationstrategy

Explicit

21

Documented

TacitTacit

Implicit

A short history of software architecture 

• NATO conference (1969)

• Box & arrows (1960s‐1980s)

• Views & viewpoints (1990s‐2000)

• ADLs (1980s‐2000s)

• Architectural design methods (1990s‐2000s)

• Standards, reference architectures (1995‐…)

• Architectural design decisions (2004‐…)

23

Software Architecture Representation Oct 7 2009

© Philippe Kruchten, 2009 11

Box & Arrows

24

25

Software Architecture Representation Oct 7 2009

© Philippe Kruchten, 2009 12

User

Blob

Blob

27

Issues

• General “message” or metaphor OKF ti• Fuzzy semantics:– What does a box denote?

• Function, code, task, process, processor, data

– What does an arrow denote?• Data flow, control flow, semantic dependency, timing

Di i i t t ti• Diverging interpretation• Many distinct concerns or issues addressed in one diagram

28

Software Architecture Representation Oct 7 2009

© Philippe Kruchten, 2009 13

Views & Viewpoint

• S4V at Siemens• BAPO/CAFR at Philips/ p

• IEEE Std 1471:2000 Recommended practice for software architecture description

• ISO/IEC 42010: 2007 Recommended practice for architectural description of software‐intensive systems

• ISO/IEC 42010: 2010 (?) Architectural description

• Clements et al. 2005, Documenting Sw Arch• Rozanski, N., & Woods, E. (2005). Software Systems 

Architecture: Working With Stakeholders Using Viewpoints and Perspectives. Boston: Addison‐Wesley.

30

The 4+1 view model of architecture

Programmers Software management

End‐user, designers Functionality

Logical View ImplementationView

ProcessView

DeploymentView

Use CaseView

Users/Analysts/TestersBehavior 

31

PerformanceScalability Throughput

System  IntegratorsSystem topology 

Delivery, installationCommunication

System  Engineering

Kruchten 1995

Software Architecture Representation Oct 7 2009

© Philippe Kruchten, 2009 14

ISO42010:201032

Architectural Design

Architectural

Ideas

Architecture

ArchitecturalSynthesis

Ideas

Context, Constraints

ArchitecturalAssets

Architecture

Backlog

ArchitecturalSynthesis

ArchitecturalEvaluation

Evaluation resultsArchitecturally 

Requirements

ArchitecturalEvaluationArchitectural

Analysis

SignificantHofmeister et al 200533

Software Architecture Representation Oct 7 2009

© Philippe Kruchten, 2009 15

Architecture description languages

• Rapide (Stanford)

• ACME (CMU)• Wright (CMU)• C2 (UC Irvine)• Darwin (Imp Coll ) ‐> KoalaDarwin  (Imp. Coll.)  ‐> Koala• Archimate• AADL (based on metaH)

34

UML 2.0

• A  notation

• Better “box and arrows”

• Crisper semantics

• Almost an ADL ?

• Model‐driven design, 

• Model‐driven architecture.

35

Software Architecture Representation Oct 7 2009

© Philippe Kruchten, 2009 16

Actor A

Use Case 1

Use Case 2

Actor B

Openning

Writingadd file [ numberOffile==MAX ] / flag OFF

add file

Use-CaseDiagram Class Diagram

StatechartDiagram

FileMgr

fetchDoc( )sortByName( )

DocumentList

add( )delete( )

Document

name : intdocid : intnumField : int

get( )open( )close( )read( )sortFileList( )

fLi t

FileList

read() fill the code..

user : Clerk

mainWnd : MainWnd

fileMgr : FileMgr

repository : Repositorydocument : Document

gFile : GrpFile

9: sortByName ( )

L1: Doc view request ( )

2: fetchDoc( )

5: readDoc ( )

7: readFile ( )

3: create ( )

6: fillDocument ( )

4: create ( )

8: fillFile ( )

Window95

¹®¼-°ü¸® Ŭ¶óÀ̾ðÆ®.EXE

WindowsNT

¹®¼-°ü¸® ¿£Áø.EXE

WindowsNT

Windows95

Solaris

ÀÀ¿ë¼-¹ö.EXE

AlphaUNIX

IBM Mainframe

µ¥ÀÌŸº£À̽º¼-¹ö

Windows95

¹®¼-°ü¸® ¾ÖÇø´Document

FileManager

GraphicFile

File

Repository DocumentList

FileList

ReadingClosing

close file

close fileUse Case 3

Collaboration Diagram

Component

GrpFile

read( )open( )create( )fillFile( )

rep

Repository

name : char * = 0

readDoc( )readFile( )

(from Persistence)

create( )fillDocument( )

fList

1

add( )delete( )

1

File

read( ) Deployment Diagram

36

usermainWnd fileMgr :

FileMgrrepositorydocument :

DocumentgFile

1: Doc view request ( )

2: fetchDoc( )

3: create ( )

4: create ( )

5: readDoc ( )

6: fillDocument ( )

7: readFile ( )

8: fillFile ( )

9: sortByName ( )

ƯÁ¤¹®¼-¿¡ ´ëÇÑ º¸±â¸¦ »ç¿ëÀÚ°¡ ¿äûÇÑ´Ù.

È-ÀÏ°ü¸®ÀÚ´Â Àоî¿Â ¹®¼-ÀÇ Á¤º¸¸¦ ÇØ´ç ¹®¼- °´Ã¼¿¡ ¼³Á¤À» ¿äûÇÑ´Ù.

È-¸é °´Ã¼´Â ÀоîµéÀÎ °´Ã¼µé¿¡ ´ëÇØ À̸§º°·Î Á¤·ÄÀ» ½ÃÄÑ È-¸é¿¡ º¸¿©ÁØ´Ù.

Sequence Diagram

Component Diagram

Many kinds of diagrams, but not always very adapted to 

architecture

Patterns

• Common solution to a recurring blproblem…

• Architectural patterns• Buschmann F., Meunier R., Rohnert H. & Sommerlad P. & Stal M. (1996). Pattern‐Oriented Software Architecture: A System of Patterns John Wiley & Sonsof Patterns. John Wiley & Sons

37

Software Architecture Representation Oct 7 2009

© Philippe Kruchten, 2009 17

39

Avgeriou & Zdun 2005 

Standards, reference architectures

• Codified generic knowledgeIEEE 1471 ISO 42010 hit t• IEEE 1471, ISO 42010  architecture representation

• RM‐ODP = ISO 10746• TOGAF (The Open Group)( p p)• MoDAF, DoDAF, <xyy>AF

• ISO 19439 Framework for enterprise modelling40

Software Architecture Representation Oct 7 2009

© Philippe Kruchten, 2009 18

RM‐ODP  or ISO/IEC 10746

41

Methods

• ADD, ATAM, QAW  (SEI)RUP (IBM)• RUP  (IBM)

• SAV,… (Siemens)• BAPO/CAFR (Philips)• etc

• Software Architecture Review and Assessment (SARA) handbook

42

Software Architecture Representation Oct 7 2009

© Philippe Kruchten, 2009 19

Metaphors

• Metaphors give meaning to form, help ground t l tour conceptual systems.

• Cognitive transfer: source domain to target domain– the <target> is the <source>

43

Lakoff and Johnson (1980) Metaphors we live by 

Metaphors

• Ontological metaphors:– Clients and servers, layers, pipes and filters, shopping carts

• Structural metaphors– Spatial: on top of, parallel to, aligned with, foreground/background

– Networks, web, hierarchy

– Containers: packages, repositories, library, volume…

44

Software Architecture Representation Oct 7 2009

© Philippe Kruchten, 2009 20

Beyond metaphors: Blends

• “Super metaphor” using 2 source spaces.

• Desktop metaphor is actually a blend– Computer command

– Office elements Imaz & Benyon 2007

45

TacitArchitecturalKnowledge

patterns, stylesreference 

requirementsSAD

Generic Specific

architectureADLs

standards

models

code (?)

Explicit 46

Software Architecture Representation Oct 7 2009

© Philippe Kruchten, 2009 21

Something’s missing

• Software architecture document

• Transferring knowledge– To another system

– To another person

– To another organization

• Rationale: why?

• Decisions…. ?

47

Software ArchitectureSoftware architecture encompasses the set of significant decisions about 

• the organization of a software system, • the selection of the structural elements and their interfaces by which the system is composed together with their behavior as specified in the collaboration among those elements, 

48

• the composition of these elements into progressively larger subsystems,

etc etc etc

Grady Booch, Philippe Kruchten, Rich Reitman, Kurt Bittner; Rational, circa 1995(derived from Mary Shaw)

Software Architecture Representation Oct 7 2009

© Philippe Kruchten, 2009 22

AK = AD + DD

Architectural Knowledge 

Architectural Design 

49

Design Decisions

Kinds of decisions

• Ontocrises– Existence decisions

– Anticrises

• Diacrises– Property decisions– Property decisions

• Pericrises– Executive decisions

50

Software Architecture Representation Oct 7 2009

© Philippe Kruchten, 2009 23

-DesignDecision

ExistenceDecision PropertyDecision ExecutiveDecision

ONTOCRISIS DIACRISIS PERICRISIS

Organization

Process

Constraint

DesignRule

StructuralDecision

BehavioralDecision

51

Technology

Guideline

BehavioralDecision

Tool

Ban

ANTICRISIS

Attributes of a decision

• Epitome TextR ti l T t P i t• Rationale Text or Pointer

• Scope Text• State Enumeration• History List of 

(time stamp + author + change)

52

( p g )

• Cost Value• Risk Exposure level

Software Architecture Representation Oct 7 2009

© Philippe Kruchten, 2009 24

Relationship between decisions

• Constrains• Forbids• Enables• Subsumes• Conflicts with• Overrides• Comprises (is made of)• Is bound to

53

• Is an alternative to• Is related too• Traces to• Does not comply with

54

Software Architecture Representation Oct 7 2009

© Philippe Kruchten, 2009 25

State of  a decision

Idea 0 Tentative 2 Decided 3 Approved 4

55

Rejected 1 Challenged 2

Obsolete 0

Experiment: Spar Aerospace Dexterous Robot

• DR = Dexterous Robot = arm used to fix the Hubble 

56

telescope

• MySQL Database, SVG + GraphViz

Michael Trauttmansdorff & Nicolas Kruchten

Software Architecture Representation Oct 7 2009

© Philippe Kruchten, 2009 26

Fragment, enlarged

57

Extraction, around Stow Fixture

58

Software Architecture Representation Oct 7 2009

© Philippe Kruchten, 2009 27

59

5+1 views?

61

Software Architecture Representation Oct 7 2009

© Philippe Kruchten, 2009 28

Capturing design decisions

• “Design rationale support systems have failed t i l l f t i th ftto gain any level of support in the software industry because of overhead of capture”(Jintae Lee)– QOC, DRL, InfoRAT, IBIS etc.

– not enough immediate value, therefore no 

62

g ,incentive to capture

– tedious process, static diagrams

Aside: decision support, decisions process

• Many of these systems were design to support a rational decision processa rational decision process– Establish issue– Enumerate alternatives, find Pros & Cons– Rank, prioritize– ChoseD t f h i

63

– Document reason of choice

• In reality: gut feeling, and first idea to mind– Then rationalization, or scrap and rework

Software Architecture Representation Oct 7 2009

© Philippe Kruchten, 2009 29

Rational choice

fat-client

Criterion: portability??

thin-client

rich-client

web browserbased

custom clientprogram

clientstyle?

64

Tackling capture differently…?• Automating capture with daemons (agents)

– Instrument the source of decision:• Design tool

• Requirement management tool

• Defect tracking tool

• Configuration and change management tool

• Management tool (task allocation, issue/action items)

65

• Waypointing

• Capture now, sort out later

Software Architecture Representation Oct 7 2009

© Philippe Kruchten, 2009 30

Tools for Architectural Knowledge Management

• Codification or personalization or both?• The myth of the “central repository”

– Bureaucratic school

• The myth of the additional tool to solve a new problem– Tool vendors and/or grad students

• “Feeding the beast”• Time shift: Production – Need

– no incentive, no ‘stickyness’

66

Tools

• For whom?– Architect– Reviewers, auditors– Requirement eng., analysts– Maintainers

• To do what?– Producing AK– Retrieving AK– Assessing architecture– Making decisions– Educating others‐ ….

67

Software Architecture Representation Oct 7 2009

© Philippe Kruchten, 2009 31

Tools

• ADDS, Rafael Capila

• Archium, Jansen & Bosch

• AREL, Tony Tang

• Knowledge architect

• IBM’s Architect’s Workbench

• SEURAT, Burge

68

Tabular form

Software Architecture Representation Oct 7 2009

© Philippe Kruchten, 2009 32

Graphical form

From Nicolas Kruchten 2006

Expand and Elide

Lee & Kruchten 2008

Software Architecture Representation Oct 7 2009

© Philippe Kruchten, 2009 33

Clustering (with Aduna)

Kruchten et al 2005

What if analysis

Software Architecture Representation Oct 7 2009

© Philippe Kruchten, 2009 34

Personalisation (& hybrid)

• Knowledge sharing networks

• WIKIs

• Web 2.0

• Semantic web, semantic wikis…

• EAGLE at VU

• PAKME

74

PAKME

• M. Ali Babar, LERO, Limerick Ireland

75

Software Architecture Representation Oct 7 2009

© Philippe Kruchten, 2009 35

Design Decision Captured as a Case

Date 10/7/2009 76

Searching Design Decision Cases

Date 10/7/2009 77

Software Architecture Representation Oct 7 2009

© Philippe Kruchten, 2009 36

Using a Design Decision Case

Date 10/7/2009 78

Navigating the Knowledge Base

Date 10/7/2009 79

Software Architecture Representation Oct 7 2009

© Philippe Kruchten, 2009 37

Template for Capturing and Representing Patterns

Date 10/7/2009 80

Summary

• Architecture is more than just the resulting d i f hit tidesign of architecting

• Tacit, explicit knowledge

• Generic, specific knowledge

• Codification, personalisation

• Power of metaphors

• Decisions as first class citizen

• Tool support (need more work)82

Software Architecture Representation Oct 7 2009

© Philippe Kruchten, 2009 38

QuestionsSlides at: pkruchten.wordpress.com/talks/

Questions?

83

Shameless self‐promotion

M. Ali Babar, T. Dingsøyr, P. Lago, H. van Vliet, Software Architecture Knowledge Management, Springer Verlag, 2009

I wrote chapter 3 !

84

Software Architecture Representation Oct 7 2009

© Philippe Kruchten, 2009 39

References (1)Avgeriou, P., & Zdun, U. (2005). Architectural patterns revisited:a pattern language. Paper presented at the 10th European Conference on Pattern Languages of Programs (EuroPlop 2005), Irsee, Germany.Bass, L., Clements, P., & Kazman, R. (2003). Software Architecture in Practice (2nd ed.). Reading, MA: Addison‐Wesley.Buschmann F., Meunier R., Rohnert H. & Sommerlad P. & Stal M. (1996). Pattern‐Oriented Software Architecture: A System of Patterns. John Wiley & Sons. Hofmeister, C., Kruchten, P., Nord, R., Obbink, H., Ran, A., & America, P. (2007). A General Model of Software Architecture Design derived from Five Industrial Approaches. Journal of Systems & Software, 80(1), 106‐126.Imaz, M., & Benyon, D. (2007). Designing with blends: conceptual foundations of human‐computer interaction and software engineering Cambridge MA: Theof human computer interaction and software engineering. Cambridge, MA: The MIT Press.Kruchten, P., Capilla, R., & Dueñas, J. C. (2009). The role of a decisions view in software architecture practice. IEEE Software, 26(2). Kruchten, P. (1995). The 4+1 View Model of Architecture. IEEE Software, 12(6), 45‐50.

85

References (2)Kruchten, P. (2004, December 3‐4). An Ontology of Architectural Design Decisions. Paper presented at the 2nd Groningen Workshop on Software Variability Management, Groningen, NL.

h ( ) i f f hi fKruchten, P. (2009). Documentation of Software Architecture from a Knowledge Management Perspective‐‐Design representation. In: M. Ali Babar, T. Dingsøyr, P. Lago & H. van Vliet (Eds.), Software Architecture Knowledge Management: Theory and Practice (pp. 29‐58). Berlin: Springer‐Verlag.Lakoff, G., & Johnson, M. (1980). Metaphors we live by. Chicago: The University of Chicago Press.N k I & T k hi H (1995) Th k l d tiNonaka, I., & Takeuchi, H. (1995). The knowledge creating company: how Japanese companies create the dynamics of innovation. New York: Oxford University Press.Perry, D. E., & Wolf, A. L. (1992). Foundations for the Study of Software Architecture. ACM Software Engineering Notes, 17(4), 40‐52.

86

Software Architecture Representation Oct 7 2009

© Philippe Kruchten, 2009 40

References (3)Rozanski, N., & Woods, E. (2005). Software Systems Architecture: Working With Stakeholders Using Viewpoints and Perspectives. Boston: Addison‐Wesley. y

Vitruvius Pollio, M. (25 B.C.). De Architectura.

87

88


Recommended