软件体系结构体系结构评审ArchitecturalReviews.ppt

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

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

1、软件体系结构 体系结构评审 Architectural Reviews,孙志岗 , ,2,2019/8/1,Architectural Reviews,Architectural reviews are a key step in architecture-based development. They include a method (such as SAAM or ATAM), but the full practice includes more than that. 体系结构评审是开发过程中的一个重要环节。有专门的评审方法(SAAM、ATAM),但在实践中并不仅仅是这些 We wil

2、l discuss cost/benefits of architectural reviews different architectural review techniques preconditions for an architectural review architectural review activities outputs from an architectural review, ,3,2019/8/1,Costs of Architectural Reviews,There are three different types of costs of holding re

3、gular architectural reviews. direct staff costs 直接员工开销 organizational overhead 组织管理开销 indirect staff costs 间接员工开销, ,4,2019/8/1,Examples of Direct Staff Costs,AT&T 300 full-scale reviews done on projects of 700 staff-days or longer 全面评审了300个项目,每个项目的开发时间都是700人日以上 average cost per review: 70 staff days

4、 每次评审的平均开销:70人日 Rational Software 30 reviews done on projects with at least 500 KSLOC each 评审了30个项目,每个项目最少500 KSLOC average cost per review: $50,000 评审平均花费:$50,000, ,5,2019/8/1,Examples of Direct Staff Costs,SAAM evaluations 12 reviews done on projects ranging from 100 KSLOC to 1,000 KSLOC 12次评审,项目规

5、模从100 KSLOC到1,000 KSLOC average cost per review: 14 to 20 staff-days 平均花费:14到20人日 ATAM evaluations 12 reviews done on projects ranging from 250 KSLOC to 2,500 KSLOC 12次评审,项目规模从250 KSLOC到2,500 KSLOC average cost per review: 40 to 70 staff days 平均花费:40到70人日, ,6,2019/8/1,Example of Organizational Overh

6、ead,Costs of establishing a corporate review unit 建立评审组的开销 management overhead communication expenses staffing the unit 给评审组配备人手 relocating personnel to a central location training, ,7,2019/8/1,Example of Indirect Staff Costs,Using senior designers for evaluations instead of designing 让高级设计人员参与评审而不是

7、设计 loss of productivity (due to reassignment of superior designers) 生产力的下降(高级设计师被委派新任务) time spent training staff in review techniques 培训员工评审技术的时间消耗, ,8,2019/8/1,Benefits of Architectural Reviews,Five different types of benefits result from holding architectural reviews. financial forces preparation

8、 for review 为评审做准备也是一种推动力 early detection of problems 尽早地发现问题 validation of requirements 确认需求 improved architectures 提高体系结构质量, ,9,2019/8/1,Financial Benefits of Reviews,AT&T estimated that each reviewed project saves 10% of total cost as a result of the review. Thus, a 70-staff-day review of project

9、s of 700 staff-days pays for itself. AT&T估算,每个被评审的项目节省10%的成本 Consultants who perform architecture evaluations report 80% repeat business. 参与评审的顾问报告了80%的重复项目, ,10,2019/8/1,Forces Preparation for Review,Documentation/specifications must be provided, hence they must exist or be created. 文档和说明书必须存在 Some

10、 reviews use standard questions, and the architect can prepare ahead to ensure that the architecture scores well. 评审有一些标准问题。体系结构师可以事先准备,确保这个体系结构可能得高分 Reviews make the criteria for evaluation explicit by prioritizing requirements or quality goals. 通过排定需求和质量目标的顺序,评审使评估的标准变得清晰, ,11,2019/8/1,Early Detec

11、tion of Problems,The problems that can be found by an architectural level inspection include 在体系结构层进行检查可以发现的问题 unreasonable requirements performance problems problems associated with potential future modifications 与未来的修改有关的问题 The earlier in the life cycle that problems are found, the easier it is to

12、 fix them., ,12,2019/8/1,Validation of Requirements,Reviews put stakeholders in the same room with each other, often for the first time. 评审使各种角色坐在同一个房间内。通常,这是第一次 uncovers conflicts and tradeoffs 解开冲突和寻找折中 provides a forum for negotiated resolution of problems 提供了一个论坛,来磋商问题的解决办法 It often results in t

