From owner-freebsd-hackers@freebsd.org Sat Jan 2 13:42:13 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5814CA5E588 for ; Sat, 2 Jan 2016 13:42:13 +0000 (UTC) (envelope-from j.deboynepollard-newsgroups@ntlworld.com) Received: from know-smtprelay-omc-1.server.virginmedia.net (know-smtprelay-omc-1.server.virginmedia.net [80.0.253.65]) by mx1.freebsd.org (Postfix) with ESMTP id BA3AE1A1D for ; Sat, 2 Jan 2016 13:42:11 +0000 (UTC) (envelope-from j.deboynepollard-newsgroups@ntlworld.com) Received: from [192.168.1.100] ([86.10.211.13]) by know-smtprelay-1-imp with bizsmtp id 11iA1s0180HtmFq011iABf; Sat, 02 Jan 2016 13:42:10 +0000 X-Originating-IP: [86.10.211.13] X-Spam: 0 X-Authority: v=2.1 cv=AJvf2gUA c=1 sm=1 tr=0 a=SB7hr1IvJSWWr45F2gQiKw==:117 a=SB7hr1IvJSWWr45F2gQiKw==:17 a=NLZqzBF-AAAA:8 a=IkcTkHD0fZMA:10 a=e5mUnYsNAAAA:8 a=4Z-9RFdKAAAA:8 a=Cc3N9xrbAAAA:8 a=bg7qaaw2AAAA:8 a=3ygIBvSvAAAA:8 a=DwzA4venf-2cd0zNjlUA:9 a=uQUoIata3h4V7lox:21 a=X1z88faUs4GXzAYo:21 a=QEXdDO2ut3YA:10 a=7Vf-TXLDIfkA:10 a=-FEs8UIgK8oA:10 a=NWVoK91CQyQA:10 From: Jonathan de Boyne Pollard Subject: Re: relaunchd: a portable clone of launchd To: FreeBSD Hackers Message-ID: <5687D3A9.5050400@NTLWorld.com> Date: Sat, 2 Jan 2016 13:42:01 +0000 User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Jan 2016 13:42:13 -0000 Mark Heily: > Then, if a program cares deeply about using the most up-to-date > timezone setting, it can subscribe to notifications about changes in > the time.zone key, instead of constantly polling for changes to > /etc/localtime. > If a program is constantly polling for changes to /etc/localtime, then it should at minimum be rewritten to use kevent/kqueue. But that aside: Mark Heily: > In a nutshell, [stated] is a generic publish/subscribe mechanism for > programs running on a single host to share information about their > internal state and receive notifications about interesting events. > [...] I'm hoping that [it] will present a unified view of all the > important OS configuration settings, so that programs can subscribe to > the ones they care about and get notified when they change. [...] > Notice that the above JSON isn't specific to FreeBSD, so programs > don't need to care about operating-system details like what file in > /etc is used to define the hostname. On Linux, it can be > /etc/hostname; on BSD it can be /etc/rc.conf; instead, all they need > to know is that the current value of the hostname is stored in a key > called "hostname" > > [...] I'm thinking of using D-Bus as the RPC mechanism for relaunchd, > since a lot of open source programs are already using D-Bus. > You've almost reached the point (needing just to take the step of combining what you later said about D-Bus with your ideas about servers that publish events) of reinventing these: * http://www.freedesktop.org/wiki/Software/systemd/timedated/ * http://www.freedesktop.org/wiki/Software/systemd/hostnamed/ * http://www.freedesktop.org/wiki/Software/systemd/localed/ I recommend, to anyone going down this route, looking towards finishing systembsd, especially instead of inventing a wholly new suite of protocols. * https://uglyman.kremlin.cc/gitweb/gitweb.cgi?p=systembsd.git * http://homepage.ntlworld.com./jonathan.deboynepollard/FGA/debian-systemd-packaging-hoo-hah.html * https://news.ycombinator.com/item?id=10176275 The reason is that finishing systemdbsd will make happy all of the people who want the desktop environments whose design is driven largely by Linux to work on FreeBSD/PC-BSD. The desktop environments that they'd like to use have been or are being modified to work with these daemons, over this D-Bus protocol. * http://blog.davidedmundson.co.uk/blog/systemd-and-plasma * https://systemd.events/systemdconf-2015/sessions/kde-plasma-embracing-systemd Giving them another server that speaks another protocol won't help them get their existing GNOME/KDE/whatever client utilities, that speak the hostnamed/timedated/localed protocols, to work.