gpt4 book ai didi

data-structures - Disruptor 模式和 NServiceBus

转载 作者:行者123 更新时间:2023-12-04 05:16:37 25 4
gpt4 key购买 nike

我一直在研究高性能可靠消息系统的破坏者模式,作为 NServiceBus 的狂热用户,我想知道这是否可以为它实现?或者也许已经有一个实现......我只是想知道其他人对此的想法?

最佳答案

如果您指的是 LMAX architectureMechanical Sympathy 的 Martin Thompson那么答案是否定的,至少在不久的将来。原因是破坏者架构在根本层面上不同于 NServiceBus。引用 Disruptor GitHub page :

This is not a specialist solution, it's not designed to work only for a financial application. The Disruptor is a general-purpose mechanism for solving a difficult problem in concurrent programming. It works in a different way to more conventional approaches, so you use it a little differently than you might be used to. For example, applying the pattern to your system is not as simple as replacing all your queues with the magic ring buffer.



因此,可以使用 NServiceBus 中存在的一些抽象,例如 IMessageHandler,并将环形缓冲区用作底层传输,但也可能需要更改某些抽象。

总的来说,我认为这是一个很好的问题。

关于data-structures - Disruptor 模式和 NServiceBus,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14186252/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com