This is a D-BUS sample by using sd-bus includes testing to emit signals and to call methods with D-BUS architecture.
There are other d-bus packages, like glib. However, accourding to the testing by IBM, sd-bus is the fastest, so building a Ubuntu IPC can hinge mainly on sd-bus. For more information concerning the performance, see here.
Testing OS: ubuntu-16.04.2-desktop-amd64
$ sudo apt-get install libsystemd-dev
$ make all
$ ./serviced-a
Open a new terminal
$ ./serviced-b
Some useful tools for debugging:
D-Feet- install from Ubuntu Softwarebusctl- e.g. busctl --user tree INTERFACE_NAMEdbus-monitor- execute from CLI