软件体系结构ATAM.ppt

上传人:本田雅阁 文档编号:2601964 上传时间:2019-04-16 格式:PPT 页数:62 大小:280.51KB
返回 下载 相关 举报
软件体系结构ATAM.ppt_第1页
第1页 / 共62页
软件体系结构ATAM.ppt_第2页
第2页 / 共62页
软件体系结构ATAM.ppt_第3页
第3页 / 共62页
软件体系结构ATAM.ppt_第4页
第4页 / 共62页
软件体系结构ATAM.ppt_第5页
第5页 / 共62页
点击查看更多>>
资源描述

《软件体系结构ATAM.ppt》由会员分享,可在线阅读,更多相关《软件体系结构ATAM.ppt(62页珍藏版)》请在三一文库上搜索。

1、软件体系结构 ATAM,孙志岗 , ,2,2019/4/16,Architecture Tradeoff Analysis Methodsm (ATAMsm),SMATAM and Architecture Tradeoff Analysis Method are registered service marks of Carnegie Mellon University, ,3,2019/4/16,Role of a Software Architecture,If the only criterion for software was to get the right answer, we

2、 would not need architectures. 如果评判软件的唯一标准是正确,那么就不需要体系结构 Unstructured, monolithic systems would suffice. 无结构的、单模块的系统已经足够。 But other things also matter, such as: 但事实上还有很多其他问题,比如: modifiability time of development performance coordination of work teams These issues are often addressed in the Software

3、Architecture 这些问题通常体现在软件体系结构当中, ,4,2019/4/16,Why Analyze Software Architectures?,All 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 提高一个质量,经常会降低另一个

4、质量 A software 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 选择很容易做,但是一旦系统已经实现,就很难更改, ,5,2019/4/16,The ATAM,The

5、 purpose of the ATAM: is to assess the consequences of architectural decisions in light of quality attribute requirements. ATAM的目标是:按照质量需求,评价体系结构设计, ,6,2019/4/16,Context for the ATAM,Business Goals,Architecture Decisions,P,A,S,M,$ Value $,$ Cost $, ,7,2019/4/16,Purpose of ATAM,We need a method in wh

6、ich the right questions are asked early to 我们需要一个新方法,让我们能尽早提出正确问题,来: Discover risks - alternatives that might create future problems in some quality attribute 发现风险:可能在将来产生质量问题的方案 Discover non-risks - decisions that promote qualities that help realize business/mission goals 发现非风险:可以提高质量的决策 Discover s

7、ensitivity points - alternatives for which a slight change makes a significant difference in some quality attribute 发现关键点:方案中一个小小的变化,就可能让质量完全大变样 Discover tradeoffs - decisions affecting more than one quality attribute 发现折中:影响一个以上质量的决策, ,8,2019/4/16,Purpose of ATAM,The purpose of an ATAM is NOT to pr

8、ovide precise analyses, but to discover risks created by architectural decisions. ATAM的目标不是做精确的分析,而是发现体系结构可能带来的风险 We want to find trends: correlation between architectural decisions and predictions of system properties. 我们要发现一些趋势:从体系结构方案预言系统的特性 Discovered risks can then be made the focus of mitigati

9、on activities: e.g. further design, further analysis, prototyping. 发现风险,然后做进一步的分析、设计 Surfaced tradeoffs can be explicitly identified and documented. 明显的折中可以被清晰地指出并写入文档, ,9,2019/4/16,ATAM Benefits,There are a number of benefits from performing ATAM analyses: 做ATAM分析可以得到下列益处: Clarified quality attribu

10、te requirements 明确质量需求 Improved architecture documentation 提高体系结构文档质量 Documented basis for architectural decisions 文档化了的体系结构方案原理 Identified risks early in the life-cycle 及早发现风险 Increased communication among stakeholders 促进了角色之间的交流 The results are improved architectures. 结果是,体系结构得到改进, ,10,2019/4/16,P

11、urpose of ATAM,The purpose of ATAM is to assess the consequences of architectural decisions in light of quality attribute requirements. ATAM的目标就是按照质量需求,评价体系结构设计 The ATAM process is a short, facilitated interaction between multiple stakeholders, leading to the identification of risks, sensitivities,

