Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are good ways to get something like D-Bus to work across multiple Linux machines, possibly through firewalls?

The D-Bus specification says that

D-Bus is.. a simple way for applications to talk to one another... Currently the communicating applications are on one computer...

I would like something like D-Bus but to work across multiple Linux machines, and there may be firewalls involved. For example, if my mail server decides it receives an important message, I would like it to post an event to the bus that my computer at home can see and perhaps respond by launching a linpopup window.

The events I'm interested in are relatively infrequent, so a low-performance technique is OK. But I would prefer not to reinvent any wheels. I would also prefer that as much as possible is written in shell scripts or other high-level languages and as little as possible in C (but I am willing to call C APIs if that is what it takes).

The way I interpret the official D-Bus web pages, they say it would be nice to get D-Bus to talk to multiple computers, but it doesn't work.

Edit: What's attractive to me about D-Bus is the model of publish and subscribe:

  • A machine that observes an interesting event publishes that event to "the system".

  • A machine that is curious about particular events subscribes just to those events. When an event happens, "the system" lets the machine know.

In D-Bus, "the system" is a single machine. I want something similar for multiple machines. This rules out direct solutions like TCP or SMTP communicating between machines. But I am happy to have a central server which receives all publication and subscription requests. I'm beginning to think it would be easier to build my own than to understand the Advanced Message Queueing Protocol (AMQCP), which is too darn advanced for the likes of me.

Performance is no object. Simplicity is definitely an object.

Once more: What software should I look at?

like image 260
Norman Ramsey Avatar asked May 01 '09 23:05

Norman Ramsey


People also ask

What is D-bus in 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 does dbus-daemon do?

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. Multiple programs connect to the message bus daemon and can exchange messages with one another.

What is a dbus command?

The dbus-send command is used to send a message to a D-Bus message bus. See https://www.freedesktop.org/wiki/Software/dbus/ for more information about the big picture.

How do I create a dbus service?

Register service The dbus-daemon scan the /usr/share/dbus-1/system-services for system services. We should create a simple service file there. The service file has to be named after bus name of the service. Remark: ${USER} should be replaced with username which is used in the policy file.


2 Answers

The "new thing" for managing messages and communication between apps, apparently is Rabbit.

Is an implementation of AMQP, that establishes messaing, routing and security...

check this:

http://www.rabbitmq.com

http://en.wikipedia.org/wiki/Advanced_Message_Queuing_Protocol

like image 199
Andor Avatar answered Sep 21 '22 06:09

Andor


You should search for messaging solutions but those depend on what language you intend to work in. Java has had this feature for a while, called JMS (Java Message Service). However other implementations exist.

  • ZeroMQ has API bindings for: C, C++, Python, .NET/Mono and more
  • OpenAMQ has API binding for: Python, Java, Ruby and C

I have no experience with the different frameworks so I can't tell you what to use, but you could give these a shot.

like image 25
Andrioid Avatar answered Sep 21 '22 06:09

Andrioid