知识卡片

普通读书笔记卡 · 3448

智能端点与简单管道

理解等级:中级

微服务可把处理数据的逻辑放在 API 端点,让通信层主要负责传递消息。简单管道不承担业务决策,端点则理解请求并处理数据。这个分工减少了服务对传输层业务规则的依赖,但不表示传输协议没有自身语义。

这张卡片看不懂?

已有反馈 · 0 / 10 条

    还没有人提交反馈。

    原书出处

    参考来源

    - 位置:《Microservice APIs》第 1 章《What are microservice APIs?》(源文件:_epub-src/OEBPS/Text/01.htm) - 结论依据:1.2.3 节借 Unix 管道解释“dumb pipe”只负责传消息,再把 HTTP 传输层与包含处理逻辑的 API 对比,推出职责分工。 - 原始内容:We say that this type of pipe is “dumb” because its only job is passing messages from one process to another. As you can see in figure 1.5, web APIs exchange data through HTTP. The data transport layer knows nothing about the specific API protocol we are using, and therefore it represents our “dumb pipe,” while the API itself contains all the necessary logic to process the data.