is DBus what I'm looking for?

浪尽此生 提交于 2019-12-06 04:48:45

问题


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

  1. packet/message oriented
  2. ability to handle both point-to-point and one-to-many communication
  3. no hierarchy, there's no server and client
  4. if one endpoint crashes, the others must be notified
  5. good support from existing Linux distros
  6. existence of a "bind" for Apache, for the purpose of creating dynamic pages

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

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.


回答1:


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.

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).



来源:https://stackoverflow.com/questions/9978609/is-dbus-what-im-looking-for

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!