我可以使用哪个库来进行简单的轻量级消息传递? [英] What library can I use to do simple, lightweight message passing?

查看:106
本文介绍了我可以使用哪个库来进行简单的轻量级消息传递?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将开始一个需要在分布式节点之间进行通信的项目(该项目使用C ++)。我需要一个轻量级的消息传递库来在节点之间传递非常简单的消息(基本上只是文本字符串)。该库必须具有以下特征:

I will be starting a project which requires communication between distributed nodes(the project is in C++). I need a lightweight message passing library to pass very simple messages(basically just strings of text) between nodes. The library must have the following characteristics:


  1. 不需要外部设置。我需要能够在我的代码中启动并运行所有内容-我不想要求用户安装任何软件包或编辑任何配置文件(除了要连接的IP地址和端口列表以外)。

  1. No external setup required. I need to be able to get everything up-and-running in my code - I don't want to require the user to install any packages or edit any configuration files(other than a list of IP addresses and ports to connect to).

库使用的基础协议必须是TCP(或者,如果是UDP,则库必须保证最终收到消息)。

The underlying protocol which the library uses must be TCP(or if it is UDP, the library must guarantee the eventual receipt of the message).

该库必须能够发送和接收任意大的字符串(最大3GB以上)。

The library must be able to send and receive arbitrarily large strings(think up to 3GB+).

该库不需要支持任何安全机制,容错或加密-我只需要它快速,简单且易于使用。我已经考虑过MPI,但得出结论认为,对于我的项目,它需要在用户计算机上进行过多的设置。

The library needn't support any security mechanisms, fault tolerance, or encryption - I just need it to be fast, simple, and easy to use. I've considered MPI, but concluded it would require too much setup on the user's machine for my project.

对于这样的项目,您会建议使用哪个库?我会自己动手,但由于时间限制,我认为这不可行。

What library would you recommend for such a project? I would roll my own, but due to time constraints, I don't think that will be feasible.

推荐答案

看看在ØMQ,即ZeroMQ。

Take a look at ØMQ, i.e. ZeroMQ.

这篇关于我可以使用哪个库来进行简单的轻量级消息传递?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