News for hackers. Stuff that matters.
Re:Who Watches Watchmen? – Integrating Elixir Applications w... by bytelines on Monday January 17, 2022 @06:14PM (#29972813)
> Different tools take different approach to solve that issue there. systemd take approach that is derived from launchd - do not do stuff, that is not needed. It achieved that by merging D-Bus into the systemd itself, and then making all service to be D-Bus daemons (which are started on request), and additionally it provides a bunch of triggers for that daemons. We can trigger on action of other services (obviously), but also on stuff like socket activity, path creation/modification, mounts, connection or disconnection of device, time events, etc.

Does this require a good understanding of D-Bus to understand? Because I got completely lost on this...

Re:Who Watches Watchmen? – Integrating Elixir Applications w... by LukeShu on Monday January 17, 2022 @07:25PM (#29973328)
I'm not sure the author has an understanding of what D-Bus is. The article doesn't really discuss D-Bus at all.

D-Bus is not merged in to systemd. When systemd notices that a service it started is named "dbus", it then registers itself as a D-Bus service; programs (like `systemctl` or `poweroff` then use use D-Bus to send it commands. For comparison, sysvinit accepts commands via a named pipe (`/run/initctl`, or `/dev/initctl` for older versions of sysvinit).

Most services are not made to be D-Bus daemons. A service is only made to be a D-Bus daemon if its unit file says `Type=dbus`; none of the examples in the article say this. You can use D-Bus to ask systemd to start or stop a given service; same as you could use `telinit` to use /run/initctl to tell sysvinit to change the runlevel; this does not make a service started this way a D-Bus service.

The NOTIFY_SOCKET and watchdog functionality that the article discusses... this functionality has nothing to do with D-Bus.

Re:Who Watches Watchmen? – Integrating Elixir Applications w... by hauleth on Tuesday January 18, 2022 @12:11PM (#29982211)
That section was removed as it was leftover from the early drafts.
Re:Who Watches Watchmen? – Integrating Elixir Applications w... by bytelines on Monday January 17, 2022 @09:34PM (#29974321)
I see! Thank you for taking the time to write that out, much appreciated.
Re:Who Watches Watchmen? – Integrating Elixir Applications w... by hauleth on Monday January 17, 2022 @06:55PM (#29973092)
This article? Not at all. Does you need to understand D-Bus to use systemd? Not at all. It is just implementation detail. I have an idea to leverage that in future to slap distributed service management on top of systemd, but in normal operations you will probably never spot that everything is D-Bus backed.
Re:Who Watches Watchmen? – Integrating Elixir Applications w... by hauleth on Tuesday January 18, 2022 @12:10PM (#29982200)
I have removed that part as it was accidental leftover from the early drafts that I forgot to remove.