Boost.MPI 与 Boost.Asio

发布于 2024-09-30 21:48:20 字数 786 浏览 0 评论 0原文

再会!

这些库有什么区别?

我阅读了 MPI 的文档并对 asio 有一些经验。对我来说是不同的 网络通信的实现仅此而已。

但他们每个人都引入了不同的抽象(我不确定同一级别 这些抽象)导致了不同的应用程序设计。

我什么时候应该使用一个库或另一个库?为了正确选择我必须知道什么 每种情况下的决定?

是的,Asio 对于多个节点(以及一般来说非常通用的框架)很有用,但为什么 MPI 对于此类任务不太好呢?我不认为对 MPI C 库的依赖是有限制性的,或者 MPI 很难理解,那么可扩展性又如何呢?借助 Asio,我们可以实现广播等功能,而另一方面,MPI 并不禁止编写简单的网络应用程序。如果需要的话,用 MPI 重写 Asio 特定的逻辑在概念上是否困难?

类似套接字的通信怎么样:如果是强制性的,我们可以将这样的通信封装在 Asio 或任何其他框架的模块中,并且仍然使用 MPI 进行其他通信。

对我来说,sokets 和 MPI 标准是不同的网络服务,并不清楚现实世界中什么是基本的,从简单的客户端-服务器对到一些中等计算的距离只是一步。而且我不认为 MPI 与 Asio 相比有显着的开销。

也许这是一个糟糕的问题,我们所需要的只是 ICE(互联网通信引擎)之类的东西?不同的语言支持并再次(确保 ZeroC)出色的性能。

当然,我从未在任何文档主题中看到过“不要使用这个库!”之类的内容。

我根本无法接受这种不统一:在一种情况下是套接字,在另一种情况下是异步消息,最后是重型中间件平台。开发生命周期的清晰度在哪里?也许这不是一个公平的问题,但为了开始减少这个动物园,我们需要一些观点。

Good day!

What difference between these libraries?

I read MPI's docs and have small experience with asio. For me it's different
implementations of network communication and no more.

But each of them introduces different abstractions ( I'm not sure about same level
of these abstractions ) which leads to different application design.

When I should use one library or another? What I must to know for choosing right
decision in each separate situation?

Yes, Asio is good for several nodes (and very generic framework in general), but why MPI is less better for such tasks? I don't think that dependency on MPI C library is restrictive or MPI is hard to understand and what about scalability? With Asio we can implement things like broadcasting and others and from another hand MPI doesn't forbid to write simple network applications. Is it conceptually difficult to rewrite Asio-specific logic with MPI if needed?

What about socket-like communications: if it's mandatory, we can encapsulate such one in module on Asio or any other framework and still use MPI for other communications.

For me sokets and MPI standart are different network services and it's not clear what is fundamental in real world, where distance from simple client-server pair to some medium computations is one step. Also I don't think that MPI has notable overhead in comparison with Asio.

Maybe it's bad question and all we need it's something like ICE (Internet Communications Engine)? Different languages support and again (as assures ZeroC) great performance.

And, of course, I never seen in any documentation topic like 'don't use this library for it!'.

I simply can't take such disunity: in one case it's sockets, in another - asynchronous messages and finally heavy middleware platform. Where is clarity in lifecycle of development? Maybe it's not fair question, but for starting to reduce this zoo we need some point.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

木森分化 2024-10-07 21:48:20

每个库解决不同的问题,它们并不真正重叠。它还取决于您想要解决的问题以及应用程序的通信模式。使用 Boost.MPI 实现可扩展性,例如扩展到数千个或数万个节点。根据底层网络架构,MPI 还擅长集体操作:聚集、分散、广播等。

使用

Each library solves different problems, they don't really overlap. It also depends what you are trying to solve, and the communication patterns of your application. Use Boost.MPI for scalability, such as scaling to thousands, or tens of thousands of nodes. Depending on the underlying network architecture, MPI also excels at collective operations: gather, scatter, broadcast, etc.

Use Boost.Asio for a socket abstraction layer if you only need a handful of nodes, such as a single server and some clients. I'd suggest using Boost.Asio if you aren't already using an MPI distribution in some fashion.

孤千羽 2024-10-07 21:48:20

我没有使用过它们,但是 Boost.ASIO 更多的是一个用于低级别网络的抽象层,而 Boost.MPI 实现了 MPI 标准,可让您创建分布式计算系统。

因此,如果您需要一些类似于套接字的通信,我会选择 ASIO。如果您想要进行分布式计算,甚至可能与用其他语言/针对其他平台编写的 MPI 程序进行互操作,请选择 Boost.MPI。

I haven't used both of them, but Boost.ASIO is more an abstraction layer for networking on a low level, whereas Boost.MPI implements the MPI standard which let's you create distributed computing systems.

So if you need some, say, socket-like communication, I'd go with ASIO. If you want to do distributed computing and maybe even interoperate with MPI programs written in other languages/for other platforms, go with Boost.MPI.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文