武漢計算機學(xué)院課件_第1頁
武漢計算機學(xué)院課件_第2頁
武漢計算機學(xué)院課件_第3頁
武漢計算機學(xué)院課件_第4頁
武漢計算機學(xué)院課件_第5頁
已閱讀5頁,還剩64頁未讀, 繼續(xù)免費閱讀

付費下載

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)

文檔簡介

DescriptionofSoftwareArchitectures

軟件體系結(jié)構(gòu)描述

武漢?學(xué)計算機學(xué)院

liangp@

Whyarchitecturedescription?

|2

Overview

3

?

Whatisanarchitecturedescription?

?

ISOstandardforarchitecturedescription

?

Arch.representationinarchitectureviews

?

Howtoobtainasetofarch.views

SoftwaredesigninUML

4

Classdiagrams,statediagrams,sequencediagram,etc

?

?

Whocanreadthosediagrams?

?

Whichtypeofquestionsdotheyanswer?

?

Dotheyprovideenoughinformation?

Whocanreadthosediagrams?

5

Designer,programmer,tester,maintainer,etc.

?

?

Client?

?

User?

Whichtypeofquestionsdotheyanswer?

6

?

?

?

?

?

Howmuchwillitcost?

Howsecureandreliablewillthesystembe?Howaboutmaintenancecost?

Howtoevolvethesystemtomeetnewrequirements?

WhatifrequirementAisreplacedbyrequirementB?

Buildingarchitecture

7

Fire

Engineer

Plumber

StructureEngineer

Electrician

Analogywithbuildingarchitecture

8

?

?

?

?

?

Overallpictureofbuilding(client)Frontview(client,“beauty”committee)

Separatepictureforwatersupply(plumber)

Separatepictureforelectricalwiring(electrician)etc

Architecturepresentationsinpractice

9

Byandlargetwoflavors:

?

?

Powerpointslides(boxandline)–formanagers,users,consultants,etc

UMLdiagramsinUMLnotations,fortechnicians

?

?

Asmallsampleinpractice…

Eclipse1.0architecture

10

Eclipse3.0architecture(evolution)

11

EarthObservingSystem

12

Decision-MakingSystem

13

SA-Representations,13

?HansvanVliet,2012

直播系統(tǒng)

|14

支付寶錢包系統(tǒng)處理架構(gòu)

|15

So,…

16

?

Differentrepresentations

?

Fordifferentpeople

?

Fordifferentpurposes

Overview

17

?

Whatisanarchitecturedescription?

?

ISOstandardforarchitecturedescription

?

Architectureviews

?

Howtoobtainasetofarch.views

Conceptualmodelofarchitecture

description[fromStd42010]

18

Thinkaboutmodelastemplate

19

Someterms/definitions(fromISOstandard)

20

Systemstakeholder:individual,team,organization,orclassesthereof,anyonehavinganinterestinasystem

View:expressesthearchitectureofasystemfromtheperspectiveofspecificsystemconcerns

Viewpoint:establishestheconventionsfortheconstruction,interpretationanduseofarchitectureviewstoframespecificsystemconcerns

?

?

?

?

?

view:viewpoint::program:programminglanguage

view:viewpoint::map:legend

Possibleconcerns(QAsfromISOstandard)

21

Externalquality

?

?

?

?

?

?

Developmentcost

Customerexperience(usability)Availability

Performance

?

Internalquality

?

?

?

?

?

EvolvabilityMaintainabilityTestabilityChangeability

Thetwinpeaks

22

ArchitectingisNOTindependentfromReqsEng.

QualityattributeScenarios

23

?

QualityattributescanbemadeSMARTbydefiningappropriatescenarios

Qualityattributescenariosaredefinedby:

?

??

?

Thesourceofthestimulus:HumanormachineThestimulus(event)

Theenvironmentorconditionwherethestimulusoccurs

Theresponsemeasure:Time,valueandlocation

?

非功能屬性逐漸隨應(yīng)用情景的量化

ExamplePerformanceScenarios

24

StimulusInitiateTransaction

ResponseTransactionprocessed

MeasureAveragelatency2s

Source

User

Artifact

System

EnvironmentNormaloperation

Importantbusiness-relatedQAs

25

?

?

?

?

?

?

?

?

Time-to-marketCostprice

ReturnonInvestment(ROI)

TotalCostofOwnership(TCO)Lifetimeofthesystem

Integrationwithexisting(legacy)systemsMarketingfeatures

Etc.

ImportantDesign-timeQAs

26

AN=ArchitecturalinNature

Q-Attribute

AN?

Architecturalissues

Modifiability

Yes

Modularity

Well-encapsulatedcomponents

Portability

Yes

Portabilitylayerorcomponents

Reusability

Yes

Well-specifiedcomponentsLoosecomponentcoupling

IntegrabilityInteroperability

