体系结构.docx

上传人:b****4 文档编号:27013936 上传时间:2023-06-25 格式:DOCX 页数:18 大小:25.58KB
下载 相关 举报
体系结构.docx_第1页
第1页 / 共18页
体系结构.docx_第2页
第2页 / 共18页
体系结构.docx_第3页
第3页 / 共18页
体系结构.docx_第4页
第4页 / 共18页
体系结构.docx_第5页
第5页 / 共18页
点击查看更多>>
下载资源
资源描述

体系结构.docx

《体系结构.docx》由会员分享,可在线阅读,更多相关《体系结构.docx(18页珍藏版)》请在冰豆网上搜索。

体系结构.docx

体系结构

1.各种性能指标及如何到达各种性能指标的方法

(1).Performance–Throughput吞吐量

⏹Measureoftheamountofworkanapplicationmustperforminunittime

(2).Performance-ResponseTime响应时间

⏹measureofthelatencyanapplicationexhibitsinprocessingarequest

(3).Performance-Deadlines

⏹‘somethingmustbecompletedbeforesomespecifiedtime’

ICDEPerformanceIssues

(1)Scalability伸缩性

(2)Modifiability可变性

(3).Security安全性

(4).Availability实用性(有效性、可用性)

(5).Integration集成性

2.常用的中间件有那几种类型

⏹CORBA

⏹Message-orientedmiddleware

⏹J2EE

⏹Messagebrokers

⏹Businessprocessorchestrators

⏹常见的对象请求代理架构

⏹面向消息的中间件

⏹Java2EnterpriseEdition(Java2的企业版)

⏹消息代理

⏹业务过程代理

3.有那些常见架构风格

(1).PipeandFilterArchitecturalStyle

⏹Suitableforapplicationsthatrequireadefinedseriesofindependentcomputationstobeperformedonordereddata.

⏹Acomponentreadsstreamsofdataonitsinputsandproducesstreamsofdataonitsoutputs.

⏹Components:

calledfilters,applylocaltransformationstotheirinputstreamsandoftendotheircomputingincrementallysothatoutputbeginsbeforeallinputisconsumed.

⏹Connectors:

calledpipes,serveasconduitsforthestreams,transmittingoutputsofonefiltertoinputsofanother.

(2).Object-OrientedStyle

⏹Suitableforapplicationsinwhichacentralissueisidentifyingandprotectingrelatedbodiesofinformation(data).

⏹Datarepresentationsandtheirassociatedoperationsareencapsulatedinanabstractdatatype.

⏹Components:

areobjects.

⏹Connectors:

