知识卡片

普通读书笔记卡 · 2285.l.23

幂等约束业务副作用

理解等级:高级

幂等表示重复调用不会增加首次调用之外的效果,不要求每次响应内容相同。查询可能读到新状态,重复删除可能得到不存在。工作流完成任务后实例已经前进,无法再次完成同一任务;循环重返任务也会拥有新任务实例ID。设计远程API时应逐个操作考虑幂等,而非只检查传输是否可靠。

这张卡片看不懂?

已有反馈 · 0 / 10 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • 工作流引擎与集成挑战 · 查看原书依据

      Some operations are naturally idempotent. Queries don’t cause side effects and thus can easily be retried. Note that idempotency does not imply that the result must be exactly the same. A query might return different results a couple of seconds later because the state of the system might have changed. Deletions are typically also idempotent,

    参考来源

    - 位置:《Practical Process Automation》第9章《工作流引擎与集成挑战》(来源项目:book-sources;源文件:extracted/Practical Process Automation (Bernd Ruecker)/_epub-src/OEBPS/ch09.xhtml) - 结论依据:原文给出的机制、实例与边界支持本卡的解释。 - 原始内容:Some operations are naturally idempotent. Queries don’t cause side effects and thus can easily be retried. Note that idempotency does not imply that the result must be exactly the same. A query might return different results a couple of seconds later because the state of the system might have changed. Deletions are typically also idempotent,