News for hackers. Stuff that matters.
Re:Systemd, 10 years later (2020) by junon on Sunday January 09, 2022 @02:23AM (#29861070)
The only bit about SystemD I'm not fully sold on is D-Bus. I love that everything is exposed via D-Bus, but the C API is incredibly difficult to reason about. I've tried writing some higher-level bindings for it and it's still pretty difficult to get right.

Perhaps at some point they'll switch to something that's established instead of maintaining their own IPC protocol.

Re:Systemd, 10 years later (2020) by awrmc on Sunday January 09, 2022 @01:14PM (#29865834)
D-Bus is the established IPC on desktop Linux. The libdbus library is pretty old and not great, you'll have better luck using one of the other implementations. I can recommend a few:

- GDBus, if you're developing for GNOME

- QtDBus, if you're developing for KDE

- sd_bus, if you're writing low-level C

- zbus, if you're using Rust

For other languages, you'll want to look for bindings to one of those libraries, instead of bindings to libdbus.

Re:Systemd, 10 years later (2020) by Arch-TK on Sunday January 09, 2022 @04:18AM (#29861727)
I've tried writing higher level bindings on top of libdbus. Once I realised that libdbus was not designed for writing reliable or sane software (there's an error? there's an error! what is it? who knows) I decided to try writing my own implementation of the dbus protocol (the intention was to write C code generators for automating away writing a lot of the boilerplate). Once I had read the specification once I gave up. dbus is the most hideous protocol and most hideous library, its ONLY advantage is its ubiquity.
Re:Systemd, 10 years later (2020) by awrmc on Sunday January 09, 2022 @01:47PM (#29866141)
I disagree with this, in my experience D-Bus is very similar to other IDLs like DCOM, protobuf or ASN.1. If you're familiar with those, D-Bus should actually be easy in comparison.
Re:Systemd, 10 years later (2020) by junon on Sunday January 09, 2022 @04:24AM (#29861765)
Yep. Sounds like we went down pretty much exactly the same path. I came to the same conclusion after attempting the same thing.