知识卡片
同步异步按完成契约选
同步调用等待结果,适合当前步骤必须确认后再继续的交互;异步先受理后处理,适合较长任务和可延后工作。同步本身不提供跨服务事务原子性,异步也不必然低延迟;应明确受理、完成与失败如何告知。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Event-driven Systems · 查看原书依据
When designing a system, one should have certain considerations to decide whether a use case is fit for synchronous or asynchronous systems. Let us look at these considerations to always keep in mind the primary factors, as follows: Loose coupling and scalability: If your system consists of multiple services or components that need to communicate with each other but can operate independently, an event-driven architecture can provide loose coupling and scalability.
参考来源
- 位置:《Building Distributed Systems Designing scalable architectures with microservices, event-driven patterns, and robust deployment…》第06章《Event-driven Systems》(来源项目book-sources;源文件:extracted/Building Distributed Systems Designing scalable architectures with microservices, event-driven patterns, and robust deployment…/_epub-src/OPS/ch06.xhtml)
- 结论依据:原文的机制或对比支持以下核心判断:同步调用等待结果,适合当前步骤必须确认后再继续的交互;异步先受理后处理,适合较长任务和可延后工作。 本卡将相邻说明中的适用限制保留为解释。
- 原始内容:When designing a system, one should have certain considerations to decide whether a use case is fit for synchronous or asynchronous systems. Let us look at these considerations to always keep in mind the primary factors, as follows: Loose coupling and scalability: If your system consists of multiple services or components that need to communicate with each other but can operate independently, an event-driven architecture can provide loose coupling and scalability.