Software Architecture: The Hard Parts Modern Trade-Off Analyses for Distributed Architectures学习笔记

Posted kgduu

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Software Architecture: The Hard Parts Modern Trade-Off Analyses for Distributed Architectures学习笔记相关的知识,希望对你有一定的参考价值。

1、总览

 

 2、拆分

2.1 识别耦合

2.2 架构模块化

2.3 架构分解

 

2.4 数据拆分

2.5 服务粒度

粒度的拆分和合并有相关的驱动因素 

3、合并 

3.1 重用模式

3.2 数据所有权和分布式事务

 后台同步模式优缺点

优点缺点
  • 服务解耦
  • 响应快
  • 数据源耦合
  • 打断边界上下文
  • 实现复杂
  • 业务逻辑可能有重复
  • 最终一致性缓慢

基于编排请求模式的优缺点

优点缺点
  • 服务解耦
  • 数据一致性及时
  • 原子业务请求
  • 反应较慢
  • 错误处理复杂
  • 通常要求补偿事务

基于事件模式优缺点

优点缺点
  • 服务解耦
  • 数据一致性及时
  • 响应快
  • 复杂的错误处理 

3.3 分布式数据访问 

 服务间调用模式优缺点

优点缺点
  • 简单
  • 无数据量问题
  • 网络、数据、安全延时(性能)
  • 可伸缩性和吞吐量问题
  • 无容错(可用性问题)
  • 需要服务间协议 

列架构复制模式优缺点

优点缺点
  • 很好的数据访问性能
  • 没有可伸缩性和吞吐量问题
  • 没有容错问题
  • 没有服务依赖
  • 数据一致性问题
  • 数据所有权问题
  • 要求数据同步

复制缓存模式优缺点

优点缺点
  •  很好的数据访问性能
  • 没有可伸缩性和吞吐量问题
  • 没有容错问题
  • 数据保持一致性
  • 数据所有权保持
  • 云和容器配置很难
  • 不适用于大数据量
  • 不适用于很高的更新频率
  • 初始服务启动依赖 

数据域模式优缺点

优点缺点
  • 很好的数据访问性能
  • 没有可伸缩性和吞吐量问题
  • 没有容错问题
  • 没有服务依赖
  • 数据保持一致性 
  • 更大的边界上下文管理数据改变
  • 数据所有权治理
  • 数据访问安全 

3.4 分布式工作流

 

 编排模式优缺点

优点缺点
  • 中心化工作流
  • 错误处理
  • 可恢复性
  • 状态管理 
  • 响应时间
  • 容错
  • 可伸缩性
  • 服务耦合

协调模式优缺点

优点缺点
  • 响应性
  • 可伸缩性
  • 容错
  • 服务解耦
  • 分布式的工作流
  • 缺省状态管理 
  • 难以处理错误
  • 恢复比较困难

前端控制器模式优缺点

优点缺点
  • 在协调中创建了伪编排
  • 使得查询状态变得简单
  • 在一个域服务中添加了工作流状态
  • 增加了通信开销
  • 不利于性能和伸缩

无状态协调模式优缺点

优点缺点
  • 提供高性能和伸缩
  • 极度解耦
  • 工作流状态必须动态生成
  • 复杂的工作流程会迅速增加复杂性

标志耦合模式优缺点

优点缺点
  • 允许域服务传递工作流状态不需要向状态所有者查询
  • 无需前端控制器前端控制器
  • 协议必须足够大来适配工作流状态
  • 不提供即时状态查询

3.5 事务Saga

 有八种形式,依赖于通信,一致性及协同

3.6 协议

 

严格协议的优缺点

优点缺点
  • 保证协议准确性
  • 版本控制 
  • 构建时间验证
  • 更好文档化
  • 紧耦合
  • 版本过多,不易于管理

 松散协议的优缺点

优点缺点
  • 调度解耦
  • 容易演进
  • 协议难以管理 
  • 需要适应度函数

software architecture slide 2

34

33 what are cohension levels from bad to good?

  coincidental

  logical 

  temporal

  procedural

  communicational

  sequential

  functional

32 what are coupling levels from bad to good?  

  content

  common

  external

  control

  stamp

  data

  message

  no coupling

31 what is cohesion and coupling

  cohesion:  measure of how strongly a module‘s responsibilities are related, its ‘unity of purpose‘

  coupling:  measure of responsibility overlap beween modules, the probability that modifying one module requires modifying the other.

30 what are catogories of tactics for modifiability?

  reduce size of a module

  increase cohesion

  reduce coupling  

  defer binding