arefunctionandprocedureinvocations(methods

(3).ImplicitInvocationStyle

⏹Suitableforapplicationsthatinvolveloosely-coupledcollectionofcomponents,eachofwhichcarriesoutsomeoperationandmayintheprocessenableotheroperations.

⏹Particularlyusefulforapplicationsthatmustbereconfiguredonthefly:

❑Changingaserviceprovider.

❑Enablingordisablingcapabilities.

⏹Insteadofinvokingaproceduredirectly...

❑Acomponentcanannounce(orbroadcast)oneormoreevents.

❑Othercomponentsinthesystemcanregisteraninterestinaneventbyassociatingaprocedurewiththeevent.

❑Whenaneventisannounced,thebroadcastingsystem(connector)itselfinvokesalloftheproceduresthathavebeenregisteredfortheevent.

(4).Client-ServerStyle

⏹Suitableforapplicationsthatinvolvedistributeddataandprocessingacrossarangeofcomponents.

⏹Components:

❑Servers:

Stand-alonecomponentsthatprovidespecificservicessuchasprinting,datamanagement,etc.

❑Clients:

Componentsthatcallontheservicesprovidedbyservers.

⏹Connector:

Thenetwork,whichallowsclientstoaccessremoteservers

(5).LayeredStyle

⏹Suitableforapplicationsthatinvolvedistinctclassesofservicesthatcanbeorganizedhierarchically.

⏹Eachlayerprovidesservicetothelayeraboveitandservesasaclienttothelayerbelowit.

⏹Onlycarefullyselectedproceduresfromtheinnerlayersaremadeavailable(exported)totheiradjacentouterlayer

⏹Components:

aretypicallycollectionsofprocedures.

⏹Connectors:

aretypicallyprocedurecallsunderrestrictedvisibility.

(6).RepositoryStyle

⏹Suitableforapplicationsinwhichthecentralissueisestablishing,augmenting,andmaintainingacomplexcentralbodyofinformation.

⏹Typicallytheinformationmustbemanipulatedinavarietyofways.Oftenlong-termpersistenceisrequired.

⏹Components:

⏹Acentraldatastructurerepresentingthecorrectstateofthesystem.

⏹Acollectionofindependentcomponentsthatoperateonthecentraldatastructure.

⏹Connectors:

⏹Typicallyprocedurecallsordirectmemoryaccesses.

(7).InterpreterStyle

⏹Suitableforapplicationsinwhichthemostappropriatelanguageormachineforexecutingthesolutionisnotdirectlyavailable.

⏹Components:

includeonestatemachinefortheexecutionengineandthreememories:

⏹currentstateoftheexecutionengine

⏹programbeinginterpreted

⏹currentstateoftheprogrambeinginterpreted

⏹Connectors:

⏹procedurecalls

⏹directmemoryaccesses.

(8).Process-ControlStyle

⏹Suitableforapplicationswhosepurposeistomaintainspecifiedpropertiesoftheoutputsoftheprocessat(sufficientlynear)givenreferencevalues.

⏹Components:

❑ProcessDefinitionincludesmechanismsformanipulatingsomeprocessvariables.

❑ControlAlgorithmfordecidinghowtomanipulateprocessvariables.

⏹Connectors:

arethedataflowrelationsfor:

❑ProcessVariables:

⏹Controlledvariablewhosevaluethesystemisintendedtocontrol.

⏹Inputvariablethatmeasuresaninputtotheprocess.

⏹Manipulatedvariablewhosevaluecanbechangedbythecontroller.

❑SetPointisthedesiredvalueforacontrolledvariable.

❑Sensorstoobtainvaluesofprocessvariablespertinenttocontrol.

1.管道和过滤器架构风格

适用于需要定义一系列的执行规则数据的独立运算。

组件在输入时读数据流,在输出时产生数据流。

组件:

称为过滤器,应用于对局部的输入流的转换,经常增长的计算,因此,在输入结束前输出就开始了。

连接器:

称为管道,给流提供管道,把一个过滤器的输出传输到另一个输入。

2.面向对象风格

适用于主要问题是识别和保护信息的相关主体。

数据代理和它们相关的操作封装在一个抽象数据类型里面。

组件:

对象

连接器:

功能和过程调用(方法)

3.隐式调用风格

应用于涉及到组件的松耦合集,其中的每一个都执行一些操作,还可能允许其他的操作。

尤其对必须很快重新配置的应用很有用

改变服务的供应商

可能的或是不可能的能力

不是直接的引用过程

一个组件能发表一个或多个事件

在系统中的其他组件能够在事件中注册一个兴趣通过与事件和过程结合

当一个事件被声明后,广播系统(连接器)自己引用已经注册的事件的所有过程

所有声明的事件“隐式”造成了过程在其他模块的调用

4.客户-服务器风格

适用于涉及到分布式的数据和跨越一系列的组件的处理

组件:

服务器:

标准独立的组件提供特别的服务,如打印,数据管理等。

客户端:

组件调用服务器提供的服务。

连接器:

网络,允许客户端访问远程服务器。

5.分层风格

适用于涉及到分布式的能够分层的组织的类的服务

每层给它的上一层提供服务,同时作为下一层的客户端

只有仔细地从内层选择选择过程,才能用于他们临近的外层。

组件:

典型的过程的集合。

连接器:

典型的在有限的可见性下的过程调用

6.仓库风格

适用于主要问题是建立、增加和维护复杂信息的主体部分

信息一定要能够用很多种方式操作。

经常需要长期的存在。

组件:

主要的数据结构能够表示出系统的正确状态

操作主要数据结构的独立组件的集合

连接器:

典型地过程调用或是直接内存访问

7.解释程序风格

适用于执行解决方案的最合适的语言或是机器不是直接可用的。

组件:

包括一个状态机,有一个执行引擎和三个记忆状态:

当前的执行引擎的状态

程序被翻译

当前的被翻译的程序的状态

连接器:

过程调用

直接内存访问

8.过程控制风格

适用于目的是维护特殊过程的输出属性在给定参考值的情形下

组件:

过程定义包括操作一些过程变量的机制

控制算法决定如何去操作过程变量

连接器:

数据流关系

过程变量:

被控制的变量的值是系统能控制的

输入变量能够检测过程的输入

操纵变量的值能够被控制器改变

设置断点是一个控制变量所需要的值

传感器获得过程变量与控制有关的值

4.架构师需要的核心技能是什么

⏹Manyresponsibilities:

❑Liaisonwithstakeholders

❑Technologyknowledge

❑Softwareengineering

❑Riskmanagements

⏹Longlistat:

❑http:

//www.sei.cmu.edu/ata/arch_duties.html

(1)涉众之间的交流

(2)技术知识

(3)软件工程学

(4)风险管理

5.什么是软件架构

WhatisSoftwareArchitecture?

⏹It’saboutsoftwaredesign

❑Allarchitectureissoftwaredesign,butnotalldesignissoftwarearchitecture

❑Partofthedesignprocess

⏹Simply,architecturefocuseson‘issuesthatwillbedifficult/impossibletochangeoncethesystemisbuilt’

❑Qualityattributeslikesecurity,performance

❑Non-functionalrequirementslikecost,deploymenthardware

❑Moreontheselaterinthissession

它是关于软件设计:

所有的架构是软件设计,但不是所有的设计都是软件架构。

设计过程的一个部分

简单地说,架构关注“一旦系统建立后就很难或是不可能改变的问题”:

质量属性,例如安全性,性能

非功能性需求,像开销,硬件配置

更多的是在这个部分之后的

答:

软件架构(softwarearchitecture)是一系列相关的抽象模式,用于指导大型软件系统各个方面的设计。

软件架构是一个系统的草图。

软件架构描述的对象是直接构成系统的抽象组件。

各个组件之间的连接则明确和相对细致地描述组件之间的通讯。

在实现阶段,这些抽象组件被细化为实际的组件,比如具体某个类或者对象。

在面向对象领域中,组件之间的连接通常用接口_(计算机科学)来实现。

6.什么是架构风格

ArchitecturePatterns/Styles

⏹Patternscataloguesuccessfullyusedstructuresthatfacilitatecertainkindsofcomponentcommunication

❑client-server

❑Messagebroker

❑Pipeline

⏹Patternshavewell-knowncharacteristicsappropriateforparticulartypesofrequirements

⏹Patternsareveryusefulthings…

❑Reusablearchitecturalblueprints

❑Helpefficientlycommunicateadesign

❑Largesystemscompriseanumberofindividualpatterns

❑“PatternsandStylesarethesamething–thepatternspeoplewon”[anonymousSEImember]

ArchitecturalStylesofSoftwareSystems

⏹AnArchitecturalStyledefinesafamilyofsystemsintermsofapatternofstructuralorganization.Itdetermines:

❑thevocabularyofcomponentsandconnectorsthatcanbeusedininstancesofthatstyle,

❑asetofconstraintsonhowtheycanbecombined.Forexample,onemightconstrain:

⏹thetopologyofthedescriptions(e.g.,nocycles).

⏹executionsemantics(e.g.,processesexecuteinparallel).

一组原则。

你可以把它看成是一组为系统家族提供抽象框架的粗粒度模式。

7.什么是架构视图

ArchitectureViews

⏹Asoftwarearchitecturerepresentsacomplexdesignartifact

⏹Manypossible‘views’ofthearchitecture

❑Cf.withbuildings–floorplan,external,electrical,plumbing,air-conditioning

一个架构视图是对于从某一视角或某一点上看到的系统所做的简化描述,描述中涵盖了系统的某一特定方面,而省略了此方面无关的实体。

8.各种架构风格的组件和连接器是什么

⏹ComponentandConnector:

describesthebehavioralaspectsofthearchitecture.Componentsareobjects,threadsorprocesses,andconnectorsdescribehowcomponentsinteract.

⏹Components:

areobjects.

⏹Connectors:

arefunctionandprocedureinvocations(methods).

组件:

对象

连接器:

功能和过程调用(方法)

9.GRASP模式的具体内容

The9GRASPPrinciples

1.Creator

2.Expert

3.Controller

4.LowCoupling

5.HighCohesion

6.Polymorphism

7.PureFabrication

8.Indirection

9.ProtectedVariations

1.Creator

AssigntoclassBtheresponsibilitytocreateaninstanceofclassAif

1.BaggregatesAobjects.

2.BcontainsAobjects.

3.BrecordsinstancesofAobjects.

4.BcloselyusesAobjects.

5.BhastheinitializingdatathatwillbepassedtoAwhenitiscreated.

2.Expert

“…expressesthecommon‘intuition’thatobjectsdothingsrelatedtotheinformationtheyhave.”

Assigntheresponsibilityfor“knowing”[something]totheobject(class)thathastheinformationnecessarytofulfilltheresponsibility.

3.Controller

ThecontrolleristhefirstobjectbeyondtheUIlayerthatisresponsibleforreceivingorhandlingasystemoperationsmessage.

4.LowCoupling

Measuresthedegreeofdependencythatexistsbetweenmodules.

5.HighCohesion

Measureofthedegreeof“relatedness”thatelementswithinamoduleshare.

Degreetowhichthetasksperformedbyasinglemodulearefunctionallyrelated.

6.Polymorphism

Whenrelatedalternativesorbehaviorsvarybytype(class),assignresponsibilityforthebehavior—usingpolymorphicoperations—tothetypesforwhich

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

当前位置:首页 > 医药卫生 > 基础医学

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1