From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id eCH0A96EoWC+XgAAgWs5BA (envelope-from ) for ; Sun, 16 May 2021 22:47:26 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id oAdAO92EoWAhYgAAB5/wlQ (envelope-from ) for ; Sun, 16 May 2021 20:47:25 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 391641523D for ; Sun, 16 May 2021 22:47:25 +0200 (CEST) Received: from localhost ([::1]:37560 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1liNfY-0000cO-9k for larch@yhetil.org; Sun, 16 May 2021 16:47:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53796) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1liNfO-0000cD-KK for guix-devel@gnu.org; Sun, 16 May 2021 16:47:14 -0400 Received: from mail-qk1-x730.google.com ([2607:f8b0:4864:20::730]:35763) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1liNfM-0006Yj-Nb for guix-devel@gnu.org; Sun, 16 May 2021 16:47:14 -0400 Received: by mail-qk1-x730.google.com with SMTP id x8so4010984qkl.2 for ; Sun, 16 May 2021 13:47:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=NNPSoyFLcIIzUa1496tRrSWljurcwXGTZn99UxmXGC8=; b=WCxhHmAj+J6xeMi2IpOgbJcXhvfJfgvd1RBnXL+4PAisWFihz1062TV8G5Q+RQTtYt 8kYi0W3sN1iW6WgzoWAzgaf9cIbhq/xUhuYCDY6XUG5GPYiDBG7MpF5SXgsnj2J3xmKd TsMX+1O97rqW99uxNrMKSfXkXD15Q1F+94YKX/yAXo2j96l2bWb0/E3KmFesFpVmbz5d im48qM7pjj5Heua4HibgBuA28vcZJsT5ld3pC41yP5FRymok+P8wdpBmrr5mXtlUqoW9 dphFtNK/AQYPFdINYieePvBZXRTknrDoophxgA6SL2tpVQ9fA5bVwi0SWCftuuCOENsm V/NQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=NNPSoyFLcIIzUa1496tRrSWljurcwXGTZn99UxmXGC8=; b=OKOlNQTBGeSe19jiPDL8Y45VBg+hTAVDTnlrdOTK4CTtzZxzSVr4kO7Unm6qdT3HoD IY8aB3Gg+KsQPaa25eak+/xs/iheB+NwrW4MTKxYZ6Nhz4lAJ/kQ1XtKorb0dNs5PsVA 0mfgXSELV0MRRU4vaFyFn7TKXGxzxv1BnBqpYNf4STC2hSHEp98PWf+FnwoiBsEgaSbW IkMlQRCMsNZd2LPVhtXpCGDTXbNtsOvekrXkNp/6eyxLPDC9MoXj19XsssuG5p0QxA2J UXKlHAeqwHvDqFnWeT2DylzxyproRH9QjnOwtH+7lTWQYiqYJVMe8PQmT6xXSyj0uvVd AnWw== X-Gm-Message-State: AOAM532lvVtr20Cydygt95z7PHP7FIeAcC18cWCUTYZvcqcmLTlcxqLk BCUQ0fsdhisV3aeYMXVpRp4aRbsQHMfAh8ZPEiI= X-Google-Smtp-Source: ABdhPJzkhtSiiU+kCehIBywOl/2ejzyC6ufMdU6dZ/13RMcQxN/7IbDwIa05FoP30AMa2BPxfOsfZw== X-Received: by 2002:a05:620a:ed3:: with SMTP id x19mr34734990qkm.205.1621198030890; Sun, 16 May 2021 13:47:10 -0700 (PDT) Received: from [192.168.45.135] (c-73-125-89-242.hsd1.fl.comcast.net. [73.125.89.242]) by smtp.gmail.com with ESMTPSA id u126sm9299204qkd.80.2021.05.16.13.47.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 16 May 2021 13:47:10 -0700 (PDT) Subject: Re: unifying mcron and shepherd, service woes, improvements To: =?UTF-8?Q?Ludovic_Court=c3=a8s?= , raingloom References: <20210515003937.3dbb4bb4@riseup.net> <87fsyohr07.fsf@gnu.org> From: Philip McGrath Message-ID: <0c9d9979-8f7b-0337-4d6d-69856321164d@philipmcgrath.com> Date: Sun, 16 May 2021 16:47:09 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <87fsyohr07.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Received-SPF: neutral client-ip=2607:f8b0:4864:20::730; envelope-from=philip@philipmcgrath.com; helo=mail-qk1-x730.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NEUTRAL=0.779 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "guix-devel@gnu.org" Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1621198045; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=NNPSoyFLcIIzUa1496tRrSWljurcwXGTZn99UxmXGC8=; b=en4trNcry5dAro9XAS5MoF54h2dD+t4AGxP0KFrIszi7Agx6gk+qalh6trUL7F1xWNNMm5 tv2zJ6uAdheafPuATdMWtUNYJ2DLQS26Tsg/DrCpQvJ8RUSUxGO9gbEVCSSiR7RaXuGHvi hqGM3C/zTf1kRwmNGE747ekQkuFRzj7mxGF7MjHe4Ywo5PobkNmZi+ntk03+ftsGM5N9n0 LJnIQN0BnpKk+V+RLrHgCp4yzj3wWy1nTCLHcpQ+hQNZYdUq+0NIaYfGOWwRtUCvptF6SN oPUeKfZO+IUeVKcK9LKue3mw0RqfOrxtHC2fPi8z02qBhZ7cdL9KNKWSvaqEfA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1621198045; a=rsa-sha256; cv=none; b=JzZflhrEPM+iEaVHOi5rStVmprSjC/Jmv2AwT+cWPpaaMhjObe8tTSKqr9OiVRRJtSezMy v6ljDDBObJ1IpT2xOlVY94GtbE49BsbZ0tI/kjMiNefzFNPR82euy65kPe9tEZk7KQ8RX0 6sJNsyMzyS6ABEpkkmA9sN0CtQPs7D504dnumkK4QNcJoK61z9/uj6dF23XLx1KrCAv+Gl wutRIJqOEnK7FDDO+vyc0VSLCoTOFYfPM5YP8I4hZbBLoNbfBCj84fXipEYBiJW5jRBcMR QxbfzENL2BzC9IcoZlhlv0M9FvtKMwH//vx/Vco6PHhmxk4EEUD4oKb++xSXTQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=philipmcgrath.com header.s=google header.b=WCxhHmAj; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Spam-Score: -1.15 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=philipmcgrath.com header.s=google header.b=WCxhHmAj; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: 391641523D X-Spam-Score: -1.15 X-Migadu-Scanner: scn0.migadu.com X-TUID: 3WePMjuNG6Ya On 5/15/21 12:59 PM, Ludovic Courtès wrote: > raingloom skribis: >> Or is everyone else happy with the current design and it's just me who >> can't use Shepherd properly? 😅 > > I think it’s fair to say it’s rough on the edges. :-) > > One thing that’s on the to-do list is switching to a real event loop in > lieu of the current ad-hoc blocking design (this was discussed recently > on this mailing list). The switch to ‘signalfd’ in the last release in > a step in that direction. This will unlock “socket activation” and > possibly timers as you mentioned. From a newcomer's perspective---I haven't used shepherd at all yet---I was surprised by the discussion leading up to : On 3/19/21 10:42 PM, raid5atemyhomework wrote: > Perhaps the point is not so much to be *multi-threaded* but to be *concurrent* From very occasionally reading Andy Wingo's blog, I understand that Guile has a Concurrent ML implementation: . I haven't programmed with it in Guile at all, but, from my experience using Racket's Concurrent ML system, I think it is the right foundation for a supervisor daemon. CML provides a consistent, extensible way to express, "when something happens, do some action", where "something happens" might be: * a timer fires; * a service, or a set of them, come up; * a subprocess exits (successfully or not); * a file descriptor is ready for reading and/or writing; * a "green thread" (IIUC, a Guile "fiber") has an uncaught exception; * a signal is received from the OS kernel; * a user sends a command from the client program; ... etc, etc, etc. The CML implementation handles many low-level details that are easy to get wrong. -Philip