Integration / D Bus Interview Questions
What is the difference between D-Bus and using a Unix domain socket directly?
A raw Unix domain socket gives you a byte stream (or datagrams) between two endpoints with no built-in structure: whatever framing, routing, discovery, and type safety your application needs, you have to design and implement yourself.
D-Bus is built on top of Unix domain sockets (or, less commonly, TCP) but adds a standardized message format, a typed argument system, object paths and interfaces for addressing, a broadcast mechanism for signals, service discovery through well-known names, and a shared bus daemon that routes messages between many processes rather than requiring a dedicated socket per pair of communicating processes.
The trade-off is overhead and indirection: a raw socket between two processes that already know exactly how to talk to each other can be faster and simpler, while D-Bus is the better choice specifically when many independent processes need a shared, discoverable, standardized way to talk to each other without every pair inventing its own protocol.
More Related questions...