← 返回刚才阅读的位置

知识卡片

普通读书笔记卡 · 1976.ah.2

粒度衡量职责而非行数

理解等级:中级

模块化关心系统分成哪些部分,粒度关心每部分多大。服务大小首先由它做什么界定,而非代码行数或类数;语句数量和公开操作数可作比较指标,但仍不能替代业务职责判断。不同编码风格会扭曲行数,所以不能用“少于某行就是微服务”作为分界。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • 服务粒度 · 查看原书依据

      In our usage, modularity concerns breaking up systems into separate parts (see Chapter 3), whereas granularity deals with the size of those separate parts. Interestingly enough, most issues and challenges within distributed systems are typically not related to modularity, but rather granularity.

    参考来源

    - 位置:《Software Architecture: The Hard Parts》第07章《服务粒度》(来源项目:book-sources;源文件:extracted/Software Architecture The Hard Parts Modern Trade-Off Analyses for Distributed Architectures (Neal Ford, Mark Richards, Pramod Sadalage etc.)/_epub-src/OEBPS/ch07.xhtml) - 结论依据:所引连续原文给出本卡机制或取舍;条件与示例结合本节已读上下文解释。 - 原始内容:In our usage, modularity concerns breaking up systems into separate parts (see Chapter 3), whereas granularity deals with the size of those separate parts. Interestingly enough, most issues and challenges within distributed systems are typically not related to modularity, but rather granularity.