简体   繁体   English

推荐.Net软实时

[英]Recommended .Net soft real-time

I'm interested in getting comprehensive information about soft (hard too) real-time application in .Net 3.5/4 Winforms mainly (WPF perhaps). 我有兴趣在.Net 3.5 / 4 Winforms中获得有关软(硬盘)实时应用程序的全面信息(也许是WPF)。 Google results for the thing are quite poor - some quides on parallelism only ... the question is how could I for example write a real-time patient-health monitoring client for some medical appliance? 谷歌的结果非常糟糕 - 有些人只关注并行性......问题是我怎样才能为一些医疗设备编写一个实时的患者健康监测客户端? or broker application with real-time stock data? 或具有实时股票数据的经纪人申请? or navigation system for a train? 还是火车导航系统? or a house-automation software which is responsible for opening/closing doors? 或者是一个负责打开/关闭门的房屋自动化软件? etc ... so this kind of realtime app is the target. 等...所以这种实时应用程序是目标。

So far I haven't found any books on it except Concurrent Programming on Windows - which is basicly not about this , rather parallelism handling ... 到目前为止,我没有找到任何书籍,除了Windows上的并发编程 - 这基本上不是关于这个,而是并行处理...

Thanks in advance 提前致谢

My personal feeling is that if your requirements are for real time software you shouldn't be using .net 我个人的感觉是,如果你的要求是实时软件,你不应该使用.net

.net uses a virtual machine that is not geared towards real time applications. .net使用的虚拟机不适合实时应用程序。 For example, you cannot predict when the garbage collector is going to run, or how long it is going to take. 例如,您无法预测垃圾收集器何时运行,或者需要多长时间。 If this happened at a critical moment, your real time software would no longer be real time. 如果这发生在关键时刻,那么您的实时软件将不再是实时的。

[Edit: Sorry, I know that's not really answering your question, but I think this is probably the reason why you are having trouble finding information on it - because nobody does it. [编辑:对不起,我知道这并没有真正回答你的问题,但我认为这可能是你找不到信息的原因 - 因为没有人这样做。 If you are writing real time software you should probably be looking at C or C++ instead. 如果您正在编写实时软件,那么您应该考虑使用C或C ++。 And depending how critical it is, a dedicated deterministic real time operating system. 并且取决于它的重要性,一个专用的确定性实时操作系统。 Or even specific languages designed with real time in mind] 甚至是特定的语言设计与实时]

In my company we have developed an telphony IVR server in C# and C++/CLI. 在我的公司,我们使用C#和C ++ / CLI开发了一个telphony IVR服务器。 It handles millions of calls per year, runs 24/7, never crashes and is generally as robust as we could wish for. 它每年处理数百万次呼叫,全天候运行,从不崩溃,并且通常像我们希望的那样强大。 There is nothing fancy about it, it is just regular windows service and while speed, efficiency and response time has obviously been something we've aimed for, it doesn't do anything esoteric like trying to control GB etc. 没有什么花哨的,它只是常规的Windows服务,虽然速度,效率和响应时间显然已经成为我们的目标,但它并没有像尝试控制GB等那样做任何深奥的事情。

There is however a big but. 然而,有一个很大但是。 The drivers for the hardware controlled by our application is obviously not .Net. 我们的应用程序控制的硬件驱动程序显然不是.Net。 So at the very lowest level we are not concerned by unwanted GBC and so on, all the millisecond dependent stuff like forwarding of IP telephony packets or voice streaming is handled by the firmware on our telephony boards. 因此,在最低级别,我们不关心不需要的GBC等,所有毫秒相关的东西,如IP电话数据包的转发或语音流,都由我们的电话板上的固件处理。

So to summarize the above: I would never even consider writing drivers or very very low latency code in .Net, but I would definitely write the controlling code/logic in .Net. 总结以上内容:我甚至不会考虑在.Net中编写驱动程序或非常低延迟的代码,但我肯定会在.Net中编写控制代码/逻辑。

Unfortunately I cannot point you to any useful resources, since I've never encountered any either, but I hope this use case will help you make an informed decission on whether you should consider .Net for your real-time projects. 不幸的是,我不能指出任何有用的资源,因为我从来没有遇到任何有用的资源,但我希望这个用例能帮助你做出明智的决定,决定你是否应该考虑.Net来实现你的实时项目。

I disagree with @Simon, you can build real-time systems with Windows and .NET. 我不同意@Simon,你可以使用Windows和.NET构建实时系统。 You may not be able to build very specific hard time systems, but with proper design and testing you can and I have. 您可能无法构建非常具体的硬时间系统,但通过适当的设计和测试,您可以和我一样。

There are many techniques to push hard time requirements on to software solutions or hardware such as motion/IO controllers . 有许多技术可以将硬时间要求推给软件解决方案或硬件,例如运动/ IO控制器 Windows/.NET makes much of the system easier to develop than RTOS development and the few time critical elements can be addressed. Windows / .NET使得系统的大部分内容比RTOS开发更容易开发,并且可以解决很少的时间关键元素。 My approach is to address these time critical concerns first and test. 我的方法是首先解决这些时间关键问题并进行测试。

Parralelism and threading are some of the tools .NET provides to help you write real time applications, but the architecture of real time systems is language independent. Parralelism和线程是.NET提供的一些工具,可以帮助您编写实时应用程序,但实时系统的体系结构与语言无关。

This MSDN article has some good links for parallel computing. 这篇 MSDN文章有一些很好的并行计算链接。

Perhaps the Smart Client Software Factory might be a good reference implimentation for you to start investigating. 也许智能客户端软件工厂可能是您开始调查的一个很好的参考实施。

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

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