版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
軟件體系結構
ATAM孫志崗sun@恥空巢養(yǎng)思兌纂首訟串矽市僳促械烈茂邏楷頂炒印況梗猶坐又萎尊彝撤賜軟件體系結構ATAM軟件體系結構ATAM11/17/20221?sun@軟件體系結構
ATAM孫志崗恥空巢養(yǎng)思兌纂首訟串矽市僳促械烈ArchitectureTradeoffAnalysisMethodsm
(ATAMsm)SMATAMandArchitectureTradeoffAnalysisMethodareregisteredservicemarksofCarnegieMellonUniversity逸憋俊剛建艙陛撮咖搪顧灑烤宋橫誅橙墊悠嬸荷身拇忱烯嘗盆骨矮璃間晦軟件體系結構ATAM軟件體系結構ATAM11/17/20222?sun@ArchitectureTradeoffAnalysisRoleofaSoftwareArchitectureIftheonlycriterionforsoftwarewastogettherightanswer,wewouldnotneedarchitectures.
如果評判軟件的唯一標準是正確,那么就不需要體系結構Unstructured,monolithicsystemswouldsuffice.
無結構的、單模塊的系統(tǒng)已經足夠。Butotherthingsalsomatter,suchas:
但事實上還有很多其他問題,比如:modifiabilitytimeofdevelopmentperformancecoordinationofworkteamsTheseissuesareoftenaddressedintheSoftwareArchitecture
這些問題通常體現(xiàn)在軟件體系結構當中炊論媚育令躊徐萊嘎貪腮伎鋒惕腫怯諜嘶屯啞琺傾適塹朔寅礙北援凌虱梆軟件體系結構ATAM軟件體系結構ATAM11/17/20223?sun@RoleofaSoftwareArchitecturWhyAnalyzeSoftwareArchitectures?Alldesigninvolvestradeoffinsystemqualities(設計即折中)Systemqualitiesarelargelydependentonarchitecturaldecisions
體系結構極大地影響系統(tǒng)質量Promotingonequalityoftencomesattheexpenseofanotherquality
提高一個質量,經常會降低另一個質量Asoftwarearchitectureistheearliestlife-cycleartifactthatembodiessignificantdesigndecisions:choicesandtradeoffs.
“選擇與折中”是設計中首要考慮的問題,軟件體系結構是軟件生命周期中最早一個遇到此問題的Choicesareeasytomake,buthardtochangeoncethesystemisimplemented
選擇很容易做,但是一旦系統(tǒng)已經實現(xiàn),就很難更改拐曙串駱漚盅舉淑緞插哇摹找舉報桅叉陋舞湊汐齡隊芯冕犬布竄邊幼像趟軟件體系結構ATAM軟件體系結構ATAM11/17/20224?sun@WhyAnalyzeSoftwareArchitectTheATAMThepurposeoftheATAM:istoassesstheconsequencesofarchitecturaldecisionsinlightofqualityattributerequirements.
ATAM的目標是:按照質量需求,評價體系結構設計碰鄰嫡啄佬遮馮啞胎綽綸祖深搏乙哮例豆炒恩檀橢叫糧邢義土佐贊捉尿朋軟件體系結構ATAM軟件體系結構ATAM11/17/20225?sun@TheATAMThepurposeoftheATAContextfortheATAMBusiness
GoalsArchitecture
DecisionsPASM$Value$$Cost$戊洽仟詢頂痘篙凈惡孤鑿盒砂寞狽卓稠硝鄲垣標乓柞鹵削概聲觸濃咳青調軟件體系結構ATAM軟件體系結構ATAM11/17/20226?sun@ContextfortheATAMBusiness
GPurposeofATAMWeneedamethodinwhichtherightquestionsareaskedearlyto
我們需要一個新方法,讓我們能盡早提出正確問題,來:Discoverrisks-alternativesthatmightcreatefutureproblemsinsomequalityattribute
發(fā)現(xiàn)風險:可能在將來產生質量問題的方案Discovernon-risks-decisionsthatpromotequalitiesthathelprealizebusiness/missiongoals
發(fā)現(xiàn)非風險:可以提高質量的決策Discoversensitivity
points-alternativesforwhichaslightchangemakesasignificantdifferenceinsomequalityattribute
發(fā)現(xiàn)關鍵點:方案中一個小小的變化,就可能讓質量完全大變樣Discovertradeoffs-decisionsaffectingmorethanonequalityattribute
發(fā)現(xiàn)折中:影響一個以上質量的決策廷復茸夾映曬疑連快幻圣乏岸絞格鯉筍牙歡煞訪言啼參蛤這前灌挾概柜唬軟件體系結構ATAM軟件體系結構ATAM11/17/20227?sun@PurposeofATAMWeneedamethoPurposeofATAMThepurposeofanATAMisNOTtoprovidepreciseanalyses,buttodiscoverriskscreatedbyarchitecturaldecisions.
ATAM的目標不是做精確的分析,而是發(fā)現(xiàn)體系結構可能帶來的風險Wewanttofindtrends:correlationbetweenarchitecturaldecisionsandpredictionsofsystemproperties.
我們要發(fā)現(xiàn)一些趨勢:從體系結構方案預言系統(tǒng)的特性Discoveredriskscanthenbemadethefocusofmitigationactivities:e.g.furtherdesign,furtheranalysis,prototyping.
發(fā)現(xiàn)風險,然后做進一步的分析、設計Surfacedtradeoffscanbeexplicitlyidentifiedanddocumented.
明顯的折中可以被清晰地指出并寫入文檔詫概宜東脂籍峰尼湯驚擺坍體莖飾穆授冒通祭濰列塞翼柒談跡郵處水超鐐軟件體系結構ATAM軟件體系結構ATAM11/17/20228?sun@PurposeofATAMThepurposeofATAMBenefitsThereareanumberofbenefitsfromperformingATAManalyses:
做ATAM分析可以得到下列益處:Clarifiedqualityattributerequirements
明確質量需求Improvedarchitecturedocumentation
提高體系結構文檔質量Documentedbasisforarchitecturaldecisions
文檔化了的體系結構方案原理Identifiedrisksearlyinthelife-cycle
及早發(fā)現(xiàn)風險Increasedcommunicationamongstakeholders
促進了角色之間的交流Theresultsareimprovedarchitectures.
結果是,體系結構得到改進軀米豪折保謹洞溺藝曼魏避踏側刊館墅暫祿品惟富她忽砒揮商炭鎮(zhèn)掖還貴軟件體系結構ATAM軟件體系結構ATAM11/17/20229?sun@ATAMBenefitsThereareanumbePurposeofATAMThepurposeofATAMistoassesstheconsequencesofarchitecturaldecisionsinlightofqualityattributerequirements.
ATAM的目標就是按照質量需求,評價體系結構設計TheATAMprocessisashort,facilitatedinteractionbetweenmultiplestakeholders,leadingtotheidentificationofrisks,sensitivities,andtradeoffs.
ATAM過程是角色之間交流的一個方便、快捷的手段,便于發(fā)現(xiàn)風險、關鍵點和折中ThepurposeofanATAMisNOTtoprovidepreciseanalyses,thepurposeIStodiscoverriskscreatedbyarchitecturaldecisions.
ATAM的目標不是提供精確的分析,而是發(fā)現(xiàn)體系結構方案可能帶來的風險鑲勾惑回椎高茶皺葦鄧魚壯賀藤懶障依命挺冗梳湃工喊援憐搓專踏這多掇軟件體系結構ATAM軟件體系結構ATAM11/17/202210?sun@PurposeofATAMThepurposeofPreconditionsforanATAMClientsmusthaveaSoftwareArchitectureScope/scalemustbemanageable
其作用范圍和程度必須可管理ATAMwillnotworkifthesoftwarearchitecturehasnotbeencreatedyet
如果體系結構還沒有被建立,那么ATAM毫無用武之地ATAMteammemberswillreviewarchitecturalartifacts,andmayhelprefinedocumentation
ATAM組將評估體系結構,并幫助改善文檔Architectmustprepareanarchitecturepresentation
架構師必須準備一個體系結構講解Clientsmustprepareabusiness/missiongoalspresentation
必須有一個商業(yè)/任務目標講解ATAMwillreviewarchitectureartifacts,presentations,andreadaheadmaterialtobecomefamiliarwithdomain
ATAM要事先閱讀一些材料來熟悉這個領域誨袖狐奏耐銑蹲值秸嘶造鯨角衡帶凝聶敵乖御跺奢詛原插矩尊臀懼抉袒秦軟件體系結構ATAM軟件體系結構ATAM11/17/202211?sun@PreconditionsforanATAMClienEvaluationTeamEachATAMteamconsistsofaleaderandatleastthreeotherteammembers
每個ATAM組有一個組長和至少三個組員domainexpertiseisnotnecessary
領域專家不是必須ATAMteammembersmustbeexperiencedarchitects
ATAM組員必須是經驗豐富的架構師ATAMleadersmusthaveEXCELLENTcommunicationandfacilitationskills
ATAM組長必須有優(yōu)秀的交流和激勵技巧TheATAMteammembersfillmultiplerolesduringthecourseoftheevaluation.
ATAM組員在評審過程中扮演多種角色豬嘶撂祖舒當跺叢鉚膳器棕遞斷筏跪單拾摧速唾嶄巫價深局蝕飽靴奠夾擒軟件體系結構ATAM軟件體系結構ATAM11/17/202212?sun@EvaluationTeamEachATAMteamEvaluationTeamRolesModerator—facilitatesdiscussions,brainstorming,analysis
主持人:推動講解、自由討論和分析Scenarioscribe(s)—writesutilitytree,rawscenarios,risks,sensitivities,tradeoffsonflipchartsorwhiteboards
場景記錄員:在白板上記下原始場景、有效樹、風險、關鍵點和折中Proceedingsscribe—capturesscribe’swritingonalaptopcomputer,preparingtheResults,Presentationtemplate
會議記錄員:把場景記錄員寫下的內容錄入電腦,準備結論講解模板墓鮑鏟榴隴墅租藝加衣蔬給佰建皿歡諄拖糯漆墾篡膿博紛瞄煞誅搏呈嚷咀軟件體系結構ATAM軟件體系結構ATAM11/17/202213?sun@EvaluationTeamRolesModeratorEvaluationTeamRolesProcessenforcer/observer—monitorstheprocesssteps,takesnotesabouttheprocess,andhowitcouldbeimproved
過程實施者/觀察者:監(jiān)視各個步驟,做筆記,尋找改進方法Timekeeper—informstheevaluationleaderwhenthetimeallocatedforastephasexpired
計時員:當某一個步驟的時間已經超出時,提醒組長Questioner(s)—raiseissuesthatthestakeholdershavenotthoughtof;asksquestionsbasedonhowqualityattributesofinterestrelatetoarchitecturalstyles
提問者:發(fā)現(xiàn)各個角色還沒有想到的問題;詢問質量因素怎樣和體系結構風格關聯(lián)的問題蛻軸琢藹直之瀑巋聘喻墾晴僅寥船長隊熒磁稠頗刑豁凰童用率返汛僵再嘴軟件體系結構ATAM軟件體系結構ATAM11/17/202214?sun@EvaluationTeamRolesProcesseBasicRulesforATAMTeam
MembersKeeptheprocessmoving!
讓過程持續(xù)進行Askquestions
提問Proposescenarios
提出建議性的場景Writedownexactlywhatstakeholderssay;donot“edit”theirwords!
記下各個角色所說的話,但是不要改寫!櫥注坦尋定盡汰卵叁他逛卿睫禍炳欲窺久壓屯煎改潮你皖饅裕擾焦師左窗軟件體系結構ATAM軟件體系結構ATAM11/17/202215?sun@BasicRulesforATAMTeam
MembATAMStepsPresenttheATAM
介紹ATAMPresentbusinessdrivers
講解商業(yè)動力Presentarchitecture
講解體系結構Identifyarchitecturalapproaches
明確體系結構方法Generatequalityattributeutilitytree
生成有效樹Analyzearchitecturalapproaches
分析體系結構方法Brainstormandprioritizescenarios
自由討論和為場景排序Analyzearchitecturalapproaches
分析體系結構方法Presentresults
講解結論Phase1Phase2菲辱濰寺旱尚拇砂噸抖您甭近弊青悶去豐歧折但酸開蠅刃勻王煞竟漓倡沃軟件體系結構ATAM軟件體系結構ATAM11/17/202216?sun@ATAMStepsPresenttheATAM
介紹A1.PresenttheATAMEvaluationTeampresentsanoverviewoftheATAMincluding:ATAMstepsinbriefTechniquesutilitytreegeneration(有效樹生成)architectureelicitationandanalysis(體系結構引出和分析)scenariobrainstorming/mapping(場景討論/映射)Outputsarchitecturalapproachesutilitytreescenariosrisksand“non-risks”sensitivitypointsandtradeoffs頭運柄繞稍城宦址初吱圍抒礫澆江牛姜織溉尺孕銑卸鑄徊灘垛朽淺暴冉蠶軟件體系結構ATAM軟件體系結構ATAM11/17/202217?sun@1.PresenttheATAMEvaluation2.PresentBusinessDriversATAMcustomerrepresentativedescribesthesystem’sbusinessdriversincluding:
客戶代表描述系統(tǒng)的商業(yè)動力BusinesscontextforthesystemHigh-levelfunctionalrequirementsHigh-levelqualityattributerequirementsarchitecturaldrivers:qualityattributesthat“shape”thearchitecture
體系結構動力:質量因素塑造體系結構criticalrequirements:qualityattributesmostcentraltothesystem’ssuccess
苛刻需求:對系統(tǒng)的成功有決定作用的質量唉潮理邊屑泛凰圓卓隘諒逸薊啤傀辟粱鋒店俏丹框撓凱或椿擊廁飛噎?;燔浖w系結構ATAM軟件體系結構ATAM11/17/202218?sun@2.PresentBusinessDriversATA3.PresentArchitectureArchitectpresentsanoverviewofthearchitectureincluding:
架構師對體系結構的簡介:TechnicalconstraintssuchasanOS,hardware,ormiddle-wareprescribedforuse
技術限制,比如必須要采用的OS、硬件和中間件Othersystemswithwhichthesystemmustinteract
其他必須與之交互的系統(tǒng)Architecturalapproaches/stylesusedtoaddressqualityattributerequirements
用來滿足質量需求的體系結構風格棺瑤函背我芭住甸郵萄予家敢其允宮沃灑唐噎癢蔫臟瞬華閨奸瘴喚湘染豢軟件體系結構ATAM軟件體系結構ATAM11/17/202219?sun@3.PresentArchitectureArchite3.PresentArchitectureThearchitect,projectmanager,andmarketingrepresentativeneedtodescribehowthesystemwillcreatevaluefortheorganization.
架構師、項目經理和市場代表一起來描述此系統(tǒng)如何為公司帶來價值Themarketingrepresentativemustdetailhowsystemresponses(functionalandqualityattributerequirements)maptovalue.
市場代表必須詳細闡述系統(tǒng)的功能和質量需求對市場價值的影響Theprojectmanagermustdetailhowarchitecturalapproachesmaptocost.
項目經理必須詳細闡述體系結構需要的成本辟軌鑼擎壁潘存血健顱興追像蚜隴務岔鑼剛恰娩寫干臻墜秦轍肛三擺遜湖軟件體系結構ATAM軟件體系結構ATAM11/17/202220?sun@3.PresentArchitectureThearcATAM產生的環(huán)境Business
GoalsArchitecture
DecisionsPASM$Value$$Cost$ProjectManagerArchitectMarketerGoal:MaxValue-Cost惑汕看參親塌乖扔頤漓匪懸澀善痊判沙隴焙烯辮稿雛瑰譚臃油達策喂妻姨軟件體系結構ATAM軟件體系結構ATAM11/17/202221?sun@ATAM產生的環(huán)境Business
GoalsArchite4.IdentifyArchitecturalApproachesStarttoidentifyplacesinthearchitecturethatarekeyforrealizingqualityattributegoals.
開始確認體系結構中對實現(xiàn)質量需求產生決定作用的部分Identifyanypredominantarchitecturalapproaches.
明確主要的體系結構方法Examples:client-server3-tierwatchdogpublish-subscriberedundanthardware脖雞倉米評問龔余遇膛辜缺曹幟撓吶隅樹什虱徒收提驅熄哭治擱騙茲謙菠軟件體系結構ATAM軟件體系結構ATAM11/17/202222?sun@4.IdentifyArchitecturalAppr5.GenerateQualityAttribute
UtilityTreeIdentify,prioritize,andrefinethemostimportantqualityattributegoalsbybuildingautilitytree.
通過建立一個有效樹,來明確、排序和精煉大部分的質量目標Autilitytreeisatop-downvehicleforcharacterizingthe“driving”attribute-specificrequirements
有效樹是一個自頂向下的工具,用來刻畫重要的需求Selectthemostimportantqualitygoalstobethehigh-levelnodes(typicallyperformance,modifiability,security,andavailability)
把最重要的質量目標放在高層節(jié)點(典型的有:性能、適應性、安全和可用性)ScenariosaretheleavesoftheutilitytreeOutput:acharacterizationandaprioritizationofspecificqualityattributerequirements.
輸出:質量需求的描述和優(yōu)先級忻畔傈扳褐聲圈屢炳壬扼燎碰狙傅跑管土氮祈側顆押敵速摳妮御債中刃盲軟件體系結構ATAM軟件體系結構ATAM11/17/202223?sun@5.GenerateQualityAttributeUtilityTree
Construction&Prioritization薄烴棘葫嶺就盲乒勿奄軒地挽例鄲氛仿攫漂氛剿躲磺邁氫烷術俯蠅瓜坦忻軟件體系結構ATAM軟件體系結構ATAM11/17/202224?sun@UtilityTree
Construction&P6.Elicit/Analyze
ArchitectureApproachesMotivatedbythehighpriorityleavesoftheutilitytree,theEvaluationTeamprobesthearchitectureapproaches.
有效樹中高優(yōu)先級的葉子促進評審組探查體系結構Identifytheapproacheswhichpertaintothehighestpriorityqualityattributerequirements
確認可以滿足高優(yōu)先級的質量需求的方法Generatequality-attributespecificquestionsforhighestpriorityqualityattributerequirement
為高優(yōu)先級的質量需求制定關于質量的問題Askquality-attributespecificquestions
詢問這些問題Identifyandrecordrisksandnon-risks
確認和記錄風險和非風險,關鍵點和折中褥滑雖粟苫好穩(wěn)祭叫朗忌踴島質遭穴熟賜蠢蛤愛茨紳繼緒兜衣脖寓著胃鐵軟件體系結構ATAM軟件體系結構ATAM11/17/202225?sun@6.Elicit/Analyze
ArchiteQualityAttributeQuestionsQualityattributequestionsprobestylestoelicitarchitecturaldecisionswhichbearonqualityattributerequirements.
質詢體系結構在質量需求上如何作為PerformanceHowareprioritiesassignedtoprocesses?
怎樣決定進程的優(yōu)先級?Whatarethemessagearrivalrates?
消息到來的頻率是多少?ModifiabilityArethereanyplaceswherelayers/facadesarecircumvented?
有按層封裝的地方嗎?Whatcomponentsrelyondetailedknowledgeofmessageformats?
哪個組件依賴消息格式的細節(jié)?斂帖鹼涪揮簾家始中升袍訃往篇卷磋漣賬德洱水站澤夷踞賂蠕李智該含釋軟件體系結構ATAM軟件體系結構ATAM11/17/202226?sun@QualityAttributeQuestionsQuaRisksandNon-RisksWhilerisksarepotentiallyproblematicarchitecturaldecisions,…
風險是有潛在問題的體系結構Non-risksaregooddecisionsrelyingonimplicitassumptions.
非風險是在一個可信的假設之下的,好的方案Riskandnon-riskconstituents
風險和非風險要素architecturaldecisionqualityattributerequirementrationaleSensitivitypointsarecandidaterisksandcandidatetradeoffpoints.
關鍵點是候選的風險和折中玲彤譴頓睫磺縮框巢瓦抉典惟娩店討錳臃典席篷喳俐撣甭花傀醋牛啃躺掄軟件體系結構ATAM軟件體系結構ATAM11/17/202227?sun@RisksandNon-RisksWhilerisksRisksandNon-RisksExamplerisksRulesforwritingbusinesslogictierofyour3-tierstylearenotclearlyarticulated.
三層架構下,商業(yè)邏輯層的規(guī)則還沒有確定Thereisnowayofdetectingthe“l(fā)ive”failureofacriticalcomponent.
沒有檢測一個關鍵組件是否正常工作的機制Everycomponentintheradarsubsystemimplicitlyassumesarotationrate.
雷達系統(tǒng)的每一個組件都假定有一個固定的轉動速率Examplenon-riskAssumingmessagearrivalratesofoncepersecond,aprocessingtimeoflessthan30ms,andtheexistenceofonehigherpriorityprocess,a1secondsoftdeadlineseemsreasonable.
假定消息的到達速率是每秒一次,一次處理的時間小于30ms。如果對一個更高優(yōu)先級的處理的響應時間要求是1秒鐘,此系統(tǒng)可行斟斬愛吐雷迪氈婚智歲冪肺澆雙交聯(lián)苛扁讒蟬薩熟臆擅唾憑吾步攀魚鱗礙軟件體系結構ATAM軟件體系結構ATAM11/17/202228?sun@RisksandNon-RisksExamplerisSensitivitiesandTradeoffsExampleSensitivityChangingthetimingschemefromaharmonicframeworktoanon-harmonicframeworkwouldbeeasy,butduetoimpliedtimingdependencies,therewouldimpactfarreachingimpactstoothermodules.
把定時方法從一個精確的框架移植到一個不精確的框架可能很容易,但是因為各個模塊對定時的依賴,可能會極大地影響它們的正常工作ExampleTradeoffsInordertoachievetherequiredlevelofperformanceinthediscreteeventgenerationcomponent,assemblylanguagehadtobeusedtherebyreducingtheportabilityofthiscomponent.
為了達到性能要求,不得不在離散的事件產生組件中使用匯編語言。此組件不再有移植性釘遲蒂踏娟墩峙肉死挎同姐誨鈍傲隆雜娠牛脯匝蛀判蔣殉鮑夠坤似既哩啊軟件體系結構ATAM軟件體系結構ATAM11/17/202229?sun@SensitivitiesandTradeoffsExaExampleApproachElicitationScenario:DetectandrecoverfromHWfailureofmainswitch
場景:檢測主交換機的硬件故障,并恢復Stimulus:CPUfailureResponse:0.999999availabilityofswitchArchitecturalApproaches:RST蔣繕完掇垂汛賭墮俊項劑誣第淡屜祟涅贍陰昆蹦作臉醫(yī)岡笆徊她俊畫桑摯軟件體系結構ATAM軟件體系結構ATAM11/17/202230?sun@ExampleApproachElicitationScExampleApproachElicitationScenario:DetectandrecoverfromHWfailureofmainswitch
場景:檢測主交換機的硬件故障,并恢復Stimulus:CPUfailureResponse:0.999999availabilityofswitchArchitecturalApproaches:RSTBackupCPU(s)BackupDataChannelWatchdogHeartbeatFailoverRerouting硯拷劃雨撈嫂書甭乍境虜鄖邱捕劈飯領懇臂滅快鍛艾振洲髓纓呸錫倘侈故軟件體系結構ATAM軟件體系結構ATAM11/17/202231?sun@ExampleApproachElicitationScExampleApproachElicitationScenario:DetectandrecoverfromHWfailureofmainswitch
場景:檢測主交換機的硬件故障,并恢復Stimulus:CPUfailureResponse:0.999999availabilityofswitchArchitecturalApproaches:RSTBackupCPU(s)XXBackupDataChannelXXXWatchdogXHeartbeatXFailoverReroutingXX慌紳啃澆茄休笆客源霍磺磕哄違馭五其奮錨率僥訪乎衫嵌聶柯扼昂沁位墾軟件體系結構ATAM軟件體系結構ATAM11/17/202232?sun@ExampleApproachElicitationScExampleApproachElicitationAnalysis:ensuresnocommonmodefailurebyusingdifferentHWandOS
通過使用不同的硬件和操作系統(tǒng)確保不會有一樣的錯誤發(fā)生worst-caserolloverisaccomplishedin3seconds
在最壞的情況下,只要3秒鐘內回卷成功就可以guaranteedtodetectfailurewith1second
保證錯誤在1秒鐘內被檢測到watchdogissimpleandprovenreliable
看門狗很簡單,而且被證明可信賴恰痰挽孕擎囂眷幅宛轅味啪恨嘴然饋拎可棉迫裳矣胯勺辛儈措坡縷蜘效泳軟件體系結構ATAM軟件體系結構ATAM11/17/202233?sun@ExampleApproachElicitationAn7a.BrainstormScenariosScenariosareexamplestimuliusedtoRepresentstakeholders’interests
說明角色關心的內容UnderstandqualityattributerequirementsScenariosarespecific
場景是對系統(tǒng)的anticipatedusesof(usecasescenarios),
預期使用(用例場景),anticipatedchangesto(growthscenarios),or
預期改變(演化場景),或者unanticipatedstressesto(exploratoryscenarios)
非預期的重壓(試探場景) thesystem.Agoodscenariomakesclearwhatthestimulusisthatcausesitandwhatresponsesareofinterest.
一個好的場景可以清晰地描述出是什么引起這個場景,以及需要什么樣的應答繭尼犁簍幌母傀障鼻憊榆榆矗蜘頌戎扔肛郭鼎泳內航姿綠財陛菱澤破夏寬軟件體系結構ATAM軟件體系結構ATAM11/17/202234?sun@7a.BrainstormScenariosScenarExampleScenariosUsecasescenarioRemoteuserrequestsadatabasereportviatheWebduringpeakperiodandreceivesitwithin5seconds.
遠程用戶通過web周期地請求數(shù)據(jù)庫報告,并且要求5秒鐘內收到GrowthscenarioAddanewdataservertoreducelatencyinscenario1to2.5secondswithin1person-week.
用一人周的時間增加一個數(shù)據(jù)服務器,使上一個場景的潛伏期降低到2.5秒ExploratoryscenarioHalfoftheserversgodownduringnormaloperationwithoutaffectingoverallsystemavailability.
在做日常操作時,一半的服務器當機,卻不影響整個系統(tǒng)的可用性Scenariosshouldbeasspecificaspossible.
場景應該盡可能的詳細欲娠俠供狐咀春卷蔽榷看琵匆嗣胯貉遭途水誰庚錠厚擒溺澆偉淚凜坦審濤軟件體系結構ATAM軟件體系結構ATAM11/17/202235?sun@ExampleScenariosUsecasescen起因(Stimuli),環(huán)境(Environment),結果(Responses)用例場景遠程用戶通過web周期地請求數(shù)據(jù)庫報告,并且要求5秒鐘內收到演化場景用一人周的時間增加一個數(shù)據(jù)服務器使上一個場景的潛伏期降低到2.5秒試探場景在做日常操作時,一半的服務器當機,卻不影響整個系統(tǒng)的可用性筍嗜鈕吊銜叭蔡坦咋臆傈舞互櫻朗昧哼廄礬懲人暮二甥仗甲報插呆迪東寐軟件體系結構ATAM軟件體系結構ATAM11/17/202236?sun@起因(Stimuli),環(huán)境(Environment),結果7b.PrioritizeScenariosStakeholdershavebrainstormedalargesetofscenarios.
各個角色已經討論出很多很多場景Eachstakeholderisallocatedanumberofvotesroughlyequalto0.3x#scenarios
每個角色分給一個數(shù)用來投票,其值大約為(0.3x場景數(shù))Prioritizedscenariosarecomparedwiththeutilitytreeanddifferencesarereconciled.
排好次序的場景和有效樹進行比較。如果有不同的,則要再次考量,達成一致總蹬辰搽茁丙孿然厲雛釣汲禽冀白枷織晃曳臆懇絨鮑黑或撤把輔菌纖卒掀軟件體系結構ATAM軟件體系結構ATAM11/17/202237?sun@7b.PrioritizeScenariosStakeh8.AnalyzeArchitecturalApproachesIdentifythearchitecturalapproachesimpactedbythescenariosgeneratedinthepreviousstep.
確定被上一步產生的場景影響的體系結構設計Thisstepcontinuestheanalysisstartedinstep6usingthenewscenarios.
用第6步同樣的方法來分析新的場景Continueidentifyingrisksandnon-risks.
繼續(xù)確認風險和非風險Continueannotatingarchitecturalinformation.
繼續(xù)標注體系結構信息燦諄脯辣蓖瀑殲滴庫愛魔盟粘釣遼紹痛茄貸刊瘤吩舟吾芯布蛙譽燦勁紫哇軟件體系結構ATAM軟件體系結構ATAM11/17/202238?sun@8.AnalyzeArchitecturalAppro9.PresentResultsRecapitulatestepsoftheATAM
總結所有ATAM的步驟PresentATAMoutputsarchitecturalapproachesutilitytreescenariosrisksand“non-risks”sensitivitypointsandtradeoffsOfferrecommendations
推薦養(yǎng)要恥廄或特淫木潦船玖袁鉀倫悄恩紛蹋梧缺洲最越船飽竊磊何辨銜蛾緒軟件體系結構ATAM軟件體系結構ATAM11/17/202239?sun@9.PresentResultsRecapitulateATAMNominalPhasesATAMevaluationsareoftenconductedintwostagesorphases:
ATAM通常被分為兩個階段Duringphase1thearchitectdescribesthequalityattributegoalsandhowthearchitecturemeetsthesegoals
在階段1,架構師描述質量目標,和體系結構如何達到目標Duringphase2wedetermineifalargergroupofstakeholdersagreeswiththegoalsandtheresults
在階段2,確認是否各個角色都同意這些目標和結果歲蘭肝歧養(yǎng)躲劍發(fā)鋁旁羨鬧級注蠅氨穴樊語誘蔑濤琳疊盆邦購揣吼筑糜毅軟件體系結構ATAM軟件體系結構ATAM11/17/202240?sun@ATAMNominalPhasesATAMevaluaWhentouseATAMAcademically,thetimetouseATAMisrightafterthearchitecturehasbeenspecifiedwhenthereislittleornocode.
學術上說,應該在體系結構確定之后使用ATAM,此時沒有或者僅有少量的代碼However,inpractice,ATAMhasbeenveryeffectiveinthefollowingsituations:Evaluatingalternativecandidatearchitectures
評審候選的體系結構Evaluatingexistingsystemspriortocommittingtomajorupgrades
在升級之前,評審已有的系統(tǒng)Decidingbetweenupgradeorreplace
無法決定是升級還是替換時政液謠遞漫產裕佃場顱幢罩知窯陰產住攀蓑迪饒扛赴陡檀醞蹭氰布肩藩險軟件體系結構ATAM軟件體系結構ATAM11/17/202241?sun@WhentouseATAMAcademically,2.PresentBusinessDriversAdistributedbattlefieldcontrolsystem(BCS)
一個分布式的戰(zhàn)場控制系統(tǒng)Onemobilecentralcommandernode
一個移動的中心指揮官節(jié)點Asetofmobilefighternodesundercommander
麾下的一組移動戰(zhàn)士節(jié)點Informationfrommanysources/sensors
來自很多信號源/傳感器的信息Messagesofdifferenttypes(maps,orders)
不同類型的消息(地圖,命令)Stakeholderswantedtounderstandhowthesystemwouldperformandadapttochanges.
角色想了解這個系統(tǒng)怎樣適應變化元囑冕駁尹逆廂娟折嫁字雍貍科破佳窮將腹韋碘醛格幟找姓檄瓶搞免賄侍軟件體系結構ATAM軟件體系結構ATAM11/17/202242?sun@2.PresentBusinessDriversAd3.PresentArchitecturePhysicalview:“client-server”,wherethecommandernodeistheserverandthefighternodesareclients.Detailedinformationalsocollectedforconcurrencyandcodeviews.省迭靖輕液募詛艙孝攏晴燙孩酉圍屯悲臉烴搬齋萄然餃滲一杠陰會塘京貞軟件體系結構ATAM軟件體系結構ATAM11/17/202243?sun@3.PresentArchitecturePhysica4.IdentifyArchitectureApproachesWeelicitedinformationonthearchitecturalapproacheswithrespecttomodifiability,availability,andperformance.
我們關心適應性、可用性和性能Foravailability,abackupcommanderschemewasdescribed.
對可用性,有一個備份指揮官Formodifiability,standardsubsystemorganizationalpatternsweredescribed.
對適應性,有基本的子系統(tǒng)組織模式Forperformance,anclient-serverstylewasdescribed.
對性能,采用客戶/服務器風格的獨立組件牛侯掘翌祖澄渤腰釋翌誹號灰裕亨今拂漬把碴償蝗頗舀宴鼠躬遷誤棚疹瓶軟件體系結構ATAM軟件體系結構ATAM11/17/202244?sun@4.IdentifyArchitectureAppro5.GenerateQualityAttribute
UtilityTree露畫父職括童娥仰孫芬八嫂僅旬值迅名摯充邑閑廬繳增避丟嗓肌譴轄李反軟件體系結構ATAM軟件體系結構ATAM11/17/202245?sun@5.GenerateQualityAttribute
6.ElicitandAnalyze
ArchitectureStylesTherepairtimeforthesystemisthetimetoturnthebackupintothecommandernode.
修復時間是把備份節(jié)點轉為指揮官節(jié)點的時間Communicationbetweenthecommandernodeandthebackupkeepsthebackup“insync”.
指揮官和備份節(jié)點之間的通訊維持著同步瓜蝕有喧仲拖滋王鎊蠢插人甥腕災餌幾玉吳耙諧單伙矮邁幌甜笛喲器囂逼軟件體系結構ATAM軟件體系結構ATAM11/17/202246?sun@6.ElicitandAnalyze
ArcAvailabilityAnalysisQA=thefractionoftimethesystemisworking
QA=系統(tǒng)工作的時間長度Thesystemisconsideredtobeworkingifthereisaworkingcommandernodeandoneormorefighternodes.
有一個有效的指揮官,一個或更多工作的戰(zhàn)士,則可以認為系統(tǒng)正在正常運行Whenthecommandernodefailsthesystemhasfailed.
指揮官故障,則系統(tǒng)故障ProvisionshavebeenmadeintheBCSarchitecturetoturnadesignatedfighter(backup)nodeintoacommandernode.
BCS體系結構允許一個指定的戰(zhàn)士轉為指揮官凌舵囚稻幼尿侵俄折潰穢和磁滓氮腕跺扔屎拋錫錢膠躍辮莊摹磋擬沙宰縫軟件體系結構ATAM軟件體系結構ATAM11/17/202247?sun@AvailabilityAnalysisQA=theAvailabilityAnalysisAvailabilitycanbeseenas:QA=h(λc,λb,μc,μb)λc=failurerateofthecommanderλb=failurerateofthebackupμc=repairrateofthecommanderμb=repairrateofthebackupProblem!Thebackuphasnobackup,heBCSarchitecture,μb=0Wediscoveredthisproblemviaelicitationofthehardwarefailureandrepairapproaches.
在評審硬件錯誤的恢復策略時,發(fā)現(xiàn)這個問題演蓑舟掂仇杭搏碉邏拿簇景銳胞煽什響堅釬救冉側皖似旗透差爍灰憨炔辮軟件體系結構ATAM軟件體系結構ATAM11/17/202248?sun@AvailabilityAnalysisAvailabilAvailabilityAnalysisHence,twowell-aimedhits(orhardwarefailures)disabletheentiresystem!
因此,兩個精確的打擊(或者硬件故障)將使整個系統(tǒng)癱瘓Thesolutionwastoturnmorefighternodesintopotentialbackups.
解決方法是讓更多的戰(zhàn)士做備份Alternativescouldbe:Acknowledgingbackups(n)
確認備份(n)Passivebackups(m)
被動備份(m)Passivebackups(m)+update
被動備份(m)且請求更新琺暮刑喝緝晤泥陵鈍里僑袋處喀瞎腥壕妮角仟啪正柴挖懲渣洗惰鐘舵渤去軟件體系結構ATAM軟件體系結構ATAM11/17/202249?sun@AvailabilityAnalysisHence,twAvailability:Sensitivity/RiskIdentificationTheavailabilityofthesystemcannowbeseenas:
系統(tǒng)的可用性可以被看作QA=j(n,m)nandmarearchitecturalavailabilitysensitivitypoints.
n和m是體系結構可用的關鍵點Sinceavailabilityisakeyattributeforthebattlemanagementmission,somechoicesofnandmpresentavailabilityrisks.
對戰(zhàn)場管理任務來說,可用性是一個關鍵屬性,對n和m的選擇說明了風險豪拼馮媽苯換鉚庸疥摯金喪墊孰吼繃梭替灰兩隘瘴澤伙甚闌菇倘搜采催某軟件體系結構ATAM軟件體系結構ATAM11/17/202250?sun@Availability:Sensitivity/RiskPerformanceAnalysisWediscoveredaperformanceproblemviaaqualitativeattributequestionsthatasksabouttherelativespeedsofcommunicationandprocessing.
通過詢問通訊和處理的速度,我們發(fā)現(xiàn)了性能問題Theproblemuncoveredwas:thenodesintheBCSarchitecturecommunicatedviaslowmodems.
這個問題是:BCS系統(tǒng)的節(jié)點通過慢速的調制解調器通信葫琴蠟朱睫疾轅倒嘛堵羚磁都標隆仿社庚穢勞遮兆壩撓儈綴寞我訓鐮幢嚼軟件體系結構ATAM軟件體系結構ATAM11/17/202251?sun@PerformanceAnalysisWediscovePerformanceAnalysisEnd-to-endlatencycalculationsshowedthattheoveralllatencywashighlysensitivetothenumberandsizeoftransmittedmessages.
端到端的潛伏期計算表明,整個系統(tǒng)的潛伏期和傳送消息的數(shù)量與大小有非常密切的關系Communicationloadcamefrom:
通信負荷來自:Thenormaloperationscommunicationoverhead
普通的命令通信開銷Thenumberofbackups(bothacknowledgingandpassive)
備份節(jié)點的數(shù)量蠻暖之祖淚令幸寇窩苦濱蟻縱錠夠劇毀處琢歉脅翼貼探央舉限賈長泛昨怒軟件體系結構ATAM軟件體系結構ATAM11/17/202252?sun@PerformanceAnalysisEnd-to-endPerformance:Sensitivity/RiskIdentificationThus,systemperformancecanbecharacterizedas:
系統(tǒng)性能可以寫作:Qp=k(n,m,CO)Communicationsoverheadwasaconstant.
通信協(xié)議開銷是個常數(shù)nandmarearchitecturalperformancesensitivitypoints.
n和m是性能的關鍵點潔懦攬汕債繹飽違逐顧澡周輝助肪呼叔氓懇友耳瘦賢鈕涵輯拴鋼眺擇踞崗軟件體系結構ATAM軟件體系結構ATAM11/17/202253?sun@Performance:Sensitivity/RiskTradeoffIdentificationIncreasingthenumberofbackupsincreasesavailability,butalsoincreasesaveragelatency(becausethesebackupsmustbekeptup-to-datebythecommander).
增大備份的數(shù)量提高可用性,但是也增大了平均潛伏期(因為所有的備份都要和指揮官保持同步)Hence,thenumberofactiveandpassivebackups(nandm)isatradeoffpointintheBCSarchitecture.
因此主動和被動備份的數(shù)量(n和m)是一個折中點Thedesignershadnotbeenawareofthetradeoffinherentintheirdesign.
評審之前,設計者還不知道存在這個折中點育肪棋繕咒畸晨翼兵甩撰剛鑷轎趣鍛挺塢壞迷敏符泄門博訝裝乳污熊堪緒軟件體系結構ATAM軟件體系結構ATAM11/17/202254?sun@TradeoffIdentificationIncreas7a.BrainstormScenariosInitialsetofseedscenariosweretoogeneral
初始的場景太概括“Systemfails”
“系統(tǒng)錯誤”Thesescenarioswerelaterrefined“CommandernodeisdestroyedandtheBackupnodetakesoverwithin5minutes”
“指揮官被消滅,備份節(jié)點在5分鐘內接管”46scenarioswereeventuallycollected,coveringmodifiability,scalability,availability,performance,portability.
最后收集了46個場景,覆蓋適應性、可測性、可用性、性能和移植性祈梗鉛彭廉偏嶄胃龍烙稿彌籠斑鯉毒埠魁彼小脾嘴茄蜒藝飛位田竭秦彬控軟件體系結構ATAM軟件體系結構ATAM11/17/202255?sun@7a.BrainstormScenariosInitia7a.BrainstormScenariosExamples:Modifiability:changedmapdataformatsareaccommodatedwithin1personmonth
適應性:改變地圖數(shù)據(jù)格式需要一個人月Performance:thenumberofsimultaneousmissionsdoubleswithoutaffectinglatency
性能:在不影響潛伏期的情況下讓并發(fā)的任務數(shù)加倍Availability:commandernodeisdestroyedandthebackupnodetakesoverwithin5minutes
可用性:指揮官被消滅,備份節(jié)點在5分鐘內接管追邊議庚登妝哇主敵像叔齊浦贍掖鄒善伊冒施醬渙佳充訴烈燦展朔醇碉跌軟件體系結構ATAM軟件體系結構ATAM11/17/202256?sun@7a.BrainstormScenariosExampl7b.PrioritizeScenariosThestakeholdersusedpreference-votingtoprioritizescenarios.
用投票的方式排序Theresultwas15highpriorityscenarios.
最后得到15個高優(yōu)先級的場景粱屏污籠雁氖鏈盲螟瞬嗡嫂淪煞裁中沉裕宙乍固寺跋鹽艇寫而餌賞影執(zhí)脹軟件體系結構ATAM軟件體系結構ATAM11/17/202257?sun@7b.PrioritizeScenariosThest8.Re-explorationofArchitecture
ApproachesThearchitectsmappedeachoftheunexploredhigh-priorityscenariosontotheBCSarchitecture.
架構師把每一個高優(yōu)先級的場景映射到體系結構Duringthisstagewe:Gatheredattribute-specificinformationqualitativeattributequestions
收集特殊屬性的信息和問題Clarifiedourunderstandingofthearchitectureandthescenarios
加強了對體系結構和場景的理解Documentedtheanswers
答案記入文
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
- 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 上海市靜安區(qū)2025屆高三一模語文試卷
- 2025年度個人自建廠房產權交易合同范本4篇
- 2025個人退伙經營合同(物流配送行業(yè)專用)4篇
- 2025年度鋼構建筑綠色施工監(jiān)理合同
- 2025-2030全球鐵基超塑形狀記憶合金行業(yè)調研及趨勢分析報告
- 2025-2030全球輸注穿刺耗材行業(yè)調研及趨勢分析報告
- 2025年全球及中國高純度氫氧化鈷行業(yè)頭部企業(yè)市場占有率及排名調研報告
- 2025年度鋼管及配件進出口代理合同范本2篇
- 2025年個人二手車買賣協(xié)議示范文本2篇
- 2025版教育培訓機構推廣服務合同模板3篇
- 道路瀝青工程施工方案
- 2025年度正規(guī)離婚協(xié)議書電子版下載服務
- 《田口方法的導入》課件
- 春節(jié)后安全生產開工第一課
- 內陸?zhàn)B殖與水產品市場營銷策略考核試卷
- 電力電纜工程施工組織設計
- 2024年重慶市中考數(shù)學試題B卷含答案
- 醫(yī)生給病人免責協(xié)議書(2篇)
- 票據(jù)業(yè)務居間合同模板
- 鋰離子電池健康評估及剩余使用壽命預測方法研究
- 體育文化園賽馬場項目概念規(guī)劃設計
評論
0/150
提交評論