LWN: Comments on "The D-Bus Broker project" https://lwn.net/Articles/731755/ This is a special feed containing comments posted to the individual LWN article titled "The D-Bus Broker project". en-us Sat, 01 Nov 2025 09:27:02 +0000 Sat, 01 Nov 2025 09:27:02 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net The D-Bus Broker project https://lwn.net/Articles/732313/ https://lwn.net/Articles/732313/ mathstuf <div class="FormattedComment"> Well, if it were me, I'd make sure the state could be decorated with a `#[derive(Deserialize, Serialize)]` and then just shove it over a pipe and initialize it that way ;) . File descriptors can follow along afterwards. It's a pity C doesn't have something as easy (maybe CapnProto or its ilk?).<br> </div> Tue, 29 Aug 2017 21:53:58 +0000 The D-Bus Broker project https://lwn.net/Articles/732284/ https://lwn.net/Articles/732284/ jiiksteri <div class="FormattedComment"> <font class="QuotedText">&gt; The current situation, where an upgrade of the dbus daemon (e.g., due to a security issue) requires a reboot, is a serious pain point.</font><br> <p> Given that it's possible to pass fds across a unix domain socket with SCM_RIGHTS messages, wouldn't a seamless upgrade be possible with some co-operation between the old and new versions? In theory at least.<br> <p> Of course all that requires you to quiesce the broker enough so that its state can be enumerated and serialized. And you're stuck with maintaining the fragile upgrade protocol, which is soon more code than the actual broker. And you'll find yourself needing to consider the upgrade protocol every time you change some internal state details in the broker.<br> <p> Suddenly you have a whole new IPC mechanism in your IPC mechanism and everything is miserable :)<br> <p> </div> Tue, 29 Aug 2017 16:48:36 +0000 The D-Bus Broker project https://lwn.net/Articles/732229/ https://lwn.net/Articles/732229/ bpearlmutter <div class="FormattedComment"> This is really a killer feature, perhaps *the* killer feature. The current situation, where an upgrade of the dbus daemon (e.g., due to a security issue) requires a reboot, is a serious pain point. Especially when systems are set up to do unattended upgrades for security-critical packages.<br> </div> Tue, 29 Aug 2017 09:43:37 +0000 The D-Bus Broker project https://lwn.net/Articles/732189/ https://lwn.net/Articles/732189/ kreijack <div class="FormattedComment"> DBus Broker would be able to support a restart ? I.e. serializing its state on disk, restart the executable and load the old state ? If I try to restart DBus, everything break.<br> I know that it is difficult due to the connection, however it is useful in case of an update.<br> <p> <p> </div> Mon, 28 Aug 2017 18:08:22 +0000 The D-Bus Broker project https://lwn.net/Articles/732085/ https://lwn.net/Articles/732085/ flussence <div class="FormattedComment"> <font class="QuotedText">&gt;Why is _new_ system software still developed in C? Shouldn't Rust or Go be the default choice for new projects at this point?</font><br> These programs are written by humans, you're not offering a magic wand that can go s/C/Rust/g on the decades of programming knowledge stored in their head, and quite frankly most people have started to tune out unsolicited suggestions like this as spam.<br> </div> Sat, 26 Aug 2017 15:15:23 +0000 The D-Bus Broker project https://lwn.net/Articles/732084/ https://lwn.net/Articles/732084/ flussence <div class="FormattedComment"> <font class="QuotedText">&gt;What world would have made "/org/kde/kspread/sheets/3/cells/4/5" useful to technical endusers as it's the example in the dbus introduction?</font><br> That looks a bit like XPath. Now I'm stuck imagining what the world could be like if we just had a systemwide DOM API instead of D-Bus...<br> </div> Sat, 26 Aug 2017 15:01:51 +0000 The D-Bus Broker project https://lwn.net/Articles/732069/ https://lwn.net/Articles/732069/ liam <div class="FormattedComment"> I know this is bad form, but that was a great comment:)<br> </div> Sat, 26 Aug 2017 02:46:36 +0000 The D-Bus Broker project https://lwn.net/Articles/732063/ https://lwn.net/Articles/732063/ njs There are lots of architectures where <a rel="nofollow" href="https://en.wikipedia.org/wiki/List_of_Linux-supported_computer_architectures">you can run Linux</a>, but where Rust has <a rel="nofollow" href="https://forge.rust-lang.org/platform-support.html">missing or limited support</a>. You may or may not care about these architectures in any given project, the Rust toolchain is getting better at this over time, etc., but even if you're only interested in Linux then it is still an issue to think about. Sat, 26 Aug 2017 00:51:25 +0000 The D-Bus Broker project https://lwn.net/Articles/732048/ https://lwn.net/Articles/732048/ ncm <div class="FormattedComment"> A better question might be, "Shouldn't C++ be the default choice for new projects?"<br> <p> Rust and Go are still too immature in any number of ways -- portable to too few target architectures, too uncertain of future vigor, too little-known, with too few independent implementations, and too little third-party tool support -- to be a wise choice of language for ambitious projects today. In ten or twenty years each might be mature enough (or fading, and weren't you wise to have avoided it?). While it should be obvious to all that C is too problem-ridden to be a good choice for new projects, and is frankly too expensive to code in, C++, used well, happily avoids all of C's problems, is as mature, portable, and vigorous as anyone can ask for, and is markedly *faster* than C, besides.<br> <p> But perhaps an even better question is, why should any new project depend on D-bus, and confine itself to such a limited target base? The overwhelming majority of programming targets worldwide have some sort of Linux kernel, but no D-bus. While D-bus depends on Posix/Linux-specific features, nothing D-bus does couldn't be done just as well in some other messaging system that could work equally well in many environments.<br> <p> Maybe a better choice for the future would be to adapt current D-bus subscribers to work with whatever such apparatus Android provides, and implement a Free version of that, with a published wire protocol to enable multiple language bindings.<br> </div> Fri, 25 Aug 2017 20:43:00 +0000 The D-Bus Broker project https://lwn.net/Articles/731987/ https://lwn.net/Articles/731987/ micka <div class="FormattedComment"> No, really, I don't think HTML is a good language to implement low level OS plumbing.<br> </div> Fri, 25 Aug 2017 08:47:17 +0000 The D-Bus Broker project https://lwn.net/Articles/731959/ https://lwn.net/Articles/731959/ lsl <div class="FormattedComment"> <font class="QuotedText">&gt; For infrastructure pieces of software it's also imo not a good choice to use go, because you can't easily access libraries written in it from other languages.</font><br> <p> This hasn't really been the case for quite some time now. You can export a C API from your Go code and provide it in the form of a static archive or shared library. The requirement that the Go runtime has to provide the executable's entry point is long gone.<br> <p> Still, I wouldn't be surpised if putting this inside a single process together with, say, a JVM might uncover some interesting effects. OTOH, it seems to work fine on Android.<br> </div> Fri, 25 Aug 2017 03:06:20 +0000 The D-Bus Broker project https://lwn.net/Articles/731947/ https://lwn.net/Articles/731947/ clopez <div class="FormattedComment"> This project claims to be Linux-only on purpose. Portability is not an argument in this case<br> </div> Fri, 25 Aug 2017 01:30:42 +0000 The D-Bus Broker project https://lwn.net/Articles/731931/ https://lwn.net/Articles/731931/ liam <blockquote><h4>3.2. Priority of Constituencies</h4> In case of conflict, consider users over authors over implementors over specifiers over theoretical purity. In other words costs or difficulties to the user should be given more weight than costs to authors; which in turn should be given more weight than costs to implementors; which should be given more weight than costs to authors of the spec itself, which should be given more weight than those proposing changes for theoretical reasons alone. Of course, it is preferred to make things better for multiple constituencies at once. </blockquote> <br> <a href="https://www.w3.org/TR/html-design-principles/#priority-of-constituencies">HTML Design Principles</a> Thu, 24 Aug 2017 22:11:31 +0000 The D-Bus Broker project https://lwn.net/Articles/731929/ https://lwn.net/Articles/731929/ dtlin <div class="FormattedComment"> I think it meets its original ambitions. D-Bus frees up developers from developing their own ad-hoc IPC systems over and over again. The end effect is not that users see the underlying technology, but that they get more or better apps.<br> </div> Thu, 24 Aug 2017 21:54:45 +0000 The D-Bus Broker project https://lwn.net/Articles/731928/ https://lwn.net/Articles/731928/ andresfreund <div class="FormattedComment"> <font class="QuotedText">&gt; Why is _new_ system software still developed in C? Shouldn't Rust or Go be the default choice for new projects at this point?</font><br> <p> At the moment the portability just isn't there for some types of projects. For projects intended to run on a wide variety of platforms, including ones which aren't widely popular but still commercially relevant in some fields (say AIX), you really can't use rust or go. For infrastructure pieces of software it's also imo not a good choice to use go, because you can't easily access libraries written in it from other languages. And rust still has build performance issues. There's project intentionally forgoing c++ because the support across platforms isn't great... (I think that's going too far though). I think go partially isn't there due to NIH syndrom (e.g. static linking, old virtual memory discussions). Rust seems more promising.<br> <p> Probably more controversially, I think it's also currently not necessarily viable to write complex lower level pieces of software in either yet. I spend most of my time working on RDBMs and some of the low-levely stuff isn't quite there imo, although I have high hopes.<br> </div> Thu, 24 Aug 2017 21:53:48 +0000 The D-Bus Broker project https://lwn.net/Articles/731924/ https://lwn.net/Articles/731924/ tuna <div class="FormattedComment"> "Why is _new_ system software still developed in C? Shouldn't Rust or Go be the default choice for new projects at this point?"<br> <p> Why do people think that Rust and Go are similar and have the same use cases?<br> </div> Thu, 24 Aug 2017 20:39:30 +0000 The D-Bus Broker project https://lwn.net/Articles/731921/ https://lwn.net/Articles/731921/ pizza <div class="FormattedComment"> Sure, I can always open a TCP socket to Google and manually construct the XML-RPC OATH requests to authenticate tokens against their systems, but why would I do that by hand when I can just use a tool already written that provides a higher-level API to hide all of those messy details?<br> <p> (At some point it becomes necessary to care about those details -- in NetworkManager's case, using nmcli means there's no way to subscribe to events, for example)<br> </div> Thu, 24 Aug 2017 20:33:39 +0000 The D-Bus Broker project https://lwn.net/Articles/731918/ https://lwn.net/Articles/731918/ alogghe <div class="FormattedComment"> That's a neutral observation.<br> <p> If you think about it, you'll realize it has nothing to do with anything I was talking about.<br> <p> Would you use dbus to automate a server deployment?<br> <p> When looking at the ansible sources it appears the answer is "not really".<br> <p> Ansible uses dbus+nmcli to list the interfaces and then any manipulation appears to be all shell calls.<br> <p> I'm not anti-dbus, I just think its fallen far short of its original ambitions. Maybe that's fine with the people using it these days.<br> </div> Thu, 24 Aug 2017 20:12:45 +0000 The D-Bus Broker project https://lwn.net/Articles/731920/ https://lwn.net/Articles/731920/ smurf <div class="FormattedComment"> Yeah, but the problem is that it's apparently far easier to fork off nmcli than to open a dbus socket to talk to NetworkManager, even though that would be a whole lot more efficient and whatnot.<br> </div> Thu, 24 Aug 2017 20:07:48 +0000 The D-Bus Broker project https://lwn.net/Articles/731912/ https://lwn.net/Articles/731912/ pizza <div class="FormattedComment"> nmcli interacts with the NetworkManager daemon using the same set of d-bus APIs that any other application can use if they want to interact with NetworkManager. It's an excellent example of a project eating its own dogfood.<br> <p> </div> Thu, 24 Aug 2017 19:24:24 +0000 The D-Bus Broker project https://lwn.net/Articles/731913/ https://lwn.net/Articles/731913/ Cyberax <div class="FormattedComment"> nmcli uses dbus internally. <br> </div> Thu, 24 Aug 2017 19:23:25 +0000 The D-Bus Broker project https://lwn.net/Articles/731909/ https://lwn.net/Articles/731909/ alogghe <div class="FormattedComment"> Actually NetworkManager is a great concrete example.<br> <p> In 2017 most people would go directly to nmcli to automate any change to their network settings.<br> <p> In 2005-2006 I think the dbus people hoped for different?<br> <p> Maybe dbus has found the limits of its niche and, as I said, that's great.<br> </div> Thu, 24 Aug 2017 19:07:25 +0000 The D-Bus Broker project https://lwn.net/Articles/731907/ https://lwn.net/Articles/731907/ jcpunk <div class="FormattedComment"> I realize I'm a bit obsessed with AMQP, but could it be a way forward (and an implicit way to add network aware behavior if so inclined) rather than building a new standard behavior set?<br> </div> Thu, 24 Aug 2017 18:53:35 +0000 The D-Bus Broker project https://lwn.net/Articles/731906/ https://lwn.net/Articles/731906/ richard77 <div class="FormattedComment"> Thanks for the answer. <br> I misunderstood the paragraph regarding "direct activation". <br> </div> Thu, 24 Aug 2017 18:49:50 +0000 The D-Bus Broker project https://lwn.net/Articles/731904/ https://lwn.net/Articles/731904/ alogghe <div class="FormattedComment"> Yes, I didn't want to type the paragraph you typed in the middle of my sentence.<br> </div> Thu, 24 Aug 2017 18:46:30 +0000 The D-Bus Broker project https://lwn.net/Articles/731903/ https://lwn.net/Articles/731903/ nybble41 <div class="FormattedComment"> <font class="QuotedText">&gt; It [D-Bus] seems to have settled in as a useful tool to people with commit rights on the kde and gnome git.</font><br> <p> D-Bus is used for more than just KDE and Gnome. For example, udisks, systemd, NetworkManager, PolicyKit, and PulseAudio all expose APIs through D-Bus. While these services are used _by_ KDE and Gnome, they all have command-line interfaces (besides e.g. dbus-send or qdbus) and GUIs for other graphical desktop environments.<br> </div> Thu, 24 Aug 2017 18:32:17 +0000 The D-Bus Broker project https://lwn.net/Articles/731895/ https://lwn.net/Articles/731895/ alogghe <div class="FormattedComment"> The "api" is the surface area of all the programs that expose a Dbus interface. The ecosystem and it's utility to it's users.<br> <p> My question is overly broad and probably out of scope as I stated.<br> <p> What world would have made "/org/kde/kspread/sheets/3/cells/4/5" useful to technical endusers as it's the example in the dbus introduction?<br> <br> <a href="https://www.freedesktop.org/wiki/IntroductionToDBus/">https://www.freedesktop.org/wiki/IntroductionToDBus/</a><br> <p> When those docs were written people seem to have had broader ambitions.<br> <p> I don't see people (mostly engineers) that use Linux desktops ever pointing to Dbus as a solution to their problems in 2017.<br> <p> I don't see people writing server apps that speak it to each other.<br> <p> I don't see end user applications making much of it.<br> <p> It seems to have settled in as a useful tool to people with commit rights on the kde and gnome git. That's actually great if that's the limit of it's goals.<br> <p> In using dbus in writing applications I've found libraries implementing it verbose, underutilized by applications (example- it was easier to just use an X11 binding to monitor window titles), and when I walk away from that section of the codebase it takes some work to reengage with "dbus" when I get back to it.<br> <p> My response to it isn't "I should use more dbus", it's "I should rip this out and use grpc".<br> <p> Even if I made a great desktop app that everyone used daily, I don't see that they would use a dbus interface that I put a bunch of work into making.<br> </div> Thu, 24 Aug 2017 18:04:39 +0000 The D-Bus Broker project https://lwn.net/Articles/731882/ https://lwn.net/Articles/731882/ luto <div class="FormattedComment"> Semi-shameless plug: it might be worth benchmarking on tip/x86/mm. Context switches mostly don't flush the TLB on that branch, and this type of workload may be significantly faster if everything is on the same CPU.<br> </div> Thu, 24 Aug 2017 15:31:34 +0000 The D-Bus Broker project https://lwn.net/Articles/731874/ https://lwn.net/Articles/731874/ mathstuf <div class="FormattedComment"> There's already a marshalling library: <a href="https://github.com/srwalter/dbus-serialize">https://github.com/srwalter/dbus-serialize</a><br> </div> Thu, 24 Aug 2017 14:49:00 +0000 The D-Bus Broker project https://lwn.net/Articles/731868/ https://lwn.net/Articles/731868/ dvdhrm <div class="FormattedComment"> <font class="QuotedText">&gt; From the "Deviations" document linked in the blog post I understand that dbus-broker requires systemd. Is that correct?</font><br> <p> No, that's not correct.<br> <p> `dbus-broker` is the binary that implements the D-Bus Message Bus and it has no mandatory dependencies other than libc.<br> <p> However, if you want the compatibility launcher, which provides integration compatibility to dbus-daemon, including parsing their desktop-file format, their xml-configuration, and supporting systemd-activation, then yes, you need glib, libsystemd, and libexpat.<br> <p> IOW, we strictly split between the dbus-broker and the integration part. We optionally provide a default integration, so people can actually deploy the broker. Our main focus is the dbus-broker, though, and we're committed to support any other 3rd party integration.<br> </div> Thu, 24 Aug 2017 14:17:39 +0000 The D-Bus Broker project https://lwn.net/Articles/731842/ https://lwn.net/Articles/731842/ richard77 <div class="FormattedComment"> From the "Deviations" document linked in the blog post I understand that dbus-broker requires systemd. Is that correct? <br> </div> Thu, 24 Aug 2017 12:36:56 +0000 The D-Bus Broker project https://lwn.net/Articles/731836/ https://lwn.net/Articles/731836/ joib <div class="FormattedComment"> s/buy/by<br> <p> Pointless sentence here to get past LWN 10-character comment limit.<br> </div> Thu, 24 Aug 2017 11:47:08 +0000 The D-Bus Broker project https://lwn.net/Articles/731835/ https://lwn.net/Articles/731835/ joib <div class="FormattedComment"> No, just pointing out that as far as "uncomfortable experience" is a/the metric to go buy, the continued use of memory unsafe languages like C comes at a cost as well.<br> </div> Thu, 24 Aug 2017 11:42:30 +0000 The D-Bus Broker project https://lwn.net/Articles/731834/ https://lwn.net/Articles/731834/ jrigg <div class="FormattedComment"> So you're offering your services to the project as a Rust programmer?<br> </div> Thu, 24 Aug 2017 11:25:09 +0000 The D-Bus Broker project https://lwn.net/Articles/731833/ https://lwn.net/Articles/731833/ joib <div class="FormattedComment"> Unless you're a psychopath, your users getting p0wned due to yet another buffer overflow exploit is also an uncomfortable experience. ;)<br> </div> Thu, 24 Aug 2017 10:56:40 +0000 The D-Bus Broker project https://lwn.net/Articles/731832/ https://lwn.net/Articles/731832/ dvdhrm <div class="FormattedComment"> <font class="QuotedText">&gt; bus1 has some interesting properties that D-BUS misses, like guaranteed causality.</font><br> <p> True. bus1 guarantees causality even if you use side-channels, as long as the cause and the final effect are both bus1 operations. D-Bus cannot guarantee this, as it has an intermediate hop.<br> <p> But just to be clear: D-Bus guarantees total global order, which implies causal order, but only regarding D-Bus interactions. Side-channels (like two peers communicating via unix-signals, etc.) are not considered.<br> <p> <font class="QuotedText">&gt; It looks like it can also replace Android binder (?).</font><br> <p> Theoretically, yes. Practically, who knows... Lots of politics involved there.<br> </div> Thu, 24 Aug 2017 10:30:29 +0000 The D-Bus Broker project https://lwn.net/Articles/731831/ https://lwn.net/Articles/731831/ dvdhrm <div class="FormattedComment"> <font class="QuotedText">&gt; The D-Bus Api is unpleasant to work with, what could be done to fix that?</font><br> <p> What is "The D-Bus API"? D-Bus is a specification and there are many different libraries that provide the most different APIs. If one of them is unpleasant to work with, try a different one? If all of them are awkward, maybe you can suggest an API that would be nicer?<br> <p> I bet all IPC library writers are more than eager to find the perfect API, but it is no easy job. And this problem is not limited to D-Bus.<br> <p> <font class="QuotedText">&gt; What is the overlap with the Android intents system? What could be learned or repurposed?</font><br> <p> I don't see an overlap with the Android intents system. It is implemented on an upper layer. D-Bus provides the IPC and recommends use-cases. What you end up doing with it is beyond the scope of D-Bus.<br> <p> <font class="QuotedText">&gt; My sense is that Dbus mostly works for people that write KDE and Gnome but it isn't for many others.</font><br> <font class="QuotedText">&gt; Applications writers should find it easy to use and expose their applications to dbus.</font><br> <font class="QuotedText">&gt; Linux users should be able easily browse and consume those services such that application writers are encouraged to write good dbus services.</font><br> <p> This is not really a question, but a mere statement. Yes, we can do better in exposing more convenient APIs, or better language integration. Help welcome!<br> <p> D-Bus is in no way perfect. I think the blog post tries to describe some of its shortcomings (and we are aware of many more). But D-Bus is around and not going away, and I am not aware of a serious competitor, yet. A lot of us are working on better alternatives, but unless they gain traction, we intend to simultaneously improve D-Bus and make sure the worlds stay compatible.<br> </div> Thu, 24 Aug 2017 10:24:56 +0000 The D-Bus Broker project https://lwn.net/Articles/731829/ https://lwn.net/Articles/731829/ dvdhrm <div class="FormattedComment"> I completely agree.<br> <p> We actually considered writing the marshaling layers of dbus-broker in Rust, but it takes more than a few months to feel confident enough in a language to actually ship the code. There are definitely plans to use Rust in ongoing work, though.<br> </div> Thu, 24 Aug 2017 10:06:13 +0000 The D-Bus Broker project https://lwn.net/Articles/731824/ https://lwn.net/Articles/731824/ mpr22 Internalizing Rust's distinctive language properties (ownership and lifetimes) to the point that you find them "intuitive" takes time and effort, and until you've done so, writing nontrivial software in Rust is an uncomfortable experience for anyone who's accustomed to programming in an unsafe language. Thu, 24 Aug 2017 09:34:08 +0000 The D-Bus Broker project https://lwn.net/Articles/731819/ https://lwn.net/Articles/731819/ kragil <div class="FormattedComment"> This is probably a unpopular comment on LWN, but:<br> <p> Why is _new_ system software still developed in C? Shouldn't Rust or Go be the default choice for new projects at this point?<br> <p> (IMNSHO They may not be as fast if you know what you are doing, but they are easier and safer for sure and they could produce software that is easier to maintain and they make modern multicore systems more accessable + more.)<br> </div> Thu, 24 Aug 2017 06:50:15 +0000