Disruptor.NET 示例
我正在尝试学习如何使用 Disruptor.NET 消息传递框架,但找不到任何实际示例。有很多文章带有关于其工作原理的图片,但我找不到任何实际可以向您展示如何实现这些方法的地方。举个什么例子?
I am trying to learn how to use the Disruptor.NET messaging framework, and I can't find any practical examples. There are quite a few articles out there with pictures about how it works, but I can't find anywhere that actually goes and shows you how to implement the methods. What would be an example?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
由于无法为 Disruptor-net 找到一个可行的“Hello World”,我感到很沮丧,所以我一直在摆弄,直到找到一个可以工作的。见下文。
Console.WriteLine
行可以方便地查看事情是如何工作的。例如,RingBuffer 在启动时创建每个条目实例(这是有道理的)。希望这可以帮助任何在 .NET 上寻求 Disruptor 帮助的人。
Frustrated that I couldn't find a workable 'Hello World' for Disruptor-net, I fiddled around until I got one working. See below. The
Console.WriteLine
lines are handy for seeing how things work. For example, the RingBuffer creates each entry instance at start-up (which makes sense).Hopefully this helps anyone looking for help with Disruptor on .NET.
有一篇关于 Disruptor 模式的详细博客文章,延迟问题。它详细演示了如何开始和使用 Disruptor。
There is a detailed blog post on the Disruptor pattern, The Latency Issue. It demonstrates how to get started and use the Disruptor in detail.