知识卡片
共享库与共享服务的取舍
在多个服务复用同一能力时,需把编译期共享库与运行时共享服务放到同一目标下比较:
| 关注点 | 共享库 | 共享服务 |
|---|---|---|
| 调用性能与网络故障 | 进程内调用,少一层网络依赖 | 多一次网络调用与故障面 |
| 多语言复用与更新 | 各语言维护版本,调用方需重新发布 | 通过网络共用实现,服务更新后调用方可使用 |
| 版本与变更验证 | 编译期锁定版本 | 运行时兼容性需治理 |
原书的正负矩阵在其假设因素下偏向共享库;实际结论还取决于权重、组织和部署条件。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- The Laws of Software Architecture, Revisited · 查看原书依据
It may or may not be the solution to the problem at hand—you may need to apply additional weighting
参考来源
- 位置:《Fundamentals of Software Architecture》原书第27章《The Laws of Software Architecture, Revisited》(阅读计划第31项,单元03;源文件:`OEBPS/ch27.html`)
- 结论依据:原书比较异构代码、变化频率、版本、风险、性能、容错与伸缩,并提醒矩阵仍须按上下文加权;表格归纳其比较。
- 原始内容:It may or may not be the solution to the problem at hand—you may need to apply additional weighting