12、and tradeoffs. ATAM过程是角色之间交流的一个方便、快捷的手段,便于发现风险、关键点和折中 The purpose of an ATAM is NOT to provide precise analyses, the purpose IS to discover risks created by architectural decisions. ATAM的目标不是提供精确的分析,而是发现体系结构方案可能带来的风险, ,11,2019/4/16,Preconditions for an ATAM,Clients must have a Software Architecture

13、Scope/scale must be manageable 其作用范围和程度必须可管理 ATAM will not work if the software architecture has not been created yet 如果体系结构还没有被建立,那么ATAM毫无用武之地 ATAM team members will review architectural artifacts, and may help refine documentation ATAM组将评估体系结构,并帮助改善文档 Architect must prepare an architecture present

14、ation 架构师必须准备一个体系结构讲解 Clients must prepare a business/mission goals presentation 必须有一个商业/任务目标讲解 ATAM will review architecture artifacts, presentations, and read ahead material to become familiar with domain ATAM要事先阅读一些材料来熟悉这个领域, ,12,2019/4/16,Evaluation Team,Each ATAM team consists of a leader and a

15、t least three other team members 每个ATAM组有一个组长和至少三个组员 domain expertise is not necessary 领域专家不是必须 ATAM team members must be experienced architects ATAM组员必须是经验丰富的架构师 ATAM leaders must have EXCELLENT communication and facilitation skills ATAM组长必须有优秀的交流和激励技巧 The ATAM team members fill multiple roles duri

16、ng the course of the evaluation. ATAM组员在评审过程中扮演多种角色, ,13,2019/4/16,Evaluation Team Roles,Moderator facilitates discussions, brainstorming, analysis 主持人:推动讲解、自由讨论和分析 Scenario scribe(s) writes utility tree, raw scenarios, risks, sensitivities, tradeoffs on flipcharts or whiteboards 场景记录员:在白板上记下原始场景、有效

17、树、风险、关键点和折中 Proceedings scribe captures scribes writing on a laptop computer, preparing the Results, Presentation template 会议记录员:把场景记录员写下的内容录入电脑,准备结论讲解模板, ,14,2019/4/16,Evaluation Team Roles,Process enforcer/observer monitors the process steps, takes notes about the process, and how it could be impr

18、oved 过程实施者/观察者:监视各个步骤,做笔记,寻找改进方法 Timekeeper informs the evaluation leader when the time allocated for a step has expired 计时员:当某一个步骤的时间已经超出时,提醒组长 Questioner(s) raise issues that the stakeholders have not thought of; asks questions based on how quality attributes of interest relate to architectural st

19、yles 提问者:发现各个角色还没有想到的问题;询问质量因素怎样和体系结构风格关联的问题, ,15,2019/4/16,Basic Rules for ATAM Team Members,Keep the process moving! 让过程持续进行 Ask questions 提问 Propose scenarios 提出建议性的场景 Write down exactly what stakeholders say; do not “edit” their words! 记下各个角色所说的话,但是不要改写!, ,16,2019/4/16,ATAM Steps,Present the ATA

20、M 介绍ATAM Present business drivers 讲解商业动力 Present architecture 讲解体系结构 Identify architectural approaches 明确体系结构方法 Generate quality attribute utility tree 生成有效树 Analyze architectural approaches 分析体系结构方法 Brainstorm and prioritize scenarios 自由讨论和为场景排序 Analyze architectural approaches 分析体系结构方法 Present res

21、ults 讲解结论,Phase1,Phase2, ,17,2019/4/16,1. Present the ATAM,Evaluation Team presents an overview of the ATAM including: ATAM steps in brief Techniques utility tree generation(有效树生成) architecture elicitation and analysis(体系结构引出和分析) scenario brainstorming/mapping(场景讨论/映射) Outputs architectural approach

22、es utility tree scenarios risks and “non-risks” sensitivity points and tradeoffs, ,18,2019/4/16,2. Present Business Drivers,ATAM customer representative describes the systems business drivers including: 客户代表描述系统的商业动力 Business context for the system High-level functional requirements High-level quali

