知识卡片
环形缓冲区减少阶段搬运
Disruptor式设计让多阶段处理者围绕同一环形缓冲区读写,并用依赖约束保证后阶段只在前阶段写完后访问对应槽位。它可代替多个队列间的数据复制,并通过数据结构布局减少线程交换数据时的缓存代价。收益依赖真实并发和内存行为,框架并不替团队决定业务阶段、顺序与错误恢复。
这是[[SEDA按阶段隔离处理]]的一种数据交换实现,仍需团队定义阶段约束。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 服务端架构 · 查看原书依据
Processors belonging to multiple stages can simultaneously work with circular buffers, and we can control the order of processing by defining constraints. For example, a processor from the first stage (processors in Figure 11.5) can lock a cell, read, process, and write data back to the cell.
参考来源
- 位置:《Software Architecture and Decision-Making》第11章《Server Architectures》(来源项目:book-sources;源文件:extracted/Software Architecture and Decision-Making Leveraging Leadership, Technology, and Product Management to Build Great Products… (Srinath Perera)/_epub-src/ch11.xhtml)
- 结论依据:摘录说明Disruptor式设计让多阶段处理者围绕同一环形缓冲区读写,并用依赖约束保证后阶段只在前阶段写完后访问对应槽位。其余条件结合本章相邻例子与取舍说明,数字示例不作当前性能承诺。
- 原始内容:Processors belonging to multiple stages can simultaneously work with circular buffers, and we can control the order of processing by defining constraints. For example, a processor from the first stage (processors in Figure 11.5) can lock a cell, read, process, and write data back to the cell.