Revision as of 10:45, 11 October 2014 editDsimic (talk | contribs)Extended confirmed users, Pending changes reviewers, Rollbackers39,664 edits →Design: Tagged with {{cn}}← Previous edit | Revision as of 09:47, 14 October 2014 edit undoDsimic (talk | contribs)Extended confirmed users, Pending changes reviewers, Rollbackers39,664 edits Deduplicated a referenceNext edit → | ||
(2 intermediate revisions by the same user not shown) | |||
Line 28: | Line 28: | ||
== {{Anchor|KDBUS}}Design == | == {{Anchor|KDBUS}}Design == | ||
D-Bus is a ] system, or a medium for interprocess communication that allows the applications to communicate and exchange messages between themselves. Thus, D-Bus provides additional or simplifies existing functionality to the applications, including information sharing, modularity and ]. For example, information on an incoming voice call received through ] or ] can be propagated and interpreted by any currently running music player, which can react by muting the volume or pausing playback until the call is finished.<ref name="linux-journal">{{cite web | |||
D-Bus is a ] system, a medium for interprocess communication. The message bus is built on top of a general one-to-one message passing ], which any two apps can use to communicate directly with one another (i.e., without going through the message bus daemon).{{Citation needed|date=October 2014}} | |||
| url = http://www.linuxjournal.com/article/7744 | |||
| title = Get on the D-BUS | |||
| date = 2005-01-05 | accessdate = 2014-10-14 | |||
| author = Robert Love | publisher = '']'' | |||
⚫ | }}</ref> | ||
Most systems implement a privileged '' |
Most systems implement a privileged ''system channel'', together with a ''private channel'' for each logged-in user, so that available information in the D-Bus registry can be restricted. Accordingly, the D-Bus service includes both a ] (for events such as "new hardware device added" or "printer queue changed") and a distinct ] for each user login session (for general inter-process communication needs between applications started by the particular user). Applications communicate with daemons over ]s. The message bus is built on top of a general one-to-one message passing ], which any two applications can also use to communicate directly and without going through the message bus daemon.<ref>{{cite web | ||
| url = http://www.freedesktop.org/Software/dbus/ | |||
| title = dbus | section = What is D-Bus? | |||
| date = 2014-01-20 | accessdate = 2014-10-14 | |||
| publisher = ] | |||
}}</ref> | |||
{{As of|2014|01}}, there is an ongoing development project called ''kdbus'' that aims to replace D-Bus with a kernel-mediated peer-to-peer ] mechanism. Beside performance improvements, kdbus would have advantages arising from already existing ] features such as ] and auditing.<ref>{{cite web | {{As of|2014|01}}, there is an ongoing development project called ''kdbus'' that aims to replace D-Bus with a kernel-mediated peer-to-peer ] mechanism. Beside performance improvements, kdbus would have advantages arising from already existing ] features such as ] and auditing.<ref>{{cite web | ||
Line 47: | Line 57: | ||
]. Binder is the counterpart used on ].]] | ]. Binder is the counterpart used on ].]] | ||
D-Bus has three ]s:<ref name=" |
D-Bus has three ]s:<ref name="linux-journal" /> | ||
⚫ | </ref> | ||
* '''<tt>libdbus</tt>''' - a library that allows two applications to connect to each other and exchange messages | * '''<tt>libdbus</tt>''' - a library that allows two applications to connect to each other and exchange messages |
Revision as of 09:47, 14 October 2014
"DBus" redirects here. Not to be confused with Dbus.Developer(s) | Red Hat and the community |
---|---|
Stable release | 1.8.8 / September 16, 2014; 10 years ago (2014-09-16) |
Repository | |
Written in | C |
Operating system | Cross-platform |
Type | |
License | GNU General Public License version 2 or later, or Academic Free License 2.1 |
Website | www |
D-Bus is a free and open-source inter-process communication (IPC) system, allowing multiple, concurrently-running computer programs (processes) to communicate with one another.
D-Bus provides the following functionality:
- communication between desktop applications in the same desktop session; to allow integration of the desktop session as a whole, and address issues of the process lifecycle
- communication between the desktop session and the operating system, where the operating system would typically include the kernel and any system daemons or processes
Heavily influenced by the DCOP system used by versions 2 and 3 of KDE, D-Bus has replaced DCOP in the KDE 4 release. An implementation of D-Bus supports most POSIX operating systems, and a port for Windows exists. It is used by Qt 4 and GNOME. In GNOME it has gradually replaced most parts of the earlier Bonobo mechanism. It is also used by Xfce.
D-Bus is developed as part of the freedesktop.org project.
Design
D-Bus is a message bus system, or a medium for interprocess communication that allows the applications to communicate and exchange messages between themselves. Thus, D-Bus provides additional or simplifies existing functionality to the applications, including information sharing, modularity and privilege separation. For example, information on an incoming voice call received through Bluetooth or Skype can be propagated and interpreted by any currently running music player, which can react by muting the volume or pausing playback until the call is finished.
Most systems implement a privileged system channel, together with a private channel for each logged-in user, so that available information in the D-Bus registry can be restricted. Accordingly, the D-Bus service includes both a system daemon (for events such as "new hardware device added" or "printer queue changed") and a distinct daemon for each user login session (for general inter-process communication needs between applications started by the particular user). Applications communicate with daemons over Unix domain sockets. The message bus is built on top of a general one-to-one message passing framework, which any two applications can also use to communicate directly and without going through the message bus daemon.
As of January 2014, there is an ongoing development project called kdbus that aims to replace D-Bus with a kernel-mediated peer-to-peer inter-process communication mechanism. Beside performance improvements, kdbus would have advantages arising from already existing Linux kernel features such as namespaces and auditing.
Architecture
D-Bus has three architectural layers:
- libdbus - a library that allows two applications to connect to each other and exchange messages
- dbus-daemon - a message-bus daemon executable, built on
libdbus
, that multiple applications can connect to. The daemon can route messages from one application to zero or more applications, thereby implementing the publish/subscribe paradigm. - wrapper libraries based on particular application frameworks
In 2013 the systemd project rewrote libdbus in an effort to simplify the code, but it turned out to significantly increase the performance of D-Bus as well. In preliminary benchmarks, BMW found that the systemd D-Bus library increased performance by 360%.
Mechanisms
Messages received over a D-Bus connection get routed to a specific object, not to a process. It thus appears to clients as if they are interacting with an object whether or not there actually is an object on the other side.
D-Bus defines a name for each object which looks like (but is not actually) a POSIX filesystem path, e.g., /org/kde/kspread/sheets/3/cells/4/5. D-Bus objects' names are conventionally namespaced to help with independently developing code modules. Namespaces are generally prefixed with the developer's reserved domain name components (e.g. /org/kde).
See also
- Linux on the desktop
- Common Language Infrastructure
- Common Object Request Broker Architecture
- Component Object Model
- Distributed Component Object Model
- Foreign function interface
- Java remote method invocation
- Remote procedure call
- XPCOM
References
- "Announcing dbus 1.8.8 (security fix release)". 2014-09-16.
- Havoc's Blog July, 2007
- ^ Robert Love (2005-01-05). "Get on the D-BUS". Linux Journal. Retrieved 2014-10-14.
{{cite web}}
: Italic or bold markup not allowed in:|publisher=
(help) - "dbus". freedesktop.org. 2014-01-20. Retrieved 2014-10-14.
{{cite web}}
:|section=
ignored (help) - Jake Edge (2013-05-30). "ALS: Linux interprocess communication and kdbus". LWN.net. Retrieved 2014-04-11.
- Jonathan Corbet (2014-01-13). "The unveiling of kdbus". LWN.net. Retrieved 2014-04-11.
- "ALS: Linux inter-process communication and kdbus". LWN.net. 2013-05-30. Retrieved 2013-11-13.
- "D-Bus Tutorial".
External links
- D-Bus home page at Freedesktop.org
- Introduction to D-Bus on the Freedesktop.org wiki
Free and open-source software projects hosted by freedesktop.org | ||||||||
---|---|---|---|---|---|---|---|---|
OS components |
| |||||||
Libraries | ||||||||
Frameworks | ||||||||
Meetings |
{{IPC athlete}} template missing ID and not present in Wikidata.
Categories: