知识卡片
接口协议匹配交互需求
REST利用资源和HTTP方法表达交互;GraphQL让调用方选择所需字段,减少取回过多或不足数据;gRPC用协议缓冲编码并支持流式交互。选择应围绕客户端、数据形态、交互模式和兼容要求,而非把某一种统一当作性能最优。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Architecture of Distributed Systems · 查看原书依据
Choosing the right protocol for your API is important. ReSTful APIs using HTTP are widely adopted due to their simplicity and compatibility with web technologies. They leverage HTTP methods (GET, POST, PUT, DELETE) to perform operations on resources. GraphQL is another popular choice that allows clients to query for specific data fields, reducing over-fetching and under-fetching. gRPC is a high-performance RPC framework that uses protocol
参考来源
- 位置:《Building Distributed Systems Designing scalable architectures with microservices, event-driven patterns, and robust deployment…》第03章《Architecture of Distributed Systems》(来源项目:a19c7933-4eda-4176-aebd-30fe7e1ad292;源文件:extracted/Building Distributed Systems Designing scalable architectures with microservices, event-driven patterns, and robust deployment…/_epub-src/OPS/ch03.xhtml)
- 结论依据:原文给出本卡对象的职责及相关使用情境,本卡保留相应边界,不将具体产品功能或概述推广为无条件保证。
- 原始内容:Choosing the right protocol for your API is important. ReSTful APIs using HTTP are widely adopted due to their simplicity and compatibility with web technologies. They leverage HTTP methods (GET, POST, PUT, DELETE) to perform operations on resources. GraphQL is another popular choice that allows clients to query for specific data fields, reducing over-fetching and under-fetching. gRPC is a high-performance RPC framework that uses protocol