← 返回刚才阅读的位置

知识卡片

普通读书笔记卡 · 2313.e.5.f.11.a

同步与异步API

理解等级:中级

同步API在处理完成后返回结果,适合短操作;异步API先接受请求并返回操作标识,客户端再查状态。分钟级任务容易超过连接超时,应把接受与完成明确分开。接口描述语言能生成跨语言客户端,SLO则补足时延、可靠性、吞吐等运行契约。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • Chapter 2. Important Distributed System Concepts · 查看原书依据

      APIs can be synchronous or asynchronous. Synchronous APIs return only after the request has been fully processed, while asynchronous APIs accept the request and return an operation ID for a background process that can be monitored via subsequent status requests. Synchronous APIs are the easiest to implement,

    参考来源

    - 位置:《Designing Distributed Systems, 2nd Edition》第02章《Chapter 2. Important Distributed System Concepts》(来源项目 book-sources;源文件:extracted/Designing Distributed Systems, 2nd Edition/_epub-src/OEBPS/ch02.html) - 结论依据:原文对比返回时点、操作ID及长操作超时,并补充IDL和SLO。 - 原始内容:APIs can be synchronous or asynchronous. Synchronous APIs return only after the request has been fully processed, while asynchronous APIs accept the request and return an operation ID for a background process that can be monitored via subsequent status requests. Synchronous APIs are the easiest to implement,