From: Philip McGrath <philip@philipmcgrath.com>
To: "Ludovic Courtès" <ludo@gnu.org>, raingloom <raingloom@riseup.net>
Cc: "guix-devel@gnu.org" <guix-devel@gnu.org>
Subject: Re: unifying mcron and shepherd, service woes, improvements
Date: Sun, 16 May 2021 16:47:09 -0400 [thread overview]
Message-ID: <0c9d9979-8f7b-0337-4d6d-69856321164d@philipmcgrath.com> (raw)
In-Reply-To: <87fsyohr07.fsf@gnu.org>
On 5/15/21 12:59 PM, Ludovic Courtès wrote:
> raingloom <raingloom@riseup.net> 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
<https://lists.gnu.org/archive/html/guix-devel/2021-03/msg00396.html>:
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:
<https://wingolog.org/archives/2017/06/29/a-new-concurrent-ml>.
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
next prev parent reply other threads:[~2021-05-16 20:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-14 22:39 unifying mcron and shepherd, service woes, improvements raingloom
2021-05-15 16:59 ` Ludovic Courtès
2021-05-16 18:17 ` raingloom
2021-05-16 20:47 ` Philip McGrath [this message]
2021-05-16 20:49 ` Xinglu Chen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0c9d9979-8f7b-0337-4d6d-69856321164d@philipmcgrath.com \
--to=philip@philipmcgrath.com \
--cc=guix-devel@gnu.org \
--cc=ludo@gnu.org \
--cc=raingloom@riseup.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.