Yes

CompatibleconnectionmechanismsComplete&consistentinterfaces

Testability

Yes

Modular&encapsulatedcomponentsIncrementalbuildsalongassociations

ImportantRun-timeQAs

27

AN=ArchitecturalinNature

Q-Attribute

AN?

Architecturalissues

Dependability

?Timeliness

?Performance

?Reliability

?Availability

?Safety

?Security

Yes

WorstcaseresponsetimeAverageresponsiveness

MeanTimeToFailure(MTTF)AV=MTTF/(MTTF+MTTR)

AbsenceofcatastrophicfailuresResistancetounauthorizedusage

Usability

Partly

Properinf.flow&representationResponsiveness

Scalability

Yes

Hasmanyaspects

Contextofarchitecturedescription

[fromStd4201208 ]

Stakeholders

29

?

?

?

?

?

?

?

?

?

?

?

CustomerUserArchitect

RequirementsengineerDesigner

Implementer

Tester,integratorMaintainerProductmanager

Qualityassurancepeople

Viewpointspecification

30

[fromStd42010]

?

?

?

?

ViewpointnameStakeholdersaddressedConcernsaddressedLanguage,modeling

techniques

30

Exampleview:contextviewofSagitta2000

31

?system?

Workflowmanager

?call/return?

Call

?call/return?

Call

Douane

?call/return?

Call

?filetransfer?

File

?filetransfer?

File

?system?

?system?Sagitta2000/SDDouane

?system?

Inkomendepoort

Uitgaandepoort

Douane

Douane

?call/return?

?call/return?

Call

?call/return?

?call/return?

Call

Call

Call

?call/return?

?call/return?

?call/return?

Call

?call/return?

Call

?call/return?

Call

Call

C

ll

Basisregistratieen-algoritmen

?system?

?system?

Klanten

Tarieven&maatregelen

Bel.dienst

Douane

?syste

?system?

?system?

Cod

Risico's

Vergunningen&zekerheden

Douan

Douane

Douane

?shared?HeffingenAfdelinginnings

?shared?KlantenBelasting-dienst

?shared?Tarieven&maatregelenDouane

?shared?Vergun-ningen&zekerhedenDouane

?shared?CodesDouane

?shared?Risico'sDouane

?system?

Inning

Inning

m?se

Exampleviewpointdefinition

32

Name:Contextviewpoint

Stakeholders:systemowners,maintainersConcerns:systemboundaries,effectofchangesLanguage:UMLvariant

?

?

?

?

?system?

Has

System

Owner

Call

?shared?DatabaseOwner

Call/Return

Has

Return

Fro

?filetransfer?

File

?call/return?

Call

(a)

(b)

m

T

Filetransfer

Owner

System

Shareddatabase

Uses

Overview

33

?

Whatisanarchitecturedescription?

?

ISOstandardforarchitecturedescription

?

Architectureviews

?

Howtoobtainasetofarch.views

Keyconceptsofviewsandviewpoints

34

Aviewpointcoversoneormoreconcerns

?

?

Viewpointsseparateconcerns

?

Aviewconformstoaviewpoint

?

Aviewconsistsofoneormoremodels

Anarchitecturedescriptionisorganizedinoneormoreviews

?

The4+1viewmodel

35

End-userFunctionality

ProgrammersSoftwaremanagement

Scenariousecase

IntegratorsPerformanceScalability

Systemengineers

TopologyCommunications

DeploymentViewpoint

ProcessViewpoint

ImplementationViewpoint

s

LogicalViewpoint

The4+1viewmodel

36

CodeorganizationConfiguration,BuildingOS,DB,Middleware

LogicalorganizationAllocationoffunctionality

Use-caseview

What

Runtime

Physicaldistribution

ofHW&SW(topology)

Concurrency,Communication&Synchronization

Deploymentview

Processview

Implementationview

Logicalview

38

UML符號簡介

Exampleofusecaseview

39

ATM

BankClient

WithdrawMoney

TransferMoney

SaveMoney

4+1:Logical/ConceptualViewpoint

40

Thelogicalviewpointsupportsthefunctionalrequirements,i.e.,theservicesthesystemshouldprovidetoitsendusers.

?

Typically,itshowsthekeyabstractions(e.g.,classesandinteractionsamongstthem).

?

Exampleoflogicalview

41

CardReader

<<use>>

Display

<<send>

>

<<use>>

<<create>>

<<use>>

BankClient

<<send>>

<<use>>

<<send>>

<<use>>

<

<<use>>

Sensor

<use>>

AccountManager

Cashier

Dispenser

BankAccount

Keyboard

Transaction

Actor

dependency

Class

4+1:ProcessViewpoint

42

Theprocessviewpointgivesthemappingoffunctionstoruntimeelements

?

