Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

is DBus what I'm looking for?

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.

like image 365
Lorenzo Pistone Avatar asked Apr 02 '12 14:04

Lorenzo Pistone


People also ask

What is the point of dbus?

Dbus is an Inter-Process Communication protocol (IPC). It allows multiple processes to exchange information in a standardized way. This is typically used to separate the back end system control from the user-facing interface.

What is dbus used for Linux?

D-Bus is an inter-process communication (IPC) mechanism initially designed to replace the software component communications systems used by the GNOME and KDE Linux desktop environments (CORBA and DCOP respectively).

What is dbus broker?

dbus-broker is an implementation of the D-Bus Message Bus Specification [1]. Each instance provides a single, unique message bus that clients can connect to, and send messages over. The broker takes care of message mediation, access control, subscriptions, and bus control, according to the D-Bus specification.

What is dbus-daemon?

dbus-daemon is the D-Bus message bus daemon. See http://www.freedesktop.org/software/dbus/ for more information about the big picture. D-Bus is first a library that provides one-to-one communication between any two applications; dbus-daemon is an application that uses this library to implement a message bus daemon.


1 Answers

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

like image 83
Mahmoud Al-Qudsi Avatar answered Sep 28 '22 16:09

Mahmoud Al-Qudsi