<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom"><title>The GNU Shepherd — Herding system services</title><subtitle>Recent Posts</subtitle><updated>2025-12-09T15:00:15Z</updated><link href="https://shepherding.services/news/feed.xml" rel="self" /><entry><title>The Shepherd gets a new hut</title><author><name>Ludovic Courtès</name><email>guix-devel@gnu.org</email></author><updated>2025-10-22T12:00:00Z</updated><link href="https://shepherding.services/news/2025/10/the-shepherd-gets-a-new-hut" rel="alternate" /><summary type="html">&lt;p&gt;The Shepherd got a new hut!  The previous one was showing its age and
started to feel more like a &lt;a href=&quot;https://savannah.gnu.org/maintenance/HomepageUpload/&quot;&gt;Continuously Vanishing
Shed&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;So, what does the Shepherd do all day long?  It keeps shepherding
services, right?  So you won’t be surprised to learn that you can now
reach the Shepherd at
&lt;a href=&quot;https://shepherding.services&quot;&gt;shepherding.services&lt;/a&gt;.  The domain name
is slated to be transferred to &lt;a href=&quot;https://foundation.guix.info&quot;&gt;Guix
Foundation&lt;/a&gt; to ensure collective ownership
and control.  The web site is hosted on Guix infrastructure and
&lt;a href=&quot;https://codeberg.org/guix/maintenance/pulls/36&quot;&gt;automatically built&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;In other news, we’ve just released version 1.0.8, which &lt;a href=&quot;https://codeberg.org/shepherd/shepherd/src/commit/fd534af30b047913031dd9ed71dbb437fc6d43fb/NEWS&quot;&gt;fixes yet more
bugs&lt;/a&gt;.
Enjoy!&lt;/p&gt;</summary></entry><entry><title>Herding to Codeberg</title><author><name>Ludovic Courtès</name><email>guix-devel@gnu.org</email></author><updated>2025-05-24T12:00:00Z</updated><link href="https://shepherding.services/news/2025/05/herding-to-codeberg" rel="alternate" /><summary type="html">&lt;p&gt;Joining &lt;a href=&quot;https://guix.gnu.org/blog/2025/migrating-to-codeberg/&quot;&gt;their companion
project&lt;/a&gt; in its
&lt;em&gt;transhumance&lt;/em&gt;, the Shepherd and the entire herd have moved to &lt;a href=&quot;https://codeberg.org/shepherd/shepherd&quot;&gt;a new
home at Codeberg&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;../../../../static/images/blog/codeberg-logo.svg&quot; alt=&quot;Codeberg logo.&quot; /&gt;&lt;/p&gt;&lt;p&gt;You now can opt for creating
&lt;a href=&quot;https://codeberg.org/shepherd/shepherd/issues&quot;&gt;&lt;em&gt;issues&lt;/em&gt;&lt;/a&gt; and making
&lt;a href=&quot;https://codeberg.org/shepherd/shepherd/pulls&quot;&gt;&lt;em&gt;pull requests&lt;/em&gt;&lt;/a&gt; as the
newfangled parlance goes, but if you feel so inclined, you may just as
well report bugs and send patches by email like in the good ol’ days—for
now at least.  Check out the &lt;a href=&quot;https://shepherding.services/contribute&quot;&gt;contribution
page&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;In other news, we’ve just released version 1.0.5, which &lt;a href=&quot;https://codeberg.org/shepherd/shepherd/src/commit/84d5e06a71ea4bde86953b7eb0886fb50d835a33/NEWS&quot;&gt;fixes a bunch
of
bugs&lt;/a&gt;.  Enjoy!&lt;/p&gt;</summary></entry><entry><title>The Shepherd on TV!</title><author><name>Ludovic Courtès</name><email>guix-devel@gnu.org</email></author><updated>2025-02-12T00:00:00+0100</updated><link href="https://shepherding.services/news/2025/02/the-shepherd-on-tv" rel="alternate" /><summary type="html">&lt;p&gt;The &lt;a href=&quot;https://fosdem.org/2025&quot;&gt;FOSDEM&lt;/a&gt; + &lt;a href=&quot;https://guix.gnu.org/en/blog/2025/meet-guix-at-fosdem-2025/&quot;&gt;Guix Days&lt;/a&gt; combo usually makes for an intense and exhaustive week, and this
year’s edition was no exception!  The &lt;a href=&quot;https://fosdem.org/2025/schedule/track/declarative/&quot;&gt;Declarative &amp;amp; Minimalistic Computing&lt;/a&gt; track was home to a wealth of exciting talks, many of which about all things Guile—the Whippet garbage collector, the RDE Guix
derivative, the Goblins distributed programming framework, and… not one but &lt;em&gt;two&lt;/em&gt; talks about the Shepherd!&lt;/p&gt;&lt;p&gt;The &lt;a href=&quot;https://fosdem.org/2025/schedule/event/fosdem-2025-5720-the-shepherd-minimalism-in-pid-1/&quot;&gt;first talk&lt;/a&gt;, by yours, truly, shows what the Shepherd is about and how it works
under the hood: concurrent sequential processes with &lt;a href=&quot;https://codeberg.org/guile/fibers/&quot;&gt;Fibers&lt;/a&gt;, the pleasure of writing callback-free and race-free concurrent code, of
running a real-eval-print loop (REPL) in a live program (we told ya: &lt;em&gt;the coolest init system to hack on!&lt;/em&gt;), but
also, well, challenges that come with it.  Here’s the video. 👇&lt;video class=&quot;full-width&quot; controls=&quot;#t&quot; poster=&quot;../../../../static/images/blog/fosdem-2025-talk-poster.webp&quot;&gt;&lt;source src=&quot;https://video.fosdem.org/2025/h1308/fosdem-2025-5720-the-shepherd-minimalism-in-pid-1.av1.webm&quot; /&gt;&lt;/video&gt;… and the &lt;a href=&quot;../../../../static/doc/fosdem-2025.pdf&quot;&gt;slides&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;The &lt;a href=&quot;https://fosdem.org/2025/schedule/event/fosdem-2025-5315-shepherd-with-spritely-goblins-for-secure-system-layer-collaboration/&quot;&gt;second talk&lt;/a&gt; by Spritely developer Juliana Sims depicted the vision for what could
become the next Shepherd, ported to &lt;a href=&quot;https://spritely.institute/goblins/&quot;&gt;Spritely Goblins&lt;/a&gt; with the promise of bringing a higher-level programming environment
and also distributed and secure interactions with the Shepherd—the beginning
of the &lt;em&gt;plan9ification&lt;/em&gt; of Guix!&lt;video class=&quot;full-width&quot; controls=&quot;#t&quot; poster=&quot;../../../../static/images/blog/fosdem-2025-goblins-talk-poster.webp&quot;&gt;&lt;source src=&quot;https://video.fosdem.org/2025/h1308/fosdem-2025-5315-shepherd-with-spritely-goblins-for-secure-system-layer-collaboration.av1.webm&quot; /&gt;&lt;/video&gt;&lt;/p&gt;&lt;p&gt;And because the Shepherd is such an active project, we’re happy to
announce today version 1.0.2 as the second bug-fix release in the 1.0 stable
series.  Check out &lt;a href=&quot;https://codeberg.org/shepherd/shepherd/src/branch/main/NEWS&quot;&gt;the news&lt;/a&gt;!&lt;/p&gt;</summary></entry><entry><title>The Shepherd 1.0.0 released!</title><author><name>Ludovic Courtès</name><email>guix-devel@gnu.org</email></author><updated>2024-12-09T15:30:00Z</updated><link href="https://shepherding.services/news/2024/12/the-shepherd-1.0.0-released" rel="alternate" /><summary type="html">&lt;p&gt;Finally, twenty-one years after its
&lt;a href=&quot;https://lists.gnu.org/archive/html/guile-user/2003-04/msg00007.html&quot;&gt;inception&lt;/a&gt;
(twenty-one!), the Shepherd leaves &lt;a href=&quot;https://0ver.org/&quot;&gt;ZeroVer&lt;/a&gt;
territory to enter a glorious 1.0 era.  This 1.0.0 release is published
today because we think Shepherd has become a solid tool, meeting user
experience standards one has come to expect since systemd changed the
game of free init systems and service managers alike.  It’s also a major
milestone for &lt;a href=&quot;https://guix.gnu.org&quot;&gt;Guix&lt;/a&gt;, which has been relying on
the Shepherd from a time when doing so counted as &lt;em&gt;dogfooding&lt;/em&gt;.&lt;/p&gt;&lt;p&gt;To celebrate this release, the amazing Luis Felipe López Acevedo
designed a new logo,
&lt;a href=&quot;https://codeberg.org/shepherd/graphics&quot;&gt;available&lt;/a&gt;
under CC-BY-SA, and the project got &lt;a href=&quot;https://shepherding.services&quot;&gt;a proper web
site&lt;/a&gt;!&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;../../../../static/images/logo-light.svg&quot; alt=&quot;Logo of the Shepherd.&quot; /&gt;&lt;/p&gt;&lt;p&gt;Let’s first look at what the Shepherd actually &lt;em&gt;is&lt;/em&gt; and what it can
do for you.&lt;/p&gt;&lt;h1&gt;At a glance&lt;/h1&gt;&lt;p&gt;The Shepherd is a minimalist but featureful service manager and as such,
it &lt;em&gt;herds services&lt;/em&gt;: it keeps track of services, their state and their
dependencies, and it can start, stop, and restart them when needed.
It’s a simple job; doing it right and providing users with insight and
control over services is a different story.&lt;/p&gt;&lt;p&gt;The Shepherd consists of two commands: &lt;code&gt;shepherd&lt;/code&gt; is the daemon that
manages services, and &lt;code&gt;herd&lt;/code&gt; is the command that lets you interact with
it to inspect and control the status of services.  The &lt;code&gt;shepherd&lt;/code&gt;
command can run as the first process (PID 1) and serve as the “init
system”, as is the case on &lt;a href=&quot;https://guix.gnu.org/manual/devel/en/html_node/Getting-Started-with-the-System.html&quot;&gt;Guix
System&lt;/a&gt;;
or it can manage services for unprivileged users, as is the case with
&lt;a href=&quot;https://guix.gnu.org/manual/devel/en/html_node/Home-Configuration.html&quot;&gt;Guix
Home&lt;/a&gt;.
For example, running &lt;code&gt;herd status ntpd&lt;/code&gt; as root allows me to know what
the Network Time Protocol (NTP) daemon is up to:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;$ sudo herd status ntpd
● Status of ntpd:
  It is running since Fri 06 Dec 2024 02:08:08 PM CET (2 days ago).
  Main PID: 11359
  Command: /gnu/store/s4ra0g0ym1q1wh5jrqs60092x1nrb8h9-ntp-4.2.8p18/bin/ntpd -n -c /gnu/store/7ac2i2c6dp2f9006llg3m5vkrna7pjbf-ntpd.conf -u ntpd -g
  It is enabled.
  Provides: ntpd
  Requires: user-processes networking
  Custom action: configuration
  Will be respawned.
  Log file: /var/log/ntpd.log

