《软件体系结构ATAM课件.ppt》由会员分享,可在线阅读,更多相关《软件体系结构ATAM课件.ppt(62页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。
1、庸牌钡倦磊撬所盯现枫袜奎韭吐臭您箔腰恶遇糯嗽奸烁锅底辉恋艺边芒桃软件体系结构ATAM软件体系结构ATAM软件体系结构软件体系结构ATAMATAM孙志岗耻空巢养思兑纂首讼串矽市僳促械烈茂逻楷顶炒印况梗犹坐又萎尊彝撤赐软件体系结构ATAM软件体系结构ATAMArchitecture Tradeoff Analysis Methodsm(ATAMsm)nSMATAM and Architecture Tradeoff Analysis Method are registered service marks of Carnegie Mellon University逸憋俊刚建舱陛撮咖搪顾洒烤宋横诛橙垫
2、悠婶荷身拇忱烯尝盆骨矮璃间晦软件体系结构ATAM软件体系结构ATAM1/12/20232 Role of a Software ArchitecturenIf the only criterion for software was to get the right answer,we would not need architectures.如果评判软件的唯一标准是正确,那么就不需要体系结构如果评判软件的唯一标准是正确,那么就不需要体系结构nUnstructured,monolithic systems would suffice.无结构的、单模块的系统已经足够。无结构的、单模块的系统已经足够
3、。nBut other things also matter,such as:但事实上还有很多其他问题,比如:但事实上还有很多其他问题,比如:modifiabilitytime of developmentperformancecoordination of work teamsnThese issues are often addressed in the Software Architecture这些问题通常体现在软件体系结构当中这些问题通常体现在软件体系结构当中炊论媚育令踌徐莱嘎贪腮伎锋惕肿怯谍嘶屯哑珐倾适堑朔寅碍北援凌虱梆软件体系结构ATAM软件体系结构ATAM1/12/20233 W
4、hy Analyze Software Architectures?nAll design involves tradeoff in system qualities(设计(设计即折中)即折中)System qualities are largely dependent on architectural decisions体系结构极大地影响系统质量体系结构极大地影响系统质量Promoting one quality often comes at the expense of another quality提高一个质量,经常会降低另一个质量提高一个质量,经常会降低另一个质量nA software
5、 architecture is the earliest life-cycle artifact that embodies significant design decisions:choices and tradeoffs.“选择与折中选择与折中”是设计中首要考虑的问题,软件体系结构是设计中首要考虑的问题,软件体系结构是软件生命周期中最早一个遇到此问题的是软件生命周期中最早一个遇到此问题的Choices are easy to make,but hard to change once the system is implemented选择很容易做,但是一旦系统已经实现,就很难更改选择很容
6、易做,但是一旦系统已经实现,就很难更改拐曙串骆沤盅举淑缎插哇摹找举报桅叉陋舞凑汐龄队芯冕犬布窜边幼像趟软件体系结构ATAM软件体系结构ATAM1/12/20234 The ATAMnThe purpose of the ATAM:is to assess the consequences of architectural decisions in light of quality attribute requirements.ATAM的目标是:的目标是:按照质量需求,评价体系按照质量需求,评价体系结构设计结构设计碰邻嫡啄佬遮冯哑胎绰纶祖深搏乙哮例豆炒恩檀椭叫粮邢义土佐赞捉尿朋软件体系结构ATA
7、M软件体系结构ATAM1/12/20235 Context for the ATAMBusinessGoalsArchitectureDecisionsPASM$Value$Cost$戊洽仟询顶痘篙净恶孤凿盒砂寞狈卓稠硝郸垣标乓柞卤削概声触浓咳青调软件体系结构ATAM软件体系结构ATAM1/12/20236 Purpose of ATAMnWe need a method in which the right questions are asked early to我们需要一个新方法,让我们能尽早提出正确问题,来:我们需要一个新方法,让我们能尽早提出正确问题,来:Discover risks-
8、alternatives that might create future problems in some quality attribute发现发现风险风险:可能在将来产生质量问题的方案:可能在将来产生质量问题的方案Discover non-risks-decisions that promote qualities that help realize business/mission goals发现发现非风险非风险:可以提高质量的决策:可以提高质量的决策Discover sensitivity points-alternatives for which a slight change m
9、akes a significant difference in some quality attribute发现发现关键点关键点:方案中一个小小的变化,就可能让质量完全大变样:方案中一个小小的变化,就可能让质量完全大变样Discover tradeoffs-decisions affecting more than one quality attribute发现发现折中折中:影响一个以上质量的决策:影响一个以上质量的决策廷复茸夹映晒疑连快幻圣乏岸绞格鲤笋牙欢煞访言啼参蛤这前灌挟概柜唬软件体系结构ATAM软件体系结构ATAM1/12/20237 Purpose of ATAMnThe purp
10、ose of an ATAM is NOT to provide precise analyses,but to discover risks created by architectural decisions.ATAM的目标不是做精确的分析,而是发现体系结构可能的目标不是做精确的分析,而是发现体系结构可能带来的风险带来的风险nWe want to find trends:correlation between architectural decisions and predictions of system properties.我们要发现一些趋势:从体系结构方案预言系统的特性我们要发现一
11、些趋势:从体系结构方案预言系统的特性nDiscovered risks can then be made the focus of mitigation activities:e.g.further design,further analysis,prototyping.发现风险,然后做进一步的分析、设计发现风险,然后做进一步的分析、设计nSurfaced tradeoffs can be explicitly identified and documented.明显的折中可以被清晰地指出并写入文档明显的折中可以被清晰地指出并写入文档诧概宜东脂籍峰尼汤惊摆坍体茎饰穆授冒通祭潍列塞翼柒谈迹邮处水
12、超镣软件体系结构ATAM软件体系结构ATAM1/12/20238 ATAM BenefitsnThere are a number of benefits from performing ATAM analyses:做做ATAM分析可以得到下列益处:分析可以得到下列益处:Clarified quality attribute requirements明确质量需求明确质量需求Improved architecture documentation提高体系结构文档质量提高体系结构文档质量Documented basis for architectural decisions文档化了的体系结构方案原理
13、文档化了的体系结构方案原理Identified risks early in the life-cycle及早发现风险及早发现风险Increased communication among stakeholders促进了角色之间的交流促进了角色之间的交流nThe results are improved architectures.结果是,体系结构得到改进结果是,体系结构得到改进躯米豪折保谨洞溺艺曼魏避踏侧刊馆墅暂禄品惟富她忽砒挥商炭镇掖还贵软件体系结构ATAM软件体系结构ATAM1/12/20239 Purpose of ATAMnThe purpose of ATAM is to asse
14、ss the consequences of architectural decisions in light of quality attribute requirements.ATAM的目标就是按照质量需求,评价体系结构设计的目标就是按照质量需求,评价体系结构设计nThe ATAM process is a short,facilitated interaction between multiple stakeholders,leading to the identification of risks,sensitivities,and tradeoffs.ATAM过程是角色之间交流的一个
15、方便、快捷的手段,便过程是角色之间交流的一个方便、快捷的手段,便于发现风险、关键点和折中于发现风险、关键点和折中nThe purpose of an ATAM is NOT to provide precise analyses,the purpose IS to discover risks created by architectural decisions.ATAM的目标不是提供精确的分析,而是发现体系结构方的目标不是提供精确的分析,而是发现体系结构方案可能带来的风险案可能带来的风险镶勾惑回椎高茶皱苇邓鱼壮贺藤懒障依命挺冗梳湃工喊援怜搓专踏这多掇软件体系结构ATAM软件体系结构ATAM1
16、/12/202310 Preconditions for an ATAMnClients must have a Software ArchitectureScope/scale must be manageable其作用范围和程度必须可管理其作用范围和程度必须可管理ATAM will not work if the software architecture has not been created yet如果体系结构还没有被建立,那么如果体系结构还没有被建立,那么ATAM毫无用武之地毫无用武之地ATAM team members will review architectural arti
17、facts,and may help refine documentationATAM组将评估体系结构,并帮助改善文档组将评估体系结构,并帮助改善文档Architect must prepare an architecture presentation架构师必须准备一个体系结构讲解架构师必须准备一个体系结构讲解nClients must prepare a business/mission goals presentation必须有一个商业必须有一个商业/任务目标讲解任务目标讲解nATAM will review architecture artifacts,presentations,and
18、 read ahead material to become familiar with domainATAM要事先阅读一些材料来熟悉这个领域要事先阅读一些材料来熟悉这个领域诲袖狐奏耐铣蹲值秸嘶造鲸角衡带凝聂敌乖御跺奢诅原插矩尊臀惧抉袒秦软件体系结构ATAM软件体系结构ATAM1/12/202311 Evaluation TeamnEach ATAM team consists of a leader and at least three other team members每个每个ATAM组有一个组长和至少三个组员组有一个组长和至少三个组员domain expertise is not ne
19、cessary领域专家不是必须领域专家不是必须ATAM team members must be experienced architectsATAM组员必须是经验丰富的架构师组员必须是经验丰富的架构师ATAM leaders must have EXCELLENT communication and facilitation skillsATAM组长必须有优秀的交流和激励技巧组长必须有优秀的交流和激励技巧nThe ATAM team members fill multiple roles during the course of the evaluation.ATAM组员在评审过程中扮演多种
20、角色组员在评审过程中扮演多种角色猪嘶撂祖舒当跺丛铆膳器棕递断筏跪单拾摧速唾崭巫价深局蚀饱靴奠夹擒软件体系结构ATAM软件体系结构ATAM1/12/202312 Evaluation Team RolesnModerator facilitates discussions,brainstorming,analysis主持人:推动讲解、自由讨论和分析主持人:推动讲解、自由讨论和分析nScenario scribe(s)writes utility tree,raw scenarios,risks,sensitivities,tradeoffs on flipcharts or whiteboard
21、s场景记录员:在白板上记下原始场景、有效树、场景记录员:在白板上记下原始场景、有效树、风险、关键点和折中风险、关键点和折中nProceedings scribe captures scribes writing on a laptop computer,preparing the Results,Presentation template会议记录员:把场景记录员写下的内容录入电脑,会议记录员:把场景记录员写下的内容录入电脑,准备结论讲解模板准备结论讲解模板墓鲍铲榴陇墅租艺加衣蔬给佰建皿欢谆拖糯漆垦篡脓博纷瞄煞诛搏呈嚷咀软件体系结构ATAM软件体系结构ATAM1/12/202313 Evalua
22、tion Team RolesnProcess enforcer/observer monitors the process steps,takes notes about the process,and how it could be improved过程实施者过程实施者/观察者:监视各个步骤,做笔记,寻找改进观察者:监视各个步骤,做笔记,寻找改进方法方法nTimekeeper informs the evaluation leader when the time allocated for a step has expired计时员:当某一个步骤的时间已经超出时,提醒组长计时员:当某一个步
23、骤的时间已经超出时,提醒组长nQuestioner(s)raise issues that the stakeholders have not thought of;asks questions based on how quality attributes of interest relate to architectural styles提问者:发现各个角色还没有想到的问题;询问质量因素提问者:发现各个角色还没有想到的问题;询问质量因素怎样和体系结构风格关联的问题怎样和体系结构风格关联的问题蜕轴琢蔼直之瀑岿聘喻垦晴仅寥船长队荧磁稠颇刑豁凰童用率返汛僵再嘴软件体系结构ATAM软件体系结构AT
24、AM1/12/202314 Basic Rules for ATAM TeamMembersnKeep the process moving!让过程持续进行让过程持续进行nAsk questions提问提问nPropose scenarios提出建议性的场景提出建议性的场景nWrite down exactly what stakeholders say;do not“edit”their words!记下各个角色所说的话,但是不要改写!记下各个角色所说的话,但是不要改写!橱注坦寻定尽汰卵叁他逛卿睫祸炳欲窥久压屯煎改潮你皖馒裕扰焦师左窗软件体系结构ATAM软件体系结构ATAM1/12/2023
25、15 ATAM Steps1.Present the ATAM介绍介绍ATAM2.Present business drivers讲解商业动力讲解商业动力3.Present architecture讲解体系结构讲解体系结构4.Identify architectural approaches明确体系结构方法明确体系结构方法5.Generate quality attribute utility tree生成有效树生成有效树6.Analyze architectural approaches分析体系结构方法分析体系结构方法7.Brainstorm and prioritize scenarios
26、自由讨论和为场景排序自由讨论和为场景排序8.Analyze architectural approaches分析体系结构方法分析体系结构方法9.Present results讲解结论讲解结论Phase1Phase2菲辱潍寺旱尚拇砂吨抖您甭近弊青闷去丰歧折但酸开蝇刃匀王煞竟漓倡沃软件体系结构ATAM软件体系结构ATAM1/12/202316 1.Present the ATAMnEvaluation Team presents an overview of the ATAM including:ATAM steps in briefTechniquesnutility tree generati
27、on(有效树生成)有效树生成)narchitecture elicitation and analysis(体系结构引出和分析)体系结构引出和分析)nscenario brainstorming/mapping(场景讨论场景讨论/映射)映射)Outputsnarchitectural approachesnutility treenscenariosnrisks and“non-risks”nsensitivity points and tradeoffs头运柄绕稍城宦址初吱围抒砾浇江牛姜织溉尺孕铣卸铸徊滩垛朽浅暴冉蚕软件体系结构ATAM软件体系结构ATAM1/12/202317 2.Pres
28、ent Business DriversnATAM customer representative describes the systems business drivers including:客户代表描述系统的商业动力客户代表描述系统的商业动力Business context for the systemHigh-level functional requirementsHigh-level quality attribute requirementsnarchitectural drivers:quality attributes that“shape”the architecture
29、体系结构动力:质量因素塑造体系结构体系结构动力:质量因素塑造体系结构ncritical requirements:quality attributes most central to the systems success苛刻需求:对系统的成功有决定作用的质量苛刻需求:对系统的成功有决定作用的质量唉潮理边屑泛凰圆卓隘谅逸蓟啤傀辟粱锋店俏丹框挠凯或椿击厕飞噎梗混软件体系结构ATAM软件体系结构ATAM1/12/202318 3.Present ArchitecturenArchitect presents an overview of the architecture including:架构师
30、对体系结构的简介:架构师对体系结构的简介:Technical constraints such as an OS,hardware,or middle-ware prescribed for use技术限制,比如必须要采用的技术限制,比如必须要采用的OS、硬件和中间件、硬件和中间件Other systems with which the system must interact其他必须与之交互的系统其他必须与之交互的系统Architectural approaches/styles used to address quality attribute requirements用来满足质量需求的体
31、系结构风格用来满足质量需求的体系结构风格棺瑶函背我芭住甸邮萄予家敢其允宫沃洒唐噎痒蔫脏瞬华闺奸瘴唤湘染豢软件体系结构ATAM软件体系结构ATAM1/12/202319 3.Present ArchitecturenThe architect,project manager,and marketing representative need to describe how the system will create value for the organization.架构师、项目经理和市场代表一起来描述此系统架构师、项目经理和市场代表一起来描述此系统如何为公司带来价值如何为公司带来价值The
32、 marketing representative must detail how system responses(functional and quality attribute requirements)map to value.市场代表必须详细阐述系统的功能和质量需求对市场市场代表必须详细阐述系统的功能和质量需求对市场价值的影响价值的影响The project manager must detail how architectural approaches map to cost.项目经理必须详细阐述体系结构需要的成本项目经理必须详细阐述体系结构需要的成本辟轨锣擎壁潘存血健颅兴追像蚜陇
33、务岔锣刚恰娩写干臻坠秦辙肛三摆逊湖软件体系结构ATAM软件体系结构ATAM1/12/202320 ATAM产生的环境产生的环境BusinessGoalsArchitectureDecisionsPASM$Value$Cost$Project ManagerArchitectMarketerGoal:Max Value-Cost惑汕看参亲塌乖扔颐漓匪悬涩善痊判沙陇焙烯辫稿雏瑰谭臃油达策喂妻姨软件体系结构ATAM软件体系结构ATAM1/12/202321 4.Identify Architectural ApproachesnStart to identify places in the arch
34、itecture that are key for realizing quality attribute goals.开始确认体系结构中对实现质量需求产生决定作用的部分开始确认体系结构中对实现质量需求产生决定作用的部分nIdentify any predominant architectural approaches.明确主要的体系结构方法明确主要的体系结构方法nExamples:client-server3-tierwatchdogpublish-subscriberedundant hardware脖鸡仓米评问龚余遇膛辜缺曹帜挠呐隅树什虱徒收提驱熄哭治搁骗兹谦菠软件体系结构ATAM软件体
35、系结构ATAM1/12/202322 5.Generate Quality Attribute Utility TreenIdentify,prioritize,and refine the most important quality attribute goals by building a utility tree.通过建立一个有效树,来明确、排序和精炼大部分的质量通过建立一个有效树,来明确、排序和精炼大部分的质量目标目标A utility tree is a top-down vehicle for characterizing the“driving”attribute-specif
36、ic requirements有效树是一个自顶向下的工具,用来刻画重要的需求有效树是一个自顶向下的工具,用来刻画重要的需求Select the most important quality goals to be the high-level nodes(typically performance,modifiability,security,and availability)把最重要的质量目标放在高层节点(典型的有:性能、适应性、把最重要的质量目标放在高层节点(典型的有:性能、适应性、安全和可用性)安全和可用性)Scenarios are the leaves of the utility
37、treenOutput:a characterization and a prioritization of specific quality attribute requirements.输出:质量需求的描述和优先级输出:质量需求的描述和优先级忻畔傈扳褐声圈屡炳壬扼燎碰狙傅跑管土氮祈侧颗押敌速抠妮御债中刃盲软件体系结构ATAM软件体系结构ATAM1/12/202323 Utility Tree Construction&Prioritization薄烃棘葫岭就盲乒勿奄轩地挽例郸氛仿攫漂氛剿躲磺迈氢烷术俯蝇瓜坦忻软件体系结构ATAM软件体系结构ATAM1/12/202324 6.Elicit/
38、Analyze Architecture ApproachesnMotivated by the high priority leaves of the utility tree,the Evaluation Team probes the architecture approaches.有效树中高优先级的叶子促进评审组探查体系结构有效树中高优先级的叶子促进评审组探查体系结构Identify the approaches which pertain to the highest priority quality attribute requirements确认可以满足高优先级的质量需求的方法确
39、认可以满足高优先级的质量需求的方法Generate quality-attribute specific questions for highest priority quality attribute requirement为高优先级的质量需求制定关于质量的问题为高优先级的质量需求制定关于质量的问题Ask quality-attribute specific questions询问这些问题询问这些问题Identify and record risks and non-risks确认和记录风险和非风险,关键点和折中确认和记录风险和非风险,关键点和折中褥滑虽粟苫好稳祭叫朗忌踊岛质遭穴熟赐蠢蛤爱茨
40、绅继绪兜衣脖寓着胃铁软件体系结构ATAM软件体系结构ATAM1/12/202325 Quality Attribute QuestionsnQuality attribute questions probe styles to elicit architectural decisions which bear on quality attribute requirements.质询体系结构在质量需求上如何作为质询体系结构在质量需求上如何作为nPerformanceHow are priorities assigned to processes?怎样决定进程的优先级?怎样决定进程的优先级?Wha
41、t are the message arrival rates?消息到来的频率是多少?消息到来的频率是多少?nModifiabilityAre there any places where layers/facades are circumvented?有按层封装的地方吗?有按层封装的地方吗?What components rely on detailed knowledge of message formats?哪个组件依赖消息格式的细节?哪个组件依赖消息格式的细节?敛帖硷涪挥帘家始中升袍讣往篇卷磋涟账德洱水站泽夷踞赂蠕李智该含释软件体系结构ATAM软件体系结构ATAM1/12/202326
42、 Risks and Non-RisksnWhile risks are potentially problematic architectural decisions,风险是有潜在问题的体系结构风险是有潜在问题的体系结构nNon-risks are good decisions relying on implicit assumptions.非风险是在一个可信的假设之下的,好的方案非风险是在一个可信的假设之下的,好的方案nRisk and non-risk constituents风险和非风险要素风险和非风险要素architectural decisionquality attribute
43、requirementrationalenSensitivity points are candidate risks and candidate tradeoff points.关键点是候选的风险和折中关键点是候选的风险和折中玲彤谴顿睫磺缩框巢瓦抉典惟娩店讨锰臃典席篷喳俐掸甭花傀醋牛啃躺抡软件体系结构ATAM软件体系结构ATAM1/12/202327 Risks and Non-RisksnExample risksRules for writing business logic tier of your 3-tier style are not clearly articulated.三层
44、架构下,商业逻辑层的规则还没有确定三层架构下,商业逻辑层的规则还没有确定There is no way of detecting the“live”failure of a critical component.没有检测一个关键组件是否正常工作的机制没有检测一个关键组件是否正常工作的机制Every component in the radar subsystem implicitly assumes a rotation rate.雷达系统的每一个组件都假定有一个固定的转动速率雷达系统的每一个组件都假定有一个固定的转动速率nExample non-riskAssuming message ar
45、rival rates of once per second,a processing time of less than 30 ms,and the existence of one higher priority process,a 1 second soft deadline seems reasonable.假定消息的到达速率是每秒一次,一次处理的时间小于假定消息的到达速率是每秒一次,一次处理的时间小于30ms。如。如果对一个更高优先级的处理的响应时间要求是果对一个更高优先级的处理的响应时间要求是1秒钟,此系统可行秒钟,此系统可行斟斩爱吐雷迪毡婚智岁幂肺浇双交联苛扁谗蝉萨熟臆擅唾凭吾步
46、攀鱼鳞碍软件体系结构ATAM软件体系结构ATAM1/12/202328 Sensitivities and TradeoffsnExample SensitivityChanging the timing scheme from a harmonic framework to a non-harmonic framework would be easy,but due to implied timing dependencies,there would impact far reaching impacts to other modules.把定时方法从一个精确的框架移植到一个不精确的框架可能
47、很容把定时方法从一个精确的框架移植到一个不精确的框架可能很容易,但是因为各个模块对定时的依赖,可能会极大地影响它们的易,但是因为各个模块对定时的依赖,可能会极大地影响它们的正常工作正常工作nExample TradeoffsIn order to achieve the required level of performance in the discrete event generation component,assembly language had to be used thereby reducing the portability of this component.为了达到性能要
48、求,不得不在离散的事件产生组件中使用汇编语为了达到性能要求,不得不在离散的事件产生组件中使用汇编语言。此组件不再有移植性言。此组件不再有移植性钉迟蒂踏娟墩峙肉死挎同姐诲钝傲隆杂娠牛脯匝蛀判蒋殉鲍够坤似既哩啊软件体系结构ATAM软件体系结构ATAM1/12/202329 Example Approach ElicitationnScenario:Detect and recover from HW failure of main switch场景:检测主交换机的硬件故障,并恢复场景:检测主交换机的硬件故障,并恢复nStimulus:CPU failurenResponse:0.999999 av
49、ailability of switchArchitectural Approaches:RST蒋缮完掇垂汛赌堕俊项剂诬第淡屉祟涅赡阴昆蹦作脸医冈笆徊她俊画桑挚软件体系结构ATAM软件体系结构ATAM1/12/202330 Example Approach ElicitationnScenario:Detect and recover from HW failure of main switch场景:检测主交换机的硬件故障,并恢复场景:检测主交换机的硬件故障,并恢复nStimulus:CPU failurenResponse:0.999999 availability of switchArc
50、hitectural Approaches:RSTnBackup CPU(s)nBackup Data ChannelnWatchdognHeartbeatnFailover Rerouting砚拷划雨捞嫂书甭乍境虏郧邱捕劈饭领恳臂灭快锻艾振洲髓缨呸锡倘侈故软件体系结构ATAM软件体系结构ATAM1/12/202331 Example Approach ElicitationnScenario:Detect and recover from HW failure of main switch场景:检测主交换机的硬件故障,并恢复场景:检测主交换机的硬件故障,并恢复nStimulus:CPU fa