13、he generation of new requirements or the clarification of existing requirements. 结果通常会是产生新的需求和净化已有的需求, ,13,2019/8/1,Improved Architectures,Development organizations anticipate types of questions raised at reviews and 开发者预期在评审时会被发现的问题,然后 design architectures with questions in mind 在设计时,问题会时刻围绕脑海 prep

14、are documentation of the type needed at review 准备评审时需要的文档 give explicit consideration to qualities to be reviewed 对将被评审的质量因素进行更深入的考虑, ,14,2019/8/1,Review Techniques,There are a variety of techniques for performing architectural reviews; each has a different cost and provides different information. 有

15、很多种评审技术。每种需要不同的开销,提供不同的信息 These techniques fall into one of two categories. questioning techniques: applied to evaluate any aspect of an architecture for any given reason 提问技术:用来评价体系结构的任何方面 measuring techniques: applied to answer questions about a specific quality 度量技术:回答关于某项质量的问题, ,15,2019/8/1,Ques

16、tioning Techniques,Scenario-based techniques describes a specific interaction between stakeholders and a system 描述角色与系统交互的过程 example: SAAM, ATAM (partially) Questionnaire-based techniques(基于问卷的技术) Some questions apply to all architectures (especially those in a single domain). 有些问题被用于所有的体系结构,尤其是在单一领

17、域内 Some questions ask about details of a specific architecture. 有些问题询问一个特定结构的细节 Some ask about the development process. “Is there a single architect?” “How do you ensure conformance?” “你们怎样保证一致性?”, ,16,2019/8/1,Questioning Techniques,Questionnaires are reused; they reflect more maturity or experienc

18、e within a domain. 问卷可以重用;它们体现了在一个领域内的成熟度和经验是否丰富 Scenarios must be developed anew for each system. 场景必须为每个系统重新开发, ,17,2019/8/1,Measuring Techniques,Metrics: quantitative interpretations of observable measures 量度:可测质量的定量说明 complexity metrics identify areas where modifications may be difficult 复杂度的测量指

19、明在哪个区域修改会很困难 performance metrics suggest areas where bottlenecks may occur 性能的测量提示瓶颈会在哪里发生 Reviews tend to focus on results of metrics 度量的结果 assumptions underlying the interpretation of the metrics (e.g., assumed event distribution) 对度量的解释中的潜在假定, ,18,2019/8/1,Measuring Techniques,Simulations, protot

20、ypes, experiments: domain specific models of an architecture or performance model 仿真、原型、实验:建立体系模型或者性能模型 are expensive to create often exist as part of development anyway May answer issues raised by questioning technique 可以回答提问技术提出的问题 “What evidence do you have that performance is adequate?” “你凭什么说可以

21、达到这个性能?”, ,19,2019/8/1,Properties of Review Techniques, ,20,2019/8/1,Review Process,An architectural review has three major elements. preconditions: the set of necessary assets and conditions that must be in place before a review can be performed successfully 前提:评审成功进行之前,必要的资源和条件必须到位 activities of t

22、he review itself 活动:评审本身 outputs: the report of review results 输出:评审结果报告, ,21,2019/8/1,Review Preconditions,Understand the context of the review 理解评审的上下文 Assemble the right people 集合正确的人 Set organizational expectations and support 期望和支持 Prepare for review 为评审做准备 Obtain representation of the architec

23、ture 获得体系结构文档, ,22,2019/8/1,Preconditions: Context,Planned review part of normal development activity 正常开发活动的一部分 non-adversarial(非敌对性的) scheduled well in advance(事先安排好日程) built into projects schedule and budget 包含在项目日程和预算之内 Unplanned usually occurs when project is in trouble 通常在项目出现问题时采用 often devol

24、ves into finger-pointing 导致互相责备 can be painful for project already struggling 对于已经苦苦挣扎了很久的项目而言,有些痛苦, ,23,2019/8/1,Preconditions: Context,Timing of the review early “architecture discovery review” is done after requirements are set, but before the architecture is firm 需求分析之后,体系结构还没有确定之前进行 is used to