Ittakesintoaccountsomenonfunctionalrequirements,suchasperformance,systemavailability,concurrencyanddistribution,systemintegrity,andfault-tolerance.

?

Exampleofprocessview

43

2:withdrawrequest

1:authentifyuser

:casherinterface

3:confirm

:bankaccount

:BankClient

:withdrawer

5:dispatchnotes

4:authorize

:dispenser

4+1:ImplementationViewpoint

44

Theimplementationviewpointfocusesontheorganizationoftheactualsoftwaremodulesinthesoftware-developmentenvironment.

?

Thesoftwareispackagedinsmallchunks-programlibrariesorsubsystems-thatcanbedevelopedbyoneormoredevelopers.

?

Exampleofimplementationview

45

<<compile>>

<<trace>>

<<trace>>

Dispenser

<<file>>

dispenser.c

Sensor

Transmitter

<<file>>

client.c

Client

management

<<executable>>

client.exe

4+1:DeploymentViewpoint

46

?

Thedeploymentviewpointdefineshowthevariouselementsidentifiedinthelogical,process,andimplementationviewpoints-networks,processes,tasks,andobjects-mustbemappedontothevariousnodes.

?

Ittakesintoaccountthesystem'snonfunctionalrequirementssuchassystemavailability,reliability(fault-tolerance),performance(throughput),andscalability.

Exampleofdeploymentview

47

ATMServer

<<file>>

dispenser.c

ATMTerminal

<<executable>>

client.exe

<<file>>

client.c

Using4+1viewinUML

48

Usecaseview

Logical&processview

Implementationview

<<trace>>

<<trace>>

<<trace>

<<trace>>

<<trace>>

Deploymentview

Deploymentmodel

Testmodel

>

Implementati

onmodel

Designmodel

Analysismodel

Usecasemodel

TraceabilityofModels

49

用例視圖

邏輯&過程視圖

實現(xiàn)視圖

《跟蹤》

《跟蹤》

《跟蹤》

《跟蹤》

《跟蹤》

部署視圖

UML2.0

實施模型

測試模型

實現(xiàn)模型

設(shè)計模型

分析模型

用例模型

RationalRosein4+1view

50

RationalRosein4+1view

51

ArchitecturalviewsfromBass(view=representationofastructur52e)

Moduleviews

?

Moduleisunitofimplementation

Decomposition,uses,layered,class,datamodel

?

?

?

Componentandconnector(C&C)views

?

?

Theseareruntimeelements

Service,concurrency

?

Allocationviews

Relationshipbetweensoftwareelementsandenvironment

Workassignment,deployment,implementation

Componentandconnectorviews

53

Service:unitsthatinteroperatebyservicecoordinationmechanisms

Concurrency:todetermineopportunitiesforparallelism(connector=logicalthread)

?

?

Allocationviews

54

Deployment:howsoftwareisassignedtohardwareelements

Implementation:howsoftwareismappedontofilestructures

Workassignment:whoisdoingwhat

?

?

?

Crosscuttingviewpoints(perspectives)

55

Securityshowsupinfunctionalviewasuserauthentication,andindeploymentviewasfirewall

?

Performanceshowsupinfunctionalviewincomponentcoupling,indeploymentviewasdistributedtopology

?

Problems/pitfallsinarchitectureviews

56

Poorlydefinedinterfaces

PoorlyunderstoodresponsibilitiesOverloadingtheview

Justdrawingthepicture

Inappropriatelevelofdetail“God”elements

?

?

?

?

?

?

Exampleoverloadedview

57

library

interface

servernodes

apps

ejb

dbms

server

Architecturalviewsinyourprojects

58

Oneviewpointshouldfocusonthesystemfromtheperspectiveof(someorall)externalstakeholders

Oneoftheviewpointsshouldbeatechnicalviewpoint.

?

?

Howtoexpressbusinessconcernsofstakeholdersinanunderstandableway?

?

?

Someexamplesfrompreviousyears:

59

Overview

60

?

Whatisanarchitecturerepresentation?

?

ISOstandardforarchitecturedescription

?

Architectureviews

?

Howtoobtainasetofarch.views

Howtodecideonwhichviews

61

?

Whatarethestakeholdersandtheirconcerns?

?

Whichviewsaddresstheseconcerns?

?

Prioritizeandpossiblycombineviews

Categoriesofbusinessgoals[Ch16]

62

MeetingfinancialobjectivesMeetingpersonalobjectivesMeetingresponsibilityofemployeesMeetingresponsibilitytocountryMeetingresponsibilitytosociety

Meetingresponsibilitytoshareholders

ManagingmarketpositionImprovingbusinessprocesses

Managingproduct’squalityandreputation

?

?

?

?

?

?

?

?

?

Examplebusinessgoal

63

Stakeholder:wewanttoprovideuserswithareliable,securerwaytoa

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論