知识卡片

普通读书笔记卡 · 2313.e.5.f.11.d

函数解耦增加运行理解成本

理解等级:高级

函数相互独立且经网络调用,使局部代码与部署简单,却难以把握整体依赖。A调用B、B调用C、C回调A会形成跨函数循环,单看一个函数很难发现。需把调用关系、事件上下文与监控纳入设计,不能把平台自动扩展当作业务流自动正确。

这张卡片看不懂?

已有反馈 · 0 / 10 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • Chapter 9. Functions and Event-Driven Processing · 查看原书依据

      functionA() which calls functionB() functionB() which calls functionC() functionC() which calls back to functionA() Now consider what happens when a request comes into any of these functions: it kicks off an infinite loop that only terminates when the original request times out (and possibly not even then) or

    参考来源

    - 位置:《Designing Distributed Systems, 2nd Edition》第09章《Chapter 9. Functions and Event-Driven Processing》(来源项目 book-sources;源文件:extracted/Designing Distributed Systems, 2nd Edition/_epub-src/OEBPS/ch09.html) - 结论依据:原文以跨函数无限循环展示强解耦的运行成本。 - 原始内容:functionA() which calls functionB() functionB() which calls functionC() functionC() which calls back to functionA() Now consider what happens when a request comes into any of these functions: it kicks off an infinite loop that only terminates when the original request times out (and possibly not even then) or