"DBus Embedded" - a clean break

David Zeuthen zeuthen at gmail.com
Wed Jan 26 06:58:47 PST 2011


On Wed, Jan 26, 2011 at 9:20 AM, Philip Van Hoof <spam at pvanhoof.be> wrote:
> Unfortunately is a shiny new D-Bus library making a similar mistake with
> its g_dbus_message_to_blob in write_message_continue_writing and
> maybe_write_next_message stuff in its gdbusprivate.c.

No, Philip, it's not a mistake that GDBus is written in this way so
please don't call it a mistake.

I'll repeat what I've said earlier: if you want low latency / high
bandwidth, the D-Bus protocol greatly limits what you can do (instead,
mmap binary data between processes, use raw sockets etc. - look at
dconf/GVfs for inspiration). Additionally, D-Bus / message buses can
still be a great help in orchestrating custom IPC given the number of
guarantees (name ownership, validation etc.) it gives you.

Think about it. Why would you put constraints on your app in the name
of "we need to use the same IPC everywhere"? Instead, optimize the hot
spots of your IPC by moving parts of it away from D-Bus to e.g.
mmap(2) or a socket or whatever. Just like you'd optimize the inner
loop of a 3D engine by writing the scan converter in assembly instead
of C (my 3D skills are mid-90 pre-shader vintage so go easy on the

This notion that we absolutely need to fit square pegs in round holes
need to stop.


More information about the dbus mailing list