简体   繁体   English

调度准确性,Quartz.NET vs Rx 2.0

[英]Scheduling accuracy, Quartz.NET vs Rx 2.0

Has anyone compared the scheduling accuracy (how close to the scheduled time the call actually occurs) between Quartz.NET and Reactive Extensions 2.0? 有没有人比较Quartz.NET和Reactive Extensions 2.0之间的调度准确性(调用实际发生的时间有多接近)?

The only references I could find on the subject are this thread which compares them as methods of scheduling and the Rx 2.0 RC announcement blog post which explains improvements in absolute timing but neither really dwells on this. 我可以在这个主题上找到的唯一参考是这个线程,它将它们作为调度方法Rx 2.0 RC公告博客文章 进行比较 ,该文章解释了绝对时间的改进,但两者都没有真正详述。

I'm going to confess that I've not done the comparison, but I'd be willing to lay odds that the answer is that they have they same level of accuracy to within any margin that is going to be relevant to you! 我要承认我没有做过比较,但是我愿意承认答案是他们在与你相关的任何边际内都有相同的准确度!

Chris has the right idea, the limiting factor is the timer resolution of .NET (which, skipping a ton of detail, is basically ~15ms). Chris有正确的想法,限制因素是.NET的计时器分辨率(跳过大量细节,基本上是~15ms)。

I can't see a good reason to choose between these libraries on the basis of their scheduling accuracy - both are reasonable given the above constraint. 我看不出有充分的理由根据它们的调度精度在这些库之间进行选择 - 考虑到上述约束,两者都是合理的。 If ~15 ms is accurate enough, pick the one that delivers the API most suited to your needs. 如果~15 ms足够准确,请选择能够提供最适合您需求的API。

If it isn't, you'll typically need to use native code. 如果不是,您通常需要使用本机代码。 As soon as .NET is involved, deterministic RT behaviour exits stage left! 一旦涉及.NET,确定性RT行为就会退出舞台!

Seeing as how C# doesn't support real-time computing, the answer to this question is sort of irrelevant. 看到C#不支持实时计算,这个问题的答案有点无关紧要。

That being said, you should maybe use both. 话虽这么说,你应该使用两者。 Rx provides the ability to implement your own schedulers, so you can certainly create one which uses Quartz.NET. Rx提供了实现自己的调度程序的能力,因此您当然可以创建一个使用Quartz.NET的调度程序。 If you go that route, you end up with all of the power of Rx, plus all of the power of Quartz.NET. 如果你走这条路,你最终会拥有Rx的所有功能,以及Quartz.NET的所有功能。 Win win. 赢了。

I would start with Rx, and add Quartz.NET whenever Rx doesn't meet all of your needs. 我将从Rx开始,并在Rx无法满足您的所有需求时添加Quartz.NET。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM