架构风格与基于网络的软件架构设计 PDF 文档

发布于 2021-09-26 12:41:52 字数 20700 浏览 1399 评论 0

本论文是 Web 发展史上一篇非常重要的技术文献。出于社会责任感,译者认为极其有必要将它介绍给国人,使国人得以一窥 HTTP 和 URI 等 Web 架构标准背后的基本原理。基于相同的基本原理,Web 开发者能够设计并建造出最为高效的 Web 应用。因此译者发起了这一公益性的翻译项目。除了四位主要的译者以外,来自新浪公司的田乐、丁舜佳和梁晓星也参与了第 3 章的部分翻译工作,对他们的辛勤工作表示感谢。此外,国内一些专家认真地审阅了论文的译文,提出了很多中肯的评论,使得译文的质量得以保证。

目录

论文摘要..............................................................................................................................................7
绪论......................................................................................................................................................8
第 1 章 软件架构...............................................................................................................................10
1.1 运行时抽象.............................................................................................................................10
1.2 元素 .......................................................................................................................................10
1.2.1 组件..................................................................................................................................11
1.2.2 连接器..............................................................................................................................12
1.2.3 数据 ................................................................................................................................12
1.3 配置.........................................................................................................................................12
1.4 属性 .......................................................................................................................................13
1.5 风格.........................................................................................................................................13
1.6 模式和模式语言.....................................................................................................................14
1.7 视图.........................................................................................................................................15
1.8 相关工作 ...............................................................................................................................15
1.8.1 设计方法学......................................................................................................................15
1.8.2 设计、设计模式、模式语言手册..................................................................................15
1.8.3 参考模型和特定于领域的软件架构..............................................................................16
1.8.4 架构描述语言..................................................................................................................16
1.8.5 形式化的架构模型..........................................................................................................17
1.9 小结 .......................................................................................................................................17
第 2 章 基于网络的应用的架构.......................................................................................................18
2.1 范围.........................................................................................................................................18
2.1.1 基于网络 vs. 分布式......................................................................................................18
2.1.2 应用软件 vs. 网络软件..................................................................................................18
2.2 评估应用软件架构的设计.....................................................................................................18
2.3 关键关注点的架构属性.........................................................................................................19
2.3.1 性能(Performance).....................................................................................................19
2.3.1.1 网络性能(Network Performance).......................................................................20
2.3.1.2 用户可觉察的性能(User-perceived Performance)............................................20
2.3.1.3 网络效率(Network Efficiency)..........................................................................21
2.3.2 可伸缩性(Scalability).................................................................................................21
2.3.3 简单性(Simplicity).....................................................................................................21
2.3.4 可修改性(Modifiability)............................................................................................21
2.3.4.1 可进化性(Evolvability)......................................................................................22
2.3.4.2 可扩展性(Extensibility)......................................................................................22
2.3.4.3 可定制性(Customizability)................................................................................22
2.3.4.4 可配置性(Configurability).................................................................................22
2.3.4.5 可重用性(Reusability)........................................................................................22
2.3.5 可见性(Visibility).......................................................................................................22
2.3.6 可移植性(Portability).................................................................................................23
2.3.7 可靠性(Reliability).....................................................................................................23
2.4 小结.........................................................................................................................................23
第 3 章 基于网络的架构风格...........................................................................................................24
3.1 分类方法学.............................................................................................................................24
3.1.1 选择哪些架构风格来进行分类......................................................................................24
3.1.2 风格所导致的架构属性..................................................................................................24
3.1.3 可视化..............................................................................................................................24
3.2 数据流风格(Data-flow Styles)..........................................................................................25
3.2.1 管道和过滤器(Pipe and Filter,PF)..........................................................................25
3.2.2 统一管道和过滤器(Uniform Pipe and Filter,UPF)................................................26
3.3 复制风格(Replication Styles)............................................................................................26
3.3.1 复制仓库(Replicated Repository,RR).....................................................................26
3.3.2 缓存(Cache,$)..........................................................................................................26
3.4 分层风格(Hierarchical Styles)...........................................................................................27
3.4.1 客户-服务器(Client-Server,CS)..............................................................................27
3.4.2 分层系统(Layered System,LS)和分层-客户-服务器(Layered-ClientServer,LCS).........................................................................................................................28
3.4.3 客户-无状态-服务器(Client-Stateless-Server,CSS)...............................................28
3.4.4 客户-缓存-无状态-服务器(Client-Cache-Stateless-Server,C$SS)........................28
3.4.5 分层-客户-缓存-无状态-服务器(Layered-Client-Cache-Stateless-Server,LC$SS)
...................................................................................................................................................29
3.4.6 远程会话(Remote Session,RS)...............................................................................29
3.4.7 远程数据访问(Remote Data Access,RDA)............................................................29
3.5 移动代码风格(Mobile Code Styles)..................................................................................29
3.5.1 虚拟机(Virtual Machine,VM).................................................................................30
3.5.2 远程求值(Remote Evaluation,REV).......................................................................30
3.5.3 按需代码(Code on Demand,COD) .......................................................................31
3.5.4 分层-按需代码-客户-缓存-无状态-服务器(Layered-Code-on-Demand-Client-CacheStateless-Server,LCODC$SS).............................................................................................31
3.5.5 移动代理(Mobile Agent,MA).................................................................................31
3.6 点对点风格(Peer-to-Peer Styles).......................................................................................31
3.6.1 基于事件的集成(Event-based Integration,EBI).....................................................32
3.6.2 C2.....................................................................................................................................32
3.6.3 分布式对象(Distributed Objects,DO).....................................................................33
3.6.4 被代理的分布式对象(Brokered Distributed Objects,BDO)..................................33
3.7 局限.........................................................................................................................................33
3.8 相关工作.................................................................................................................................34
3.8.1 架构风格和模式的分类方法..........................................................................................34
3.8.2 分布式系统和编程范例..................................................................................................35
3.8.3 中间件..............................................................................................................................35
3.9 小结.........................................................................................................................................35
第 4 章 设计 Web 架构:问题与洞察力..........................................................................................37
4.1 万维网应用领域的需求.........................................................................................................37
4.1.1 低门槛..............................................................................................................................37
4.1.2 可扩展性..........................................................................................................................37
4.1.3 分布式超媒体..................................................................................................................38
4.1.4 Internet 规模....................................................................................................................38
4.1.4.1 无法控制的可伸缩性..............................................................................................38
4.1.4.2 独立部署..................................................................................................................38
4.2 问题.........................................................................................................................................39
4.3 推导方法(Approach)..........................................................................................................39
4.4 小结.........................................................................................................................................40
第 5 章 表述性状态转移(REST).................................................................................................41
5.1 推导 REST...............................................................................................................................41
5.1.1 从“空”风格开始..........................................................................................................41
5.1.2 客户-服务器....................................................................................................................41
5.1.3 无状态..............................................................................................................................42
5.1.4 缓存..................................................................................................................................42
5.1.5 统一接口..........................................................................................................................44
5.1.6 分层系统..........................................................................................................................44
5.1.7 按需代码..........................................................................................................................45
5.1.8 风格推导小结..................................................................................................................46
5.2 REST 架构的元素...................................................................................................................46
5.2.1 数据元素(Data Elements)..........................................................................................46
5.2.1.1 资源和资源标识符(Resources and Resource Identifiers).................................47
5.2.1.2 表述(Representations)........................................................................................48
5.2.2 连接器(Connectors)...................................................................................................49
5.2.3 组件(Components).....................................................................................................50
5.3 REST 架构的视图...................................................................................................................51
5.3.1 过程视图(Process View)............................................................................................51
5.3.2 连接器视图(Connector View)....................................................................................52
5.3.3 数据视图(Data View).................................................................................................53
5.4 相关工作.................................................................................................................................54
5.5 小结.........................................................................................................................................55
第 6 章 经验与评估...........................................................................................................................56
6.1 Web 标准化.............................................................................................................................56
6.2 将 REST 应用于 URI..............................................................................................................57
6.2.1 重新定义资源..................................................................................................................57
6.2.2 操作影子(Manipulating Shadows).............................................................................57
6.2.3 远程创作(Remote Authoring)....................................................................................58
6.2.4 将语义绑定到 URI..........................................................................................................58
6.2.5 REST 在 URI 中的不匹配...............................................................................................59
6.3 将 REST 应用于 HTTP...........................................................................................................59
6.3.1 可扩展性..........................................................................................................................59
6.3.1.1 协议版本控制..........................................................................................................60
6.3.1.2 可扩展的协议元素..................................................................................................60
6.3.1.3 升级..........................................................................................................................61
6.3.2 自描述的消息..................................................................................................................61
6.3.2.1 主机..........................................................................................................................61
6.3.2.2 分层的编码..............................................................................................................61
6.3.2.3 语义独立性..............................................................................................................62
6.3.2.4 传输独立性..............................................................................................................62
6.3.2.5 尺寸限制..................................................................................................................62
6.3.2.6 缓存控制..................................................................................................................63
6.3.2.7 内容协商..................................................................................................................63
6.3.3 性能..................................................................................................................................64
6.3.3.1 持久连接..................................................................................................................64
6.3.3.2 直写式(write-through)缓存................................................................................64
6.3.4 REST 在 HTTP 中的不匹配............................................................................................64
6.3.4.1 区分非权威的响应..................................................................................................65
6.3.4.2 Cookie......................................................................................................................65
6.3.4.3 必需扩展(Mandatory Extensions)......................................................................66
6.3.4.4 混合元数据(Mixing Metadata)..........................................................................66
6.3.4.5 MIME 语法..............................................................................................................66
6.3.5 将响应匹配到请求..........................................................................................................66
6.4 技术迁移.................................................................................................................................67
6.4.1 libwww-perl 的部署经验................................................................................................67
6.4.2 Apache 的部署经验.........................................................................................................67
6.4.3 开发顺从于 URI 和 HTTP/1.1 的软件...........................................................................68
6.5 架构上的教训.........................................................................................................................68
6.5.1 基于网络的 API 的优势..................................................................................................68
6.5.2 HTTP 并不是 RPC...........................................................................................................69
6.5.3 HTTP 并不是一种传输协议...........................................................................................70
6.5.4 媒体类型的设计..............................................................................................................70
6.5.4.1 一个基于网络的系统中的应用状态......................................................................70
6.5.4.2 增量处理..................................................................................................................71
6.5.4.3 Java vs. JavaScript....................................................................................................71
6.6 小结.........................................................................................................................................72
结论....................................................................................................................................................73
参考文献............................................................................................................................................75

下载地址:https://www.wenjiangs.com/wp-content/uploads/2021/09/software-architecture-design.zip

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

关于作者

JSmiles

生命进入颠沛而奔忙的本质状态,并将以不断告别和相遇的陈旧方式继续下去。

0 文章
0 评论
84961 人气
更多

推荐作者

qq_aHcEbj

文章 0 评论 0

寄与心

文章 0 评论 0

13545243122

文章 0 评论 0

流星番茄

文章 0 评论 0

春庭雪

文章 0 评论 0

潮男不是我

文章 0 评论 0

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文