问题
I need an IPC system on Linux. My requirements are:
- packet/message oriented
- ability to handle both point-to-point and one-to-many communication
- no hierarchy, there's no server and client
- if one endpoint crashes, the others must be notified
- good support from existing Linux distros
- 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