From owner-freebsd-hackers@freebsd.org Sat Aug 27 16:37:28 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 2818DB7746A for ; Sat, 27 Aug 2016 16:37:28 +0000 (UTC) (envelope-from j.deboynepollard-newsgroups@ntlworld.com) Received: from know-smtprelay-omc-4.server.virginmedia.net (know-smtprelay-omc-4.server.virginmedia.net [80.0.253.68]) by mx1.freebsd.org (Postfix) with ESMTP id 8CC6E289 for ; Sat, 27 Aug 2016 16:37:26 +0000 (UTC) (envelope-from j.deboynepollard-newsgroups@ntlworld.com) Received: from [192.168.1.100] ([86.10.211.13]) by know-smtprelay-4-imp with bizsmtp id cGdQ1t01f0HtmFq01GdRrl; Sat, 27 Aug 2016 17:37:25 +0100 X-Originating-IP: [86.10.211.13] X-Spam: 0 X-Authority: v=2.1 cv=KbMvylsD c=1 sm=1 tr=0 a=SB7hr1IvJSWWr45F2gQiKw==:117 a=SB7hr1IvJSWWr45F2gQiKw==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=IkcTkHD0fZMA:10 a=oycnWgklaELcr_AiKp4A:9 a=QEXdDO2ut3YA:10 Subject: Re: Linuxisms in s6 To: Adrian Chadd , Supervision , FreeBSD Hackers References: <37d5159b-4957-42f8-2252-fa53d7446bb6@NTLWorld.com> <20160825194820.GI92256@e-new.0x20.net> From: Jonathan de Boyne Pollard Message-ID: Date: Sat, 27 Aug 2016 17:37:14 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Aug 2016 16:37:28 -0000 Adrian Chadd: > Sure, but I'm looking for something more generic than just devd. Like, > notifications about events like "default route is up" can be done by > sniffing the rtsock, but notifications like "ntpdate has updated the > date, we can now do crypto services" doesn't happen there right now. > You're reinventing upstart. The lesson of upstart is that whilst the event-driven paradigm looks like the bright shiny future, once one gets down to the details it is a lot harder than it at first appears. I strongly recommended learning about upstart, and especially learning the problems that people hit with it, to anyone going down the same route. The Debian systemd Hoo-Hah had some lengthy discussion of upstart. (I regret not having bookmarked the discussion that I once came across, where someone opined that xe preferred systemd to upstart because at a Linux conference the systemd presentation had been exciting and had been put forward as the wave of the future, where upstart had been presented as old-school, traditional, and boring. Ironically, this person wasn't aware that the designs are exactly the opposite of that. upstart has the novel event-driven design where the system is configured with the information that event A triggers programs P, Q, and R, and the system starts by raising a "first event", that runs programs, that raise further events, that run further programs. Whereas it is systemd that has the conventional design, shared by Mewburn rc and others, of starting from a goal, working through a dependency tree, and doing topological sorts.) The Debian people chose to improve a non-event-driven architecture instead. It's a lesson to be learned from SMF, in fact. One can have a lot more additional abstract targets, such as "/milestone/name-services" and "/milestone/system-clock", and dependencies to and from them. The world is not 2 to 4 run levels plus "DAEMON", "NETWORKING", and "$local-fs". That said, something like this hypothetical "/milestone/system-clock" is a milestone that would need to be reached *very* early on in the bootstrap process. Fixing up the clock is something that both the nosh system manager and systemd handle themselves directly, outwith of service management. More on this in a moment.