软件体系结构体系结构评审Architectural Reviews_第1页
软件体系结构体系结构评审Architectural Reviews_第2页
软件体系结构体系结构评审Architectural Reviews_第3页
软件体系结构体系结构评审Architectural Reviews_第4页
软件体系结构体系结构评审Architectural Reviews_第5页
已阅读5页,还剩44页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、软件体系结构体系结构评审Architectural Reviews 22022/7/25Architectural ReviewsArchitectural 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 will discusscost

2、/benefits of architectural reviewsdifferent architectural review techniquespreconditions for an architectural reviewarchitectural review activitiesoutputs from an architectural review 32022/7/25Costs of Architectural ReviewsThere are three different types of costs of holding regular architectural re

3、views.direct staff costs直接员工开销organizational overhead组织管理开销indirect staff costs间接员工开销 42022/7/25Examples of Direct Staff CostsAT&T300 full-scale reviews done on projects of 700 staff-days or longer全面评审了300个项目,每个项目的开发时间都是700人日以上average cost per review: 70 staff days每次评审的平均开销:70人日Rational Software30 r

4、eviews done on projects with at least 500 KSLOC each评审了30个项目,每个项目最少500 KSLOCaverage cost per review: $50,000评审平均花费:$50,000 52022/7/25Examples of Direct Staff CostsSAAM evaluations12 reviews done on projects ranging from 100 KSLOC to 1,000 KSLOC12次评审,项目规模从100 KSLOC到1,000 KSLOCaverage cost per review:

5、 14 to 20 staff-days平均花费:14到20人日ATAM evaluations12 reviews done on projects ranging from 250 KSLOC to 2,500 KSLOC12次评审,项目规模从250 KSLOC到2,500 KSLOCaverage cost per review: 40 to 70 staff days平均花费:40到70人日 62022/7/25Example of Organizational OverheadCosts of establishing a corporate review unit建立评审组的开销m

6、anagement overheadcommunication expensesstaffing the unit给评审组配备人手relocating personnel to a central locationtraining 72022/7/25Example of Indirect Staff CostsUsing senior designers for evaluations instead of designing让高级设计人员参与评审而不是设计loss of productivity (due to reassignment of superior designers)生产力的

7、下降(高级设计师被委派新任务)time spent training staff in review techniques培训员工评审技术的时间消耗 82022/7/25Benefits of Architectural ReviewsFive different types of benefits result from holding architectural reviews.financialforces preparation for review为评审做准备也是一种推动力early detection of problems尽早地发现问题validation of requirem

8、ents确认需求improved architectures提高体系结构质量 92022/7/25Financial Benefits of ReviewsAT&T estimated that each reviewed project saves 10% of total cost as a result of the review. Thus, a 70-staff-day review of projects of 700 staff-days pays for itself.AT&T估算,每个被评审的项目节省10%的成本Consultants who perform architec

9、ture evaluations report 80% repeat business.参与评审的顾问报告了80%的重复项目 102022/7/25Forces Preparation for ReviewDocumentation/specifications must be provided, hence they must exist or be created.文档和说明书必须存在Some reviews use standard questions, and the architect can prepare ahead to ensure that the architecture

10、 scores well.评审有一些标准问题。体系结构师可以事先准备,确保这个体系结构可能得高分Reviews make the criteria for evaluation explicit by prioritizing requirements or quality goals.通过排定需求和质量目标的顺序,评审使评估的标准变得清晰 112022/7/25Early Detection of ProblemsThe problems that can be found by an architectural level inspection include在体系结构层进行检查可以发现的

11、问题unreasonable requirementsperformance problemsproblems associated with potential future modifications与未来的修改有关的问题The earlier in the life cycle that problems are found, the easier it is to fix them. 122022/7/25Validation of RequirementsReviews put stakeholders in the same room with each other, often