29 what questions should an architect has to consider to plan for modifiability?

  what can change

  what is the likelihood of the change

  when is the change made and who makes it

  what is the cost of change

28 what is modifiablility

  modifiability is about change and our interest in

  it is the coust and risk of making changes

27 what are catogries of tactics for security?

  Detect ATtacks

  Resist attacks

  React to attacks

  recover from attacks

26 what are other characteristics that support CIA?

  Authentication

  Nonrepudiation

  Authorization

  

25 what are CIA characteristics of security

  Confidentiality

  Integrity

  Availability

24 what is attack

  attack is action against system with the intention of doing harm

    unauthorized attempt to access servides

    attempt to deny services to legitimate users

23  what is security?

  security is a measure of the system‘s ability to protect data and information form unauthorized access while still providing access to people and systems taht are authorized

23 what catogories for performance tactics?

  control resource demand

  Manage resource

22 what is performance?

  Performance is about time and the software system‘s ability to meet timing requirements.

21 what is orchestrate?

  Use a control mechanism to coordinate, manage and sequence the invocation of services

20 what are the proxy design pattern?

19 what catogories for interoperability tactics?

  Locate

    service discovery

  manage interface

    tailor interface

18 what is interoperability

  Interoperability is about the degree to which two ore more systems can usefully exchage meaningful information via interfaces in a particular context.

17 what are catagories of availability tactics?

  Detect Faults

  Recover from Faults

    preparation and repair

    reintroduction

  Prevent Faults

16 what do availability tactics do?

  Availability tactics enable a system to endure faults so that services remain compliant with their specifications

  The tactics keep faults from becoming failures or at least bound the effects of the fault and make repair possible.

15 what is fault or combination of faults

  A fault has the potantial to cause a failure.

    A failure occurs when the system no longer delivers a service conssitent with its specification

    such a failure is observable by the system‘s actors

14 what is availability?

  Availability refers to the ability of a system to mask or repair faults such that the cumulative service outage period does not exceed a required value over a specific time interval.

13 what are the categories of design decisions to make?

  Allocation of responsibilities

  Coordination model

  Data model

  Management of resources

  Mapping among architectural elements

  Choice of techonology

  Binding time decisions

12 what is the difference between tactics and architectural/design patterns?

  A tactic provedes a solution for one quality attribute

  A pattern provides a bundled solution for multiple attributes

11 what are tactics

  tactics are design decision influencing the achievement of a quality attribute responce

  tactics, like architectural/design patterns, are techniques that architects have been using for years.

  Not invented, but captured from parctice.

  

10 how to achieve quality attribute 

  architects can use architectural tactics to achieve the required quality attributes

9 how to specify quality attribute requirement?

  using six-part quality attribute scenario‘s

    source of stimulus 

    stimulus

    environment

    artifact

    resonse

    response measure

8 what is the solution of conflicts between quality attributes

  trade-off of architectural decisions.

7 are there conflicts between quality attributes.

  Yes

    withicn complex systems, quality attributes can never be achieved in isolation. The achievement of any one will have an effect, sometimes positive and somtimes negative, on the achievement of others.

 

6how many cantegories for quality arrtributes

  there are two categories of quality attributes

    those that describe some property of the system at runtime

      such as availability, performance or usability

    those that describe some property of the development of the system

      such as modifiability or testability

5 what is architect‘s interest in functionality?

  the architect‘s interest in functionality isin how it interacts with and constrains the system‘s qualities.

4 why responsibilites can not be allocated arbitrarily to any modules?

  Although responsibilites can be allocated arbitrarily to any modules, soft ware architecture constrains this allocation when quality attributes are important.

3 where does the most basic of architectural structures come from?

  functionality is achieved by assigning responsibilities to architectural elemetns, resulting in one of the most basic of architectural structures.

2 what is the relationship between functionality and architecture?

  Functionality does not determinde architecture

    Given a set of required functionalities, there is no end to the architectures you could create to satisfy that functionality.

    if functionality were theonly thing that mattered, you wouldn‘t have to divide the system into pieces at all.

1 what is functionality?

  functionality is the ability of the system to do the work for which it was intended.

  

以上是关于Software Architecture: The Hard Parts Modern Trade-Off Analyses for Distributed Architectures学习笔记的主要内容,如果未能解决你的问题,请参考以下文章

software architecture

software architecture slide 3

software architecture slide 2

Difference between Software Architecture & Design

Building Maintainable Software-java篇之Keep Architecture Components Balanced

Software--Architecture--Design DataAccess 数据访问