25、understand implications of requirements on architecture 用来理解需求在体系结构方面的隐含内容 checks for requirements feasibility(检查需求的可行性) prioritizes architectural goals(为质量目标排序) full architectural review is done when architectural documentation is available 体系结构文档可用时进行 is used to evaluate qualities of proposed arch

26、itecture 评价被评体系结构的质量, ,24,2019/8/1,Preconditions: People,Representatives of project(项目代表) architect designers of major modules stakeholders representatives Review team members (ideally, a separate unit) 评审团成员(理想情况下是一个独立组织) at least one domain expert included 至少有一个领域专家 someone to handle logistics (e.

27、g., meeting rooms, supplies) 后勤人员(会议室、茶水、食品) librarian to organize documentation 文档管理员 “apprentice reviewer” for growth 成长中的评审员学徒, ,25,2019/8/1,Preconditions: Review Team,The review team must be assembled so that members are perceived as impartial, objective, and respected 成员要公正、客观和被尊重 members devot

28、e their full-time effort to the review 成员全心加入评审 members are fluent in architecture and architectural issues 成员要训练有素而且口才好 it is located close to artifacts being examined 有足够的权限检查被评审材料, ,26,2019/8/1,Preconditions: Review Team,The team must have access to applicable domain knowledge (perhaps via consul

29、tants to the team) 适当的领域知识 design documents 设计文档 review criteria 评审标准 support staff 支持人员, ,27,2019/8/1,Preconditions: Organizational Expectations,A contract between the review team and the sponsor of the review must be established. Who will be told what upon completion? 结束后,哪些内容可以被告诉哪些人 What will (n

30、ot) be the review criteria? 什么是(不是)评审标准? What/who will be made available to team? 哪些人和物是评审团可以使用的? What follow-up is expected? 希望评审的结果如何? How long will the review take? 要评审多久?, ,28,2019/8/1,Preconditions: Organizational Expectations,Organizational culture and support must be considered. Are reviews p

31、art of the standard project life cycle? 评审是项目的基本生命周期的一部分吗? Is serving on a review team considered good for ones career? 为评审团服务是份好差事吗? Will the organization allow its superior designers time off from their projects to serve on review teams? 企业允许它的高级设计师把他的项目放在一边来参加评审吗? Is there a standing review organ

32、ization (even though members may rotate on and off)? 有常设的评审组织吗(即便成员常进进出出)?, ,29,2019/8/1,Preconditions: Read-Ahead Material,For project being reviewed questionnaires scenarios (These are created as part of the review, but time should be allowed for project members to digest the information.) For rev

33、iew team description of architecture rationale for architecture Ideally, material will address the review questions. (Passing this test because the questions were known in advance is not cheating, but good engineering!) 理想情况,材料要能说明评审时的问题, ,30,2019/8/1,Preconditions: Ranked Quality and Behavioral Req

34、uirements,Plan to examine three to five quality and behavioral requirements. 计划检查3到5个质量和行为需求 A particular representation medium (language) for the architecture is not necessary. As long as the information can be extracted (using project members as necessary), the form of the representation is not im

35、portant. 一个专门的体系结构表述媒体(语言)目前并不是必须的。由项目成员来讲解信息,表述的形式并不重要, ,31,2019/8/1,Review Activities,Evaluate “Run” the scenarios and ask the questions, or answer the items in the checklist. 按场景执行,并询问相关问题;或者回答问卷里的问题 Perform the experiments.(演示实验) Execute the prototypes or simulations. 运行原型或仿真程序 Record critical i

36、ssues highlighted in the review 评审中发现的严重问题 comments of project members on these issues 项目成员对这些问题的说明, ,32,2019/8/1,Review Activities,Rank the issues project-threatening(生死攸关) major minor Each issue raised should be addressed in terms of changing the architecture relaxing the requirements, ,33,2019/8/

