← 返回刚才阅读的位置

知识卡片

普通读书笔记卡 · 2313.e.5.f.10.c.1.c.2.c.1

双向与单向推送通道

理解等级:初级

WebSocket提供连接上的双向消息交互;SSE适合服务器向客户端单向发送更新。选择取决于双方是否都要持续发送及基础设施支持,不能用HTTP/2资源推送替代通用实时消息通道。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • Event-driven Systems · 查看原书依据

      WebSockets: It provides a Full-duplex, bidirectional communication channel over a single network connection allowing real-time data transfer between client and server. WebSockets are supported by most modern web browsers. Server-sent events (SSE): These provide unidirectional channel from server to client over HTTP.

    参考来源

    - 位置:《Building Distributed Systems Designing scalable architectures with microservices, event-driven patterns, and robust deployment…》第06章《Event-driven Systems》(来源项目book-sources;源文件:extracted/Building Distributed Systems Designing scalable architectures with microservices, event-driven patterns, and robust deployment…/_epub-src/OPS/ch06.xhtml) - 结论依据:原文的机制或对比支持以下核心判断:WebSocket提供连接上的双向消息交互;SSE适合服务器向客户端单向发送更新。 本卡将相邻说明中的适用限制保留为解释。 - 原始内容:WebSockets: It provides a Full-duplex, bidirectional communication channel over a single network connection allowing real-time data transfer between client and server. WebSockets are supported by most modern web browsers. Server-sent events (SSE): These provide unidirectional channel from server to client over HTTP.