知识卡片

普通读书笔记卡 · 801.a.2

早发送晚接收减少等待

理解等级:高级

协调层可先发出相互独立的调用,在等待回应期间处理其他工作,到真正需要数据时再读取结果。三个API若没有前后依赖,先全发再组合可增加结果已就绪的机会。这个原则只适用于可并行工作,不应把依赖前一步结果的操作机械同时发出;集成中间件的价值之一是直接支持这种异步协调。

这张卡片看不懂?

已有反馈 · 0 / 10 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • 宏观架构中的协调 · 查看原书依据

      A key advantage of centralized coordination middleware is first-class support for asynchronous calls, where we call a service but can do other work until the response comes. This approach provides superior latency and performance. If you are using this approach, send data as early as possible and ask for information as late as possible (don’t ask for information but get the information holder to send it proactively). As mentioned in Chapter 3, this maximum is called “Send Early, Receive Late, Don’t Ask but Tell.” For example, say we call three APIs and then process and combine the results.

    参考来源

    - 位置:《Software Architecture and Decision-Making》第06章《宏观架构中的协调》(来源项目:book-sources;源文件:extracted/Software Architecture and Decision-Making Leveraging Leadership, Technology, and Product Management to Build Great Products… (Srinath Perera)/_epub-src/ch06.xhtml) - 结论依据:所引连续原文给出本卡机制或取舍;条件与示例结合本节已读上下文解释。 - 原始内容:A key advantage of centralized coordination middleware is first-class support for asynchronous calls, where we call a service but can do other work until the response comes. This approach provides superior latency and performance. If you are using this approach, send data as early as possible and ask for information as late as possible (don’t ask for information but get the information holder to send it proactively). As mentioned in Chapter 3, this maximum is called “Send Early, Receive Late, Don’t Ask but Tell.” For example, say we call three APIs and then process and combine the results.