23、ty attribute requirements architectural drivers: quality attributes that “shape” the architecture 体系结构动力:质量因素塑造体系结构 critical requirements: quality attributes most central to the systems success 苛刻需求:对系统的成功有决定作用的质量, ,19,2019/4/16,3. Present Architecture,Architect presents an overview of the architect

24、ure including: 架构师对体系结构的简介: 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 用来满足质量需求的体系结构风格, ,20,2019/4

25、/16,3. Present Architecture,The architect, project manager, and marketing representative need to describe how the system will create value for the organization. 架构师、项目经理和市场代表一起来描述此系统如何为公司带来价值 The marketing representative must detail how system responses (functional and quality attribute requirements

26、) map to value. 市场代表必须详细阐述系统的功能和质量需求对市场价值的影响 The project manager must detail how architectural approaches map to cost. 项目经理必须详细阐述体系结构需要的成本, ,21,2019/4/16,ATAM产生的环境,Business Goals,Architecture Decisions,P,A,S,M,$ Value $,$ Cost $,Project Manager,Architect,Marketer,Goal:Max Value - Cost, ,22,2019/4/16

27、,4. Identify Architectural Approaches,Start to identify places in the architecture that are key for realizing quality attribute goals. 开始确认体系结构中对实现质量需求产生决定作用的部分 Identify any predominant architectural approaches. 明确主要的体系结构方法 Examples: client-server 3-tier watchdog publish-subscribe redundant hardware

28、, ,23,2019/4/16,5. Generate Quality Attribute Utility Tree,Identify, 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-specific requirements 有效树是一个自

29、顶向下的工具,用来刻画重要的需求 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 tree Output: a characterization and a prioritization of specific quality

30、attribute requirements. 输出:质量需求的描述和优先级, ,24,2019/4/16,Utility Tree Construction & Prioritization, ,25,2019/4/16,6. Elicit/Analyze Architecture Approaches,Motivated by the high priority leaves of the utility tree, the Evaluation Team probes the architecture approaches. 有效树中高优先级的叶子促进评审组探查体系结构 Identify

31、 the approaches which pertain to the highest priority quality attribute requirements 确认可以满足高优先级的质量需求的方法 Generate quality-attribute specific questions for highest priority quality attribute requirement 为高优先级的质量需求制定关于质量的问题 Ask quality-attribute specific questions 询问这些问题 Identify and record risks and n

32、on-risks 确认和记录风险和非风险,关键点和折中, ,26,2019/4/16,Quality Attribute Questions,Quality attribute questions probe styles to elicit architectural decisions which bear on quality attribute requirements. 质询体系结构在质量需求上如何作为 Performance How are priorities assigned to processes? 怎样决定进程的优先级? What are the message arri

33、val rates? 消息到来的频率是多少? Modifiability Are there any places where layers/facades are circumvented ? 有按层封装的地方吗? What components rely on detailed knowledge of message formats? 哪个组件依赖消息格式的细节?, ,27,2019/4/16,Risks and Non-Risks,While risks are potentially problematic architectural decisions, 风险是有潜在问题的体系结构

34、 Non-risks are good decisions relying on implicit assumptions. 非风险是在一个可信的假设之下的,好的方案 Risk and non-risk constituents 风险和非风险要素 architectural decision quality attribute requirement rationale Sensitivity points are candidate risks and candidate tradeoff points. 关键点是候选的风险和折中, ,28,2019/4/16,Risks and Non-R

35、isks,Example risks Rules for writing business logic tier of your 3-tier style are not clearly articulated. 三层架构下,商业逻辑层的规则还没有确定 There is no way of detecting the “live” failure of a critical component. 没有检测一个关键组件是否正常工作的机制 Every component in the radar subsystem implicitly assumes a rotation rate. 雷达系统的

36、每一个组件都假定有一个固定的转动速率 Example non-risk Assuming message arrival 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秒钟,此系统可行, ,29,2019/4/16,Sensiti

37、vities and Tradeoffs,Example Sensitivity Changing 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. 把定时方法从一个精确的框架移植到一个不精确的框架可能很容易,但是因为各个模块对定时的依赖,可能会极大地影响它们的正常工作 Exam

