dbus

Submitted by doug on Wed, 2007-07-25 19:46.Communications

D-Bus is a message bus system, a simple way for applications to talk to one another.

Fri, 2005-12-16 19:00

message bus process communication framework

Active

In addition to interprocess communication, D-Bus helps coordinate process lifecycle; it makes it simple and reliable to code a "single instance" application or daemon, and to launch applications and daemons on demand when their services are needed.

D-Bus supplies both a system daemon (for events such as "new hardware device added" or "printer queue changed") and a per-user-login-session daemon (for general IPC needs among user applications). Also, the message bus is built on top of a general one-to-one message passing framework, which can be used by any two apps to communicate directly (without going through the message bus daemon). Currently the communicating applications are on one computer, or through unencrypted TCP/IP suitable for use behind a firewall with shared NFS home directories. (Help wanted with better remote transports - the transport mechanism is well-abstracted and extensible.)

The D-Bus low-level API and protocol have been heavily tested in the real world over several years, and are now "set in stone." Future changes will either be compatible or versioned appropriately.

The low-level libdbus library has no required dependencies; the bus daemon's only *required* dependency is an XML parser (either libxml or expat). Higher-level bindings specific to particular frameworks (Qt, GLib, Java, C#, Python, etc.) add more dependencies, but can make more assumptions and are thus much simpler to use. The bindings evolve separately from the low-level libdbus, so some are more mature and ABI-stable than others; check the docs for the binding you plan to use.

The list of projects using D-Bus is growing and they provide a wealth of examples of using the various APIs to learn from.

D-Bus is very portable to any Linux or UNIX flavor, and a port to Windows is in progress.

Trackback URL for this post:

http://lopsa.org/trackback/1490