37、1,Review Activities,Warning signs architecture forced to match organization 组织模式影响体系结构 top-level components number over 25 顶层组件数超过25个 one requirement drives entire design 一项需求决定整个设计 architecture depends on alternatives in the operating system 体系受操作系统选择的影响, ,34,2019/8/1,Review Activities,Warning sign

38、s choice of software components is dictated by hardware personnel 由硬件人员选择软件组件 redundancy not needed for reliability 面对可靠性时,不考虑冗余手段 design is exception driven 零散的小的事件影响设计 no identifiable architect 没有确定的架构师, ,35,2019/8/1,Output from Review,Set of ranked issues supporting data contained in formal repor

39、t feedback to project Enhanced system documentation 增强的系统文档 Set of scenarios for future use 将来会用到的场景集 Identification of potentially reusable components 认定潜在的可重用组件 Estimation of costs and benefits 估算成本和收益, ,36,2019/8/1,SAAM: Software Architecture Analysis Method 一种简单的基于场景的评审技术, ,37,2019/8/1,Qualities

40、 Are Too Vague for Analysis,Is the following system modifiable? 这个系统具有适应性吗? Background color of the user interface is changed merely by modifying a resource file. 通过修改资源文件,可以改变界面的背景色 Dozens of components must be changed to accommodate a new data file format. 必须修改许多组件才能适应新的文件格式 A reasonable answer is

41、 一个合理的答案: yes with respect to changing background color 有,从改变背景色的角度来看 no with respect to changing file format 没有,从改变文件格式的角度来看, ,38,2019/8/1,Qualities Are Too Vague for Analysis,Qualities only have meaning within a context. 质量因素只在一定的上下文里才有意义 SAAM specifies context through scenarios. SAAM通过场景指定上下文, ,3

42、9,2019/8/1,Scenarios,A scenario is a brief description of a stakeholders interaction with a system. 场景就是一个角色与系统交互过程的简单描述 When creating scenarios, it is important to consider all stakeholders. 建立场景的时候,一定要考虑到所有的角色 Customer、User、Developer、Maintainer、Attacker The scenarios that are of most interest in a

43、 SAAM evaluation are change scenarios. SAAM最关心的是变化场景, ,40,2019/8/1,Steps of a SAAM Evaluation,Identify and assemble stakeholders 确认和召集角色 Develop and prioritize scenarios 制定场景,并排好优先级 Describe candidate architecture(s) 描述候选的体系结构 Classify scenarios as direct or indirect 把场景分类为直接场景和间接场景 Perform scenario

44、 evaluation 进行场景评估 Reveal scenario interactions 展现场景间的相互影响 Generate overall evaluation 整体评估, ,41,2019/8/1,Step 1: Identify and Assemble Stakeholders, ,42,2019/8/1,Step 1: Identify and Assemble Stakeholders, ,43,2019/8/1,Step 1: Identify and Assemble Stakeholders, ,44,2019/8/1,Step 2: Stakeholders De

45、velop and Prioritize Scenarios,Scenarios should be typical of the kinds of evolution that the system must support: 场景应该是系统必须支持的各种演化的典型: functionality development activities change activities Scenarios should represent tasks relevant to all stakeholders. 所有角色都应该能在场景中体现出来 Rule of thumb: 10-15 prioriti

46、zed scenarios 应该有10-15个优先的场景, ,45,2019/8/1,Step 3: Describe Candidate Architectures,It is frequently necessary to elicit appropriate architectural descriptions. 通常,对体系结构进行适当的描述是非常重要的 Structures chosen to describe the architecture will depend on the type of qualities to be evaluated. 以我们需要的质量为依据,选择用来

47、描述体系结构的结构, ,46,2019/8/1,Step 4: Classify Scenarios,There are two classes of scenarios. Direct scenarios are those that can be executed by the system without modification. 直接场景是那些不需要修改系统就能执行的场景 Indirect scenarios are those that require modifications to the system. 间接场景是那些需要修改系统的场景 The classification depends upon both the scenario and the architecture. 场景的类型因系统而异 For indirect scenarios we gauge the order of difficulty of each change: e.g. a person-day, person-week, person-month, person-year. 对间接场景,我们要度

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

当前位置:首页 > 其他


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