38、ple Tradeoffs In 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. 为了达到性能要求,不得不在离散的事件产生组件中使用汇编语言。此组件不再有移植性, ,30,2019/4/16,Example Approach Elicitation,Scenario: Detect an

39、d recover from HW failure of main switch 场景:检测主交换机的硬件故障,并恢复 Stimulus: CPU failure Response: 0.999999 availability of switch, ,31,2019/4/16,Example Approach Elicitation,Scenario: Detect and recover from HW failure of main switch 场景:检测主交换机的硬件故障,并恢复 Stimulus: CPU failure Response: 0.999999 availability

40、 of switch, ,32,2019/4/16,Example Approach Elicitation,Scenario: Detect and recover from HW failure of main switch 场景:检测主交换机的硬件故障,并恢复 Stimulus: CPU failure Response: 0.999999 availability of switch, ,33,2019/4/16,Example Approach Elicitation,Analysis: ensures no common mode failure by using differen

41、t HW and OS 通过使用不同的硬件和操作系统确保不会有一样的错误发生 worst-case rollover is accomplished in 3 seconds 在最坏的情况下,只要3秒钟内回卷成功就可以 guaranteed to detect failure with 1 second 保证错误在1秒钟内被检测到 watchdog is simple and proven reliable 看门狗很简单,而且被证明可信赖, ,34,2019/4/16,7a. Brainstorm Scenarios,Scenarios are example stimuli used to

42、Represent stakeholders interests 说明角色关心的内容 Understand quality attribute requirements Scenarios are specific 场景是对系统的 anticipated uses of (use case scenarios), 预期使用(用例场景), anticipated changes to (growth scenarios), or 预期改变(演化场景),或者 unanticipated stresses to (exploratory scenarios) 非预期的重压(试探场景) the sys

43、tem. A good scenario makes clear what the stimulus is that causes it and what responses are of interest. 一个好的场景可以清晰地描述出是什么引起这个场景,以及需要什么样的应答, ,35,2019/4/16,Example Scenarios,Use case scenario Remote user requests a database report via the Web during peak period and receives it within 5 seconds. 远程用户通

44、过web周期地请求数据库报告,并且要求5秒钟内收到 Growth scenario Add a new data server to reduce latency in scenario 1 to 2.5 seconds within 1 person-week. 用一人周的时间增加一个数据服务器,使上一个场景的潜伏期降低到2.5秒 Exploratory scenario Half of the servers go down during normal operation without affecting overall system availability. 在做日常操作时,一半的服

45、务器当机,却不影响整个系统的可用性 Scenarios should be as specific as possible. 场景应该尽可能的详细, ,36,2019/4/16,起因(Stimuli),环境(Environment),结果(Responses),用例场景 远程用户通过web周期地请求数据库报告,并且要求5秒钟内收到 演化场景 用一人周的时间增加一个数据服务器使上一个场景的潜伏期降低到2.5秒 试探场景 在做日常操作时,一半的服务器当机,却不影响整个系统的可用性, ,37,2019/4/16,7b. Prioritize Scenarios,Stakeholders have b

46、rainstormed a large set of scenarios. 各个角色已经讨论出很多很多场景 Each stakeholder is allocated a number of votes roughly equal to 0.3 x #scenarios 每个角色分给一个数用来投票,其值大约为(0.3 x 场景数) Prioritized scenarios are compared with the utility tree and differences are reconciled. 排好次序的场景和有效树进行比较。如果有不同的,则要再次考量,达成一致, ,38,2019

47、/4/16,8. Analyze Architectural Approaches,Identify the architectural approaches impacted by the scenarios generated in the previous step. 确定被上一步产生的场景影响的体系结构设计 This step continues the analysis started in step 6 using the new scenarios. 用第6步同样的方法来分析新的场景 Continue identifying risks and non-risks. 继续确认风险和非风险 Continue annotating architectural information. 继续标注体系结构信息, ,39,2019/4/16,9. Present Results,Recapitulate steps of the ATAM 总结所有ATAM的步骤 Present ATAM outputs architectural approaches utility tree scenarios risks and “non-risks” sensitivity points and tradeoffs Offer recommendations 推荐, s

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 其他


经营许可证编号:宁ICP备18001539号-1