← 返回刚才阅读的位置

知识卡片

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

同步门面应有限等待

理解等级:高级

异步服务面对同步客户端时,可用门面发送请求后订阅、接收回调或轮询结果,但阻塞必须设超时。顺利完成返回HTTP 200;未及时完成则返回202并继续后台处理,之后通知用户。这把“暂时没有结果”和“业务失败”分开,也要求交互设计承认结果可能稍后到达。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

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

      Sometimes you will be forced to provide a synchronous API for certain clients, especially frontends. This becomes a challenge if your architecture embraces asynchronous communication or long-running processes. The solution to this problem is typically to create a facade that provides a synchronous API, for example via REST. Internally, this facade needs to block and

    参考来源

    - 位置:《Practical Process Automation》第9章《工作流引擎与集成挑战》(来源项目:book-sources;源文件:extracted/Practical Process Automation (Bernd Ruecker)/_epub-src/OEBPS/ch09.xhtml) - 结论依据:原文给出的机制、实例与边界支持本卡的解释。 - 原始内容:Sometimes you will be forced to provide a synchronous API for certain clients, especially frontends. This becomes a challenge if your architecture embraces asynchronous communication or long-running processes. The solution to this problem is typically to create a facade that provides a synchronous API, for example via REST. Internally, this facade needs to block and