数据流编程 - 模式和框架
我刚刚遇到了提议的 Boost::Dataflow 库。 这似乎是一个有趣的方法,我想知道是否有其他这样的 C++ 替代框架,以及是否有任何相关的设计模式。 我并没有排除 Boost::Dataflow,我只是在寻找任何可用的替代方案,以便我可以更好地理解该域和我的选项(或者在必要时推出我自己的选项)。
I just came across the proposed Boost::Dataflow library.
It seems like an interesting approach and I was wondering if there are other such alternative frameworks for C++, and if there are any related design patterns.
I have not ruled out Boost::Dataflow, I am just looking into any available alternatives so I can understand the domain and my options better (or roll my own if necessary).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(11)
如果您想要这种设计用于图像处理或可视化,您可以在 itk 中找到很好的资源。 如果您想要此(数据/工作)流程的 GUI,您可以使用 devide。
我的2分钱,
约翰
if you want this design for image processing or visulization, you can find a good ressource in itk. And if you want a gui for this (data/work)flow you can use devide.
My 2cents,
Johan
我发现了一些数据流 C++ 库:
There are some dataflow C++ libraries I have found:
您还可以查看两个主要的开源机器人框架,ROS 和 Orocos。 还有 Rock,但它基于 Orocos,因此如果您只是在寻找 C++,那么它是等效的组件框架。
You can also look at the two main open source robotics frameworks, ROS and Orocos. There is also Rock, but it is based on Orocos, so it is equivalent if you're just looking for a C++ component framework.
查看英特尔线程构建模块,特别是它的
tbb::flow
命名空间。Look at Intel Threading Building Blocks, particullary its
tbb::flow
namespace.也许 Pure Data (pd) 有一个 C++ API...
http://en.wikipedia.org/wiki/纯数据
Maybe Pure Data (pd) has a C++ API...
http://en.wikipedia.org/wiki/Pure_Data
仅作为记录,您还可以考虑 gstreamermm,它是 gstreamer。
Just for the records, you can also consider gstreamermm, which is a C++ wrapper around gstreamer.
数据流编程是潜伏了数十年但从未真正兴起的事物之一......无论如何,对于软件来说; 在 VHDL/Verilog 世界中,您会发现自己更容易自然地采用数据流思维方式。 但在软件世界中......不知何故,它似乎从未扩展到玩具系统之外,也许是因为人们坚持将其与可视化编程结合在一起(我看到了增强数据流也走这条路)。 有些人希望通过数据流编程来解决软件危机,使其更像具有可互连引脚的可插拔组件的硬件设计......但是坚持下去,硬件设计也确实很难!(有趣的是,虽然在硬件世界的可视化编程系统确实存在,但实际上没有人< /em> 使用它们来构建任何大的东西)。
我所知道的使用数据流原理的最有趣、最活跃的现代示例是 PureData 视听编程环境。
Dataflow programming is one of those things that's been lurking around for decades and never quite taken off... for software anyway; in the VHDL/Verilog world you find yourself naturally adopting the dataflow mindset much more readily. But in the software world... somehow it just never seems to scale beyond toy systems, perhaps because people insist on tying it together with visual programming (and I see boost dataflow also treads this path). Some people look to dataflow programming to solve the software crisis by making it more like HW design with pluggable components with interconnectable pins... but hang on, HW design is really hard too! (Interestingly, while in the HW world visual programming systems do exist, noone actually uses them to build anything big).
The most interesting, active modern example I'm aware of using dataflow principles is the PureData audio-visual programming environment.
Visual Studio 并发运行时包含 C++ 中的异步数据流框架。
图像处理数据流示例:http://msdn.microsoft.com/en-我们/library/ff398050.aspx
Visual Studio Concurrency Runtime contains an asynchronous dataflow framework in C++.
An example of image processing dataflow: http://msdn.microsoft.com/en-us/library/ff398050.aspx
维基百科
维基百科中有几篇关于数据流编程理论的好文章:
这些文章是由不同的作者写的,所以有一些重叠,并且缺少一些重要的内容,但这是一个非常好的起点。
TinyOS
这是一个基于数据流原理的开源操作系统。 我对此有不好的感觉:他们甚至没有提到“数据流”这个术语。 尽管如此,也许它值得研究。
Wikipedia
There are a couple of good articles in the Wikipedia about the theory of the dataflow programming:
These articles are written by various authors, so there are some overlaps, and some important stuff are missing, but it is a very good start point.
TinyOS
This is an open source operating system based on the dataflow principle. I have bad feelings about that: they don't even mention the term "dataflow". Altough, it is that, and maybe it's worth studying it.
如果您的领域是声音生成/处理,请使用 http://www.synthedit.com/
它看起来很有前途,我在 SDK 文档(复调)中找到了一个深层问题的好答案。 有趣的是,他们没有提到“数据流”这个词。
If your area is sound generation/processing, use http://www.synthedit.com/
It looks promising, I've found a good answers for a deep problem in the SDK docs (polyphony). Funny, but they don't mention the word dataflow.
您可以在这里检查我的数据流实现:http://ambient.comp-phys.org
它支持 MPI和线程,并且基于通过运行时对象版本控制系统工作的自定义数据流类型(即环境::向量)。
You might check my implementation of dataflow here: http://ambient.comp-phys.org
It supports MPI and threading and is based upon custom dataflow types (i.e. ambient::vector) that work through run-time object versioning system.