本文介绍了DBus 是我要找的吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一个 Linux 上的 IPC 系统.我的要求是:

I need an IPC system on Linux. My requirements are:

  1. 面向数据包/消息
  2. 能够处理点对点和一对多通信
  3. 没有层次结构,没有服务器和客户端
  4. 如果一个端点崩溃,必须通知其他端点
  5. 现有 Linux 发行版的良好支持
  6. 存在用于 Apache 的绑定",用于创建动态页面

按重要性排序(大致).我不需要极端的性能,也不会发送大量数据.

sorted in order of importance (roughly). I don't need extreme performance, nor I will be sending high volume of data.

我偶然发现了 DBus,它看起来是一个不错的选择(它pecl::packages::dbus 一种让Apache 访问DBUS 的好机制?).但在深入研究 DBus 文档之前,我想听听一些建议.

I stumbled upon DBus, and it looks like a good candidate (it pecl::packages::dbus a good mechanism to let Apache access the DBUS?). But before diving deep in DBus documentation I'd like to hear some suggestions.

推荐答案

ZeroMQ 提供您要求的所有功能对于然后一些.它基本上是一个无论如何都可以工作"的消息传递系统,它将处理 IPC 消息传递中的所有极端情况和微妙之处.

ZeroMQ provides all the features you ask for and then some. It's basically a "work no matter what" messaging system that'll take care of all the corner cases and subtleties in IPC messaging.

然而,ZMQ 和所有其他类似的不是应用程序 - 它们是您可以用来创建应用程序的 API.您可以从 Apache 运行的任何脚本(例如 PHP 后端)中使用 ZMQ.

However, ZMQ and all the others like it are not applications - they're APIs you can use to create applications with. You would use ZMQ from whatever script your Apache is running (eg PHP backend).

这篇关于DBus 是我要找的吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-03 09:56