问题
When i studied about Linux interprocess Communications, i have known there were some method as: pipe, message queue, socket, signal, shared memory, semaphore and there is no method named Dbus.
But today, when i research about Dbus, i read that: "D-Bus is a system for interprocess communication (IPC)" (See that link: https://en.wikipedia.org/wiki/D-Bus)
So my question is: What is the different between DBus and other IPC methods?
回答1:
A one to one ipc method has a large group of cooperating process can cause a dense mesh. But in case of a Dbus each process can connect to any number of process provided with a grant access. On a common single shared channel a user can connect with his own session or a new session without interfering the session of other user. This greatly increase the performance
Refer the link
https://blogs.gnome.org/abustany/2010/05/20/ipc-performance-the-return-of-the-report/
This shows the comparison of the DBus performance against a custom IPC system. You get a better understanding of the performance of the Dbus
回答2:
There is no technical, but historical difference.
D-Bus didn't used to be a Linux (i.e. kernel) IPC, but an additional middleware IPC. But in the course of introduction of systemd, D-Bus became for several Linux distributions a part of the basic system.
来源:https://stackoverflow.com/questions/33887063/difference-between-dbus-and-other-interprocess-communications-method