12、for the first time.评审使各种角色坐在同一个房间内。通常,这是第一次uncovers conflicts and tradeoffs解开冲突和寻找折中provides a forum for negotiated resolution of problems提供了一个论坛,来磋商问题的解决办法It often results in the generation of new requirements or the clarification of existing requirements.结果通常会是产生新的需求和净化已有的需求 132022/7/25Improved Ar

13、chitecturesDevelopment organizations anticipate types of questions raised at reviews and开发者预期在评审时会被发现的问题,然后design architectures with questions in mind在设计时,问题会时刻围绕脑海prepare documentation of the type needed at review准备评审时需要的文档give explicit consideration to qualities to be reviewed对将被评审的质量因素进行更深入的考虑 14

14、2022/7/25Review TechniquesThere are a variety of techniques for performing architectural reviews; each has a different cost and provides different information.有很多种评审技术。每种需要不同的开销,提供不同的信息These techniques fall into one of two categories.questioning techniques: applied to evaluate any aspect of an archi

15、tecture for any given reason提问技术:用来评价体系结构的任何方面measuring techniques: applied to answer questions about a specific quality度量技术:回答关于某项质量的问题 152022/7/25Questioning TechniquesScenario-based techniquesdescribes a specific interaction between stakeholders and a system描述角色与系统交互的过程example: SAAM, ATAM (partia

16、lly)Questionnaire-based techniques(基于问卷的技术)Some questions apply to all architectures (especially those in a single domain).有些问题被用于所有的体系结构,尤其是在单一领域内Some questions ask about details of a specific architecture.有些问题询问一个特定结构的细节Some ask about the development process.“Is there a single architect?”“How do y

17、ou ensure conformance?”“你们怎样保证一致性?” 162022/7/25Questioning TechniquesQuestionnaires are reused; they reflect more maturity or experience within a domain.问卷可以重用;它们体现了在一个领域内的成熟度和经验是否丰富Scenarios must be developed anew for each system.场景必须为每个系统重新开发 172022/7/25Measuring TechniquesMetrics: quantitative in

18、terpretations of observable measures量度:可测质量的定量说明complexity metrics identify areas where modifications may be difficult复杂度的测量指明在哪个区域修改会很困难performance metrics suggest areas where bottlenecks may occur性能的测量提示瓶颈会在哪里发生Reviews tend to focus onresults of metrics度量的结果assumptions underlying the interpretatio

19、n of the metrics (e.g., assumed event distribution)对度量的解释中的潜在假定 182022/7/25Measuring TechniquesSimulations, prototypes, experiments: domain specific models of an architecture or performance model仿真、原型、实验:建立体系模型或者性能模型are expensive to createoften exist as part of development anywayMay answer issues ra

20、ised by questioning technique 可以回答提问技术提出的问题“What evidence do you have that performance is adequate?”“你凭什么说可以达到这个性能?” 192022/7/25Properties of Review Techniques评审技术通用性细节等级阶段被评审对象提问技术问卷通用粗糙早期设计和过程场景特定系统中等中期设计度量技术度量通用或者特定领域好中期设计仿真原型实验特定领域不定早期设计 202022/7/25Review ProcessAn architectural review has three

21、 major elements.preconditions: the set of necessary assets and conditions that must be in place before a review can be performed successfully前提:评审成功进行之前,必要的资源和条件必须到位activities of the review itself活动:评审本身outputs: the report of review results输出:评审结果报告 212022/7/25Review PreconditionsUnderstand the cont

22、ext of the review理解评审的上下文Assemble the right people集合正确的人Set organizational expectations and support期望和支持Prepare for review为评审做准备Obtain representation of the architecture获得体系结构文档 222022/7/25Preconditions: ContextPlanned reviewpart of normal development activity正常开发活动的一部分non-adversarial(非敌对性的)schedule

23、d well in advance(事先安排好日程)built into projects schedule and budget包含在项目日程和预算之内Unplannedusually occurs when project is in trouble通常在项目出现问题时采用often devolves into finger-pointing导致互相责备can be painful for project already struggling对于已经苦苦挣扎了很久的项目而言,有些痛苦 232022/7/25Preconditions: ContextTiming of the review

24、early “architecture discovery review”is done after requirements are set, but before the architecture is firm需求分析之后,体系结构还没有确定之前进行is used to understand implications of requirements on architecture用来理解需求在体系结构方面的隐含内容checks for requirements feasibility(检查需求的可行性)prioritizes architectural goals(为质量目标排序)ful

25、l architectural reviewis done when architectural documentation is available体系结构文档可用时进行is used to evaluate qualities of proposed architecture评价被评体系结构的质量 242022/7/25Preconditions: PeopleRepresentatives of project(项目代表)architectdesigners of major modulesstakeholders representativesReview team members (

26、ideally, a separate unit)评审团成员(理想情况下是一个独立组织)at least one domain expert included至少有一个领域专家someone to handle logistics (e.g., meeting rooms, supplies)后勤人员(会议室、茶水、食品)librarian to organize documentation文档管理员“apprentice reviewer” for growth成长中的评审员学徒 252022/7/25Preconditions: Review TeamThe review team mus

27、t be assembled so thatmembers are perceived as impartial, objective, and respected成员要公正、客观和被尊重members devote their full-time effort to the review成员全心加入评审members are fluent in architecture and architectural issues成员要训练有素而且口才好it is located close to artifacts being examined有足够的权限检查被评审材料 262022/7/25Prec

28、onditions: Review TeamThe team must have access toapplicable domain knowledge (perhaps via consultants to the team)适当的领域知识design documents设计文档review criteria评审标准support staff支持人员 272022/7/25Preconditions: OrganizationalExpectationsA contract between the review team and the sponsor of the review must

29、 be established.Who will be told what upon completion?结束后,哪些内容可以被告诉哪些人What will (not) be the review criteria?什么是(不是)评审标准?What/who will be made available to team?哪些人和物是评审团可以使用的?What follow-up is expected?希望评审的结果如何?How long will the review take?要评审多久? 282022/7/25Preconditions: OrganizationalExpectatio

30、nsOrganizational culture and support must be considered.Are reviews part 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 te

31、ams?企业允许它的高级设计师把他的项目放在一边来参加评审吗?Is there a standing review organization (even though members may rotate on and off)?有常设的评审组织吗(即便成员常进进出出)? 292022/7/25Preconditions: Read-Ahead MaterialFor project being reviewedquestionnairesscenarios (These are created as part of the review, but time should be allowed

32、 for project members to digest the information.)For review teamdescription of architecturerationale for architectureIdeally, material will address the review questions. (Passing this test because the questions were known in advance is not cheating, but good engineering!)理想情况,材料要能说明评审时的问题 302022/7/25

33、Preconditions: Ranked Qualityand Behavioral RequirementsPlan 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 necessar

34、y), the form of the representation is not important.一个专门的体系结构表述媒体(语言)目前并不是必须的。由项目成员来讲解信息,表述的形式并不重要 312022/7/25Review ActivitiesEvaluate“Run” the scenarios and ask the questions, or answer the items in the checklist.按场景执行,并询问相关问题;或者回答问卷里的问题Perform the experiments.(演示实验)Execute the prototypes or simul

35、ations.运行原型或仿真程序Recordcritical issues highlighted in the review评审中发现的严重问题comments of project members on these issues项目成员对这些问题的说明 322022/7/25Review ActivitiesRank the issuesproject-threatening(生死攸关)majorminorEach issue raised should be addressed in terms ofchanging the architecturerelaxing the requir

36、ements 332022/7/25Review ActivitiesWarning signsarchitecture forced to match organization组织模式影响体系结构top-level components number over 25顶层组件数超过25个one requirement drives entire design一项需求决定整个设计architecture depends on alternatives in the operating system体系受操作系统选择的影响 342022/7/25Review ActivitiesWarning s

