知识卡片

问题卡 · 4359.g.1.d

进度资源只报告执行

理解等级:中级

耗时工作流需要让调用者知道执行到哪一步,同时避免泄漏内部诊断信息。

每次作业都可有独立进度资源,记录作业和任务标识、状态、起止时间、时限与必要消息,并提供刷新链接和新鲜度信息。调用者据此了解执行到哪里,而业务输入结果放入[[共享状态独立成资源]]。

进度不是内部跟踪日志,也不应随意放入重启、回滚等管理入口,避免与真正的编排控制冲突。完整HTTP报文可能泄露敏感数据,诊断细节应受访问控制,公开进度只保留必要反馈。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • 超媒体工作流 · 查看原书依据

      The simple goal of workflow progress resources is to offer additional feedback to API callers as the jobs and tasks execute. For that reason, it is a good idea to keep workflow progress resources very basic. Don’t try to include too much data, and be sure to not include any internal or private programming information as this can constitute a security leak.

    参考来源

    - 位置:《RESTful Web API Patterns and Practices Cookbook Connecting and Orchestrating Microservices and Distributed Data (Mike Amundsen)》第7章《超媒体工作流》§7.7(来源项目:book-sources;源文件:extracted/RESTful Web API Patterns and Practices Cookbook Connecting and Orchestrating Microservices and Distributed Data (Mike Amundsen)/_epub-src/OEBPS/ch07.xhtml) - 结论依据:原文以每次作业都可有独立进度资源,记录作业和任务标识、状态、起止时间、时限与必要消息,并提供刷新链接和新鲜度信息的方式说明该用途;同节示例与讨论补充了卡内条件和边界。 - 原始内容:The simple goal of workflow progress resources is to offer additional feedback to API callers as the jobs and tasks execute. For that reason, it is a good idea to keep workflow progress resources very basic. Don’t try to include too much data, and be sure to not include any internal or private programming information as this can constitute a security leak.