软件体系结构3数据流体系结构DataFlowArchitectures.ppt
《软件体系结构3数据流体系结构DataFlowArchitectures.ppt》由会员分享,可在线阅读,更多相关《软件体系结构3数据流体系结构DataFlowArchitectures.ppt(39页珍藏版)》请在三一文库上搜索。
1、软件体系结构 3. 数据流体系结构 Data Flow Architectures,孙志岗 , ,2,2019/8/1,Styles -Moving from Qualities to Architectures,Architectural styles help software engineers to reason about architectural qualities. 体系结构风格帮助软件工程师 推断软件体系结构的质量, ,3,2019/8/1,Styles -Moving from Qualities to Architectures,A style describes a c
2、lass of architectures 描述一类体系结构 is found repeatedly in practice 在实践中被多次设计、应用 is a package of design decisions 是若干设计思想的综合 has known properties that permit reuse 具有已经被熟知的特性,并且可以复用, ,4,2019/8/1,Architectural Styles,A style is determined (described) by a set of component types (e.g., data repository, pro
3、cess, object) 一组组件类型(例如:数据容器,过程,对象) a set of connector types/interaction mechanisms (e.g., subroutine call, event, pipe) 一组连接件类型/交互机制(例如:过程调用,事件,管道) a topological layout of these components 这些组件的拓扑分布, ,5,2019/8/1,Architectural Styles,A style is determined (described) by a set of constraints on topol
4、ogy and behavior (e.g., a data repository is not allowed to change stored values, pipelines are acyclic) 一组对拓扑和行为的约束(例如:数据容器不能自己改变数据,管道不能是循环的 an informal description of the costs and benefits of the style, e.g.: “Use the pipe and filter style when reuse is desired and performance is not a top priori
5、ty 一些对风格的成本和益处的非正式的描述,例如:如果你需要重用性并且性能不是很重要,那么可以使用管道风格, ,6,2019/8/1,Architectural Styles,Garlan and Shaw compiled a catalog of architectural styles in 1995. Others, such as Buschmann, have augmented this. There is no complete list. 没有完备的列表 There is no unique, non-overlapping list. 没有无重叠的列表 Styles ove
6、rlap. 风格是彼此重叠的 Systems exhibit multiple styles at once. 一个系统通常表现出多种风格, ,7,2019/8/1,Types of Architectural Styles, ,8,2019/8/1,Notes about Architectural Styles,When we introduce a new style, we will typically first examine its “pure” form. pure architectural style are rarely found in practice 纯粹的体系风格
7、在实际中很难遇到 systems in practice regularly deviate from the academic definitions of these systems. 循规蹈矩地背离了对这些系统的学术定义 typically feature many architectural styles simultaneously 典型地,融合很多体系风格的特色 as an architect you must understand the “pure” styles to understand the strength and weaknesses of the style as
8、 well as the consequences of deviating from the style 作为一个架构师,你必须理解“纯”的风格。理解它的优点与缺陷,也要理解背离此种风格之后会带来什么结果, ,9,2019/8/1,Data Flow Style(数据流风格),A data flow system is one in which the availability of data controls the computation 由数据控制计算 the structure of the design is dominated by orderly motion of data
9、from process to process 系统结构由数据在处理之间的有序移动决定 the pattern of data flow is explicit 数据流系统的结构是显而易见的 In a pure data flow system, there is no other interaction between processes 在纯数据流系统中,处理之间除了数据交换,没有任何其他的交互, ,10,2019/8/1,The Data Flow Style,There are variety of variations on this genera theme: how contro
10、l is exerted (e.g., push versus pull) 如何施加控制(比如:推还是拉) degree of concurrency between processes 并行的程度 topology, ,11,2019/8/1,Data Flow Styles,Components: Data Flow Components Interfaces are input ports and output ports 组件接口是输入端口和输出端口 Input ports read data; output ports write data 从输入端口读数据,向输出端口写数据 Com
11、putational model: read data from input ports, compute, write data to output ports 计算模型:从入口读数,计算,然后写到出口, ,12,2019/8/1,Data Flow Styles,Connectors: Data Streams Uni-directional(单向) usually asynchronous, buffered (通常是异步的,有缓冲) Interfaces are reader and writer roles 接口是reader和writer 计算模型: 把数据从writer转向rea
12、der Systems Arbitrary graphs(任意拓扑结构) Computational model: functional composition(计算模型: 功能组合), ,13,2019/8/1,Patterns of Data Flow in Systems, ,14,2019/8/1,Control Flow vs. Data Flow,Control Flow (typical case in procedural systems) Dominant question is how locus of control moves through the program 主
13、要问题是控制点怎样在程序或系统之间移动 Data may accompany the control but is not the driving force 数据可能跟着控制走,但是并不起推动系统运转的作用 Primary reasoning is about order of computation 关注的核心是计算顺序, ,15,2019/8/1,Control Flow vs. Data Flow,Data Flow Dominant question is how data moves through a collection of (atomic) computations 主要问
14、题是数据怎样在运算单元之间流动 As data moves, control is “activated” 数据到了,控制(计算)单元便开始工作 We reason about data availability, transformations, latency, 我们关心数据是否可用,转换,潜伏, ,16,2019/8/1,Three Examples of Data Flow,Batch Sequential(批处理) Pipe-and-Filter(管道) Process Control(控制), ,17,2019/8/1,Batch Sequential Pattern, ,18,2
15、019/8/1,Characteristics of Batch Sequential Systems,Processing steps are independent programs 每个处理步骤是一个独立的程序 Each step runs to completion before next step starts 每一步必须在前一步结束后才能开始 Data transmitted as a whole between steps 数据必须是完整的,以整体的方式传递 Typical applications: classical data processing program compi
16、lation/computer aided software engineering, ,19,2019/8/1,Characteristics of Batch Sequential Systems,Architectural Heuristics components (processing steps) are independent programs connectors are some type of media - traditionally magnetic tape each step runs to completion before the next step begin
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 软件 体系结构 数据流 DataFlowArchitectures
链接地址:https://www.31doc.com/p-3212433.html