Recent messages (use '-n' to view more or less):
  2024-12-08 18:35:54  8 Dec 18:35:54 ntpd[11359]: Listen normally on 25 tun0 128.93.179.24:123
  2024-12-08 18:35:54  8 Dec 18:35:54 ntpd[11359]: Listen normally on 26 tun0 [fe80::e6b7:4575:77ef:eaf4%12]:123
  2024-12-08 18:35:54  8 Dec 18:35:54 ntpd[11359]: new interface(s) found: waking up resolver
  2024-12-08 18:46:38  8 Dec 18:46:38 ntpd[11359]: Deleting 25 tun0, [128.93.179.24]:123, stats: received=0, sent=0, dropped=0, active_time=644 secs
  2024-12-08 18:46:38  8 Dec 18:46:38 ntpd[11359]: Deleting 26 tun0, [fe80::e6b7:4575:77ef:eaf4%12]:123, stats: received=0, sent=0, dropped=0, active_time=644 secs&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;It’s running, and it’s logging messages: the latest ones are shown here
and I can open &lt;code&gt;/var/log/ntpd.log&lt;/code&gt; to view more.  Running &lt;code&gt;herd stop ntpd&lt;/code&gt; would terminate the &lt;code&gt;ntpd&lt;/code&gt; process, and there’s also a &lt;code&gt;start&lt;/code&gt; and
a &lt;code&gt;restart&lt;/code&gt; action.&lt;/p&gt;&lt;p&gt;Services can also have &lt;em&gt;custom actions&lt;/em&gt;; in the example above, we see
there’s a &lt;code&gt;configuration&lt;/code&gt; action.  As it turns out, that action is a
handy way to get the file name of the &lt;code&gt;ntpd&lt;/code&gt; configuration file:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;$ head -2 $(sudo herd configuration ntpd)
driftfile /var/run/ntpd/ntp.drift
pool 2.guix.pool.ntp.org iburst&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Of course a typical system runs quite a few services, many of which
depend on one another.  The &lt;code&gt;herd graph&lt;/code&gt; command returns a
representation of that &lt;em&gt;service dependency graph&lt;/em&gt; that can be piped to
&lt;code&gt;dot&lt;/code&gt; or &lt;code&gt;xdot&lt;/code&gt; to visualize it; here’s what I get on my laptop:&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;../../../../static/images/blog/service-graph.svg&quot; alt=&quot;Example of a service dependency graph.&quot; /&gt;&lt;/p&gt;&lt;p&gt;It’s quite a big graph (you can zoom in for details!) but we can learn a
few things from it.  Each node in the graph is a service; rectangles are
for “regular” services (typically daemons like &lt;code&gt;ntpd&lt;/code&gt;), round nodes
correspond to &lt;em&gt;one-shot services&lt;/em&gt; (services that perform one action and
immediately stop), and diamonds are for &lt;em&gt;timed services&lt;/em&gt; (services that
execute code periodically).&lt;/p&gt;&lt;h1&gt;Blurring the user/developer line&lt;/h1&gt;&lt;p&gt;A unique feature of the Shepherd is that you configure and extend it in
its own implementation language: in &lt;a href=&quot;https://www.gnu.org/software/guile&quot;&gt;Guile
Scheme&lt;/a&gt;.  That does &lt;em&gt;not&lt;/em&gt; mean you
need to be an expert in that programming language to get started.
Instead, we try to make sure anyone can start simple for their
configuration file and gradually get to learn more if and when they feel
the need for it.  With this approach, we &lt;em&gt;keep the user in the loop&lt;/em&gt;,
&lt;a href=&quot;https://www.wingolog.org/archives/2011/10/19/the-user-in-the-loop&quot;&gt;as Andy Wingo put
it&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;A Shepherd configuration file is a Scheme snippet that goes like this:&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;language-scheme&quot;&gt;(register-services
  (list (service '(ntpd) …)
        …))

(start-in-the-background '(ntpd …))&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Here we define &lt;code&gt;ntpd&lt;/code&gt; and get it started as soon as &lt;code&gt;shepherd&lt;/code&gt; has read
the configuration file.  The ellipses can be filled in with more
services.&lt;/p&gt;&lt;p&gt;As an example, our &lt;code&gt;ntpd&lt;/code&gt; service is defined like this:&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;language-scheme&quot;&gt;(service
  '(ntpd)
  #:documentation &amp;quot;Run the Network Time Protocol (NTP) daemon.&amp;quot;
  #:requirement '(user-processes networking)
  #:start (make-forkexec-constructor
           (list &amp;quot;…/bin/ntpd&amp;quot;
                 &amp;quot;-n&amp;quot; &amp;quot;-c&amp;quot; &amp;quot;/…/…-ntpd.conf&amp;quot; &amp;quot;-u&amp;quot; &amp;quot;ntpd&amp;quot; &amp;quot;-g&amp;quot;)
           #:log-file &amp;quot;/var/log/ntpd.log&amp;quot;)
  #:stop (make-kill-destructor)
  #:respawn? #t)&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The important parts here are &lt;code&gt;#:start&lt;/code&gt; bit, which says how to start the
service, and &lt;code&gt;#:stop&lt;/code&gt;, which says how to stop it.  In this case we’re
just spawning the &lt;code&gt;ntpd&lt;/code&gt; program but other startup mechanisms are
supported by default: inetd, socket activation &lt;em&gt;à la&lt;/em&gt; systemd, and
timers.  Check out the manual for
&lt;a href=&quot;https://shepherding.services/manual/html_node/Service-Examples.html&quot;&gt;examples&lt;/a&gt;
and a
&lt;a href=&quot;https://shepherding.services/manual/html_node/Defining-Services.html&quot;&gt;reference&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;There’s no limit to what &lt;code&gt;#:start&lt;/code&gt; and &lt;code&gt;#:stop&lt;/code&gt; can do.  In Guix System
you’ll find services that &lt;a href=&quot;https://guix.gnu.org/en/blog/2017/running-system-services-in-containers/&quot;&gt;run daemons in
containers&lt;/a&gt;,
that mount/unmount file systems (as can be guessed from the graph
above), that set up/tear down a static networking configuration, and a
variety of other things.  The
&lt;a href=&quot;https://github.com/BIMSBbioinfo/swineherd&quot;&gt;Swineherd&lt;/a&gt; project goes as
far as extending the Shepherd to turn it into a tool to manage system
containers—similar to what the Docker daemon does.&lt;/p&gt;&lt;p&gt;Note that when writing service definitions for Guix System and Guix
Home, you’re targeting a &lt;a href=&quot;https://guix.gnu.org/manual/devel/en/html_node/Shepherd-Services.html&quot;&gt;thin
layer&lt;/a&gt;
above the Shepherd programming interface.  As is customary in Guix, this
is &lt;em&gt;multi-stage programming&lt;/em&gt;: G-expressions specified in the &lt;code&gt;start&lt;/code&gt; and
&lt;code&gt;stop&lt;/code&gt; fields are staged and make it into the resulting Shepherd
configuration file.&lt;/p&gt;&lt;h1&gt;New since 0.10.x&lt;/h1&gt;&lt;p&gt;For those of you who were already using the Shepherd, here are the
highlights compared to the 0.10.x series:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Support for &lt;a href=&quot;https://shepherding.services/manual/html_node/Timers.html&quot;&gt;&lt;em&gt;timed
services&lt;/em&gt;&lt;/a&gt;
has been added: these services spawn a command or run Scheme code
periodically according to a predefined calendar.&lt;/li&gt;&lt;li&gt;&lt;code&gt;herd status SERVICE&lt;/code&gt; now shows high-level information about
services (main PID, command, addresses it is listening to, etc.)
instead of its mere “running value”.  It also shows recently-logged
messages.&lt;/li&gt;&lt;li&gt;To make it easier to discover functionality, that command also
displays &lt;em&gt;custom actions&lt;/em&gt; applicable to the service, if any.  It
also lets you know if a replacement is pending, in which case you
can restart the service to upgrade it.&lt;/li&gt;&lt;li&gt;&lt;code&gt;herd status root&lt;/code&gt; is no longer synonymous with &lt;code&gt;herd status&lt;/code&gt;;
instead it shows information about the &lt;code&gt;shepherd&lt;/code&gt; process itself.&lt;/li&gt;&lt;li&gt;On Linux, &lt;code&gt;reboot --kexec&lt;/code&gt; lets you reboot straight into a new Linux
kernel previously loaded with &lt;a href=&quot;https://linux.die.net/man/8/kexec&quot;&gt;&lt;code&gt;kexec --load&lt;/code&gt;&lt;/a&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;The service collection has grown:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;The new &lt;a href=&quot;https://shepherding.services/manual/html_node/Log-Rotation-Service.html&quot;&gt;log rotation
service&lt;/a&gt;
is responsible for periodically rotating log files, compressing
them, and eventually deleting them.  It’s very much like similar log
rotation tools from the 80’s since &lt;code&gt;shepherd&lt;/code&gt; logs to plain text
files like in the good ol’ days.&lt;/p&gt;&lt;p&gt;There’s a couple of be benefits that come from its integration into
the Shepherd.  First, it already knows all the files that services
log to, so no additional configuration is needed to teach it about
these files.  Second, log rotation is &lt;em&gt;race free&lt;/em&gt;: no single line of
log can be lost in the process.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;The new &lt;a href=&quot;https://shepherding.services/manual/html_node/System-Log-Service.html&quot;&gt;system log
service&lt;/a&gt;
what’s traditionally devoted to a separate &lt;code&gt;syslogd&lt;/code&gt; program.  The
advantage of having it in &lt;code&gt;shepherd&lt;/code&gt; is that it can start logging
earlier and integrates nicely with the rest of the system.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;The &lt;a href=&quot;https://shepherding.services/manual/html_node/Timer-Service.html&quot;&gt;timer
service&lt;/a&gt;
provides functionality similar to the venerable &lt;code&gt;at&lt;/code&gt; command,
allowing you to run a command at a particular time:&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;pre&gt;&lt;code&gt;herd schedule timer at 07:00 -- mpg123 alarm.mp3&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;&lt;li&gt;The &lt;a href=&quot;https://shepherding.services/manual/html_node/Transient-Service-Maker.html&quot;&gt;transient service
maker&lt;/a&gt;
lets you run a command in the background as a transient service (it
is similar in spirit to the &lt;code&gt;systemd-run&lt;/code&gt; command):&lt;/li&gt;&lt;/ul&gt;&lt;pre&gt;&lt;code&gt;herd spawn transient -d $PWD -- make -j4&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;&lt;li&gt;The GOOPS interface that was deprecated in 0.10.x &lt;a href=&quot;https://shepherding.services/manual/html_node/Legacy-GOOPS-Interface.html&quot;&gt;is now
gone&lt;/a&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;As always, the &lt;a href=&quot;https://codeberg.org/shepherd/shepherd/src/commit/dd911ac772989a7630b9f4d58f8b747cbc1c33fe/NEWS&quot;&gt;&lt;code&gt;NEWS&lt;/code&gt;
file&lt;/a&gt;
has additional details.&lt;/p&gt;&lt;p&gt;In the coming weeks, we will most likely gradually move service
definitions in Guix from
&lt;a href=&quot;https://guix.gnu.org/manual/devel/en/html_node/Scheduled-Job-Execution.html#index-mcron_002dservice_002dtype&quot;&gt;mcron&lt;/a&gt;
to timed services and similarly replace
&lt;a href=&quot;https://guix.gnu.org/manual/devel/en/html_node/Log-Rotation.html#index-rottlog_002dservice_002dtype&quot;&gt;Rottlog&lt;/a&gt;
and
&lt;a href=&quot;https://guix.gnu.org/manual/devel/en/html_node/Base-Services.html#index-syslog_002dservice_002dtype&quot;&gt;&lt;code&gt;syslogd&lt;/code&gt;&lt;/a&gt;.
This should be an improvement for Guix users and system administrators!&lt;/p&gt;&lt;h1&gt;Cute code&lt;/h1&gt;&lt;p&gt;I did mention that the Shepherd is minimalist, and it really is: 7.4K
lines of Scheme, excluding tests, according to SLOCCount.  This is in
large part thanks to the use of a high-level memory-safe language and
due to the fact that it’s extensible—peripheral features can live
outside the Shepherd.&lt;/p&gt;&lt;p&gt;Significant benefits also come from the concurrency framework: the
&lt;em&gt;concurrent sequential processes&lt;/em&gt; (CSP) model and
&lt;a href=&quot;https://codeberg.org/guile/fibers&quot;&gt;Fibers&lt;/a&gt;.  Internally, the state of
each service &lt;a href=&quot;https://shepherding.services/manual/html_node/Service-Internals.html&quot;&gt;is encapsulated in a
fiber&lt;/a&gt;.
Accessing a service’s state amounts to sending a message to its fiber.
This way to structure code is itself very much inspired by the &lt;em&gt;actor
model&lt;/em&gt;.  This results in simpler code (no dreaded event loop, no
callback hell) and better separation of concern.&lt;/p&gt;&lt;p&gt;Using a high-level framework like Fibers does come with its challenges.
For example, we had the case of a &lt;a href=&quot;https://codeberg.org/guile/fibers/issues/109&quot;&gt;memory leak in Fibers under certain
conditions&lt;/a&gt;, and we
certainly don’t want that in PID 1.  But the challenge really lies in
squashing those low-level bugs so that the foundation is solid.  The
Shepherd itself is free from such low-level issues; its logic is easy to
reason about and that alone is immensely helpful, it allows us to extend
the code without fear, and it avoids concurrency bugs that plague
programs written in the more common event-loop-with-callbacks style.&lt;/p&gt;&lt;p&gt;In fact, thanks to all this, the Shepherd is probably the &lt;em&gt;coolest init
system&lt;/em&gt; to hack on.  It even comes with a
&lt;a href=&quot;https://shepherding.services/manual/html_node/REPL-Service.html&quot;&gt;REPL&lt;/a&gt;
for live hacking!&lt;/p&gt;&lt;h1&gt;What’s next&lt;/h1&gt;&lt;p&gt;There’s a number of down-to-earth improvements that can be made in the
Shepherd, such as adding support for dynamically-reconfigurable services
(being able to restart a service but with different options),
integration with control groups (“cgroups”) on Linux, proper integration
for software suspend, etc.&lt;/p&gt;&lt;p&gt;In the longer run, we envision an exciting journey towards a
&lt;a href=&quot;https://spritely.institute/news/spritely-nlnet-grants-december-2023.html&quot;&gt;distributed and capability-style
Shepherd&lt;/a&gt;.
&lt;a href=&quot;https://spritely.institute/goblins/&quot;&gt;Spritely Goblins&lt;/a&gt; provides the
foundation for this; using it looks like a natural continuation of the
design work of the Shepherd: Goblins is an actor model framework!
Juliana Sims has been working on adapting the Shepherd to Goblins
and we’re eager to see what comes out of it in the coming year.  Stay
tuned!&lt;/p&gt;&lt;h1&gt;Enjoy!&lt;/h1&gt;&lt;p&gt;In the meantime, we hope you enjoy the Shepherd 1.0 as much as we
enjoyed making it.  Four people contributed code that led to this
release, but there are &lt;a href=&quot;https://shepherding.services/contribute&quot;&gt;other ways to
help&lt;/a&gt;: through
graphics and web design, translation, documentation, and more.  Join us!&lt;/p&gt;</summary></entry></feed>