37、ignschoice of software components is dictated by hardware personnel由硬件人员选择软件组件redundancy not needed for reliability面对可靠性时,不考虑冗余手段design is exception driven零散的小的事件影响设计no identifiable architect没有确定的架构师 352022/7/25Output from ReviewSet of ranked issuessupporting datacontained in formal reportfeedback t

38、o projectEnhanced system documentation增强的系统文档Set of scenarios for future use将来会用到的场景集Identification of potentially reusable components认定潜在的可重用组件Estimation of costs and benefits估算成本和收益 362022/7/25SAAM: Software Architecture Analysis Method 一种简单的基于场景的评审技术 372022/7/25Qualities Are Too Vague for Analysi

39、sIs 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一个合理的答案:yes with respect to chang

40、ing background color有,从改变背景色的角度来看no with respect to changing file format没有,从改变文件格式的角度来看 382022/7/25Qualities Are Too Vague for AnalysisQualities only have meaning within a context.质量因素只在一定的上下文里才有意义SAAM specifies context through scenarios.SAAM通过场景指定上下文 392022/7/25ScenariosA scenario is a brief descri

41、ption of a stakeholders interaction with a system.场景就是一个角色与系统交互过程的简单描述When creating scenarios, it is important to consider all stakeholders.建立场景的时候,一定要考虑到所有的角色Customer、User、Developer、Maintainer、AttackerThe scenarios that are of most interest in a SAAM evaluation are change scenarios.SAAM最关心的是变化场景 40

42、2022/7/25Steps of a SAAM EvaluationIdentify and assemble stakeholders确认和召集角色Develop and prioritize scenarios制定场景,并排好优先级Describe candidate architecture(s)描述候选的体系结构Classify scenarios as direct or indirect把场景分类为直接场景和间接场景Perform scenario evaluation进行场景评估Reveal scenario interactions展现场景间的相互影响Generate ove

43、rall evaluation整体评估 412022/7/25Step 1: Identify and Assemble StakeholdersStakeholderInterestCustomerSchedule and budget; usefulness of system; meeting customers (or markets) expectationsEnd UserFunctionality, usabilityDeveloperClarity and completeness ofarchitecture; high cohesion andlimited couplin

44、g of parts;clear interaction mechanismsMaintainerMaintainability; ability to locateplaces of change 422022/7/25Step 1: Identify and Assemble StakeholdersStakeholderInterestSystem AdministratorEase in finding sources of operational problemsNetwork AdministratorNetwork performance, predictabilityInter

45、gratorClarity and completeness ofarchitecture; high cohesion andlimited coupling of parts;clear interaction mechanisms 432022/7/25Step 1: Identify and AssembleStakeholdersStakeholderInterestTesterIntegrated, consistent error handling; limited component coupling; high component cohesion; conceptual i

46、ntegrityApplication BuilderArchitectural clarity, completeness; interaction mechanisms; simple tailoring mechanismsRepresentative of the domainInteroperability 442022/7/25Step 2: Stakeholders Develop andPrioritize ScenariosScenarios should be typical of the kinds of evolution that the system must su

47、pport:场景应该是系统必须支持的各种演化的典型:functionalitydevelopment activitieschange activitiesScenarios should represent tasks relevant to all stakeholders.所有角色都应该能在场景中体现出来Rule of thumb: 10-15 prioritized scenarios应该有10-15个优先的场景 452022/7/25Step 3: Describe CandidateArchitecturesIt is frequently necessary to elicit

48、appropriate architectural descriptions.通常,对体系结构进行适当的描述是非常重要的Structures chosen to describe the architecture will depend on the type of qualities to be evaluated.以我们需要的质量为依据,选择用来描述体系结构的结构 462022/7/25Step 4: Classify ScenariosThere are two classes of scenarios.Direct scenarios are those that can be executed by the system without modification.直接场景是那些

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论