* [Shepherd] Service monitoring agent
@ 2022-06-27 13:18 Ludovic Courtès
0 siblings, 0 replies; only message in thread
From: Ludovic Courtès @ 2022-06-27 13:18 UTC (permalink / raw)
To: Guix Devel
Hello Guix!
I recently pushed a Shepherd branch called ‘wip-service-monitor’:
https://git.savannah.gnu.org/cgit/shepherd.git/log/?h=wip-service-monitor
It creates a “service monitoring agent”—code that runs in a separate
fiber and encapsulates the current state of services: registered,
running, etc.
Currently, state is managed directly within <service> objects, for
instance with the ‘running’ slot; this approach would replace that. The
expected benefits are: improved clarity through separation of state from
config, and finer-grain view of service state.
The first visible application (and original motivation) is a
representation of services that are “being started”. Currently, we can
only distinguish between “running” and “stopped” services; the
monitoring agent has been augmented to handle a “starting” state. It
provides a synchronization mechanism that makes sure that (start S)
blocks until S has been started, in case it was already being started
(that’s the semantics we had pre-0.9 but 0.9 broke that.)
The service monitor is a fiber that answers requests on a dedicated
channel, similar to a client/server model with remote procedure calls
(RPCs). That way, all accesses to service state are serialized.
At this point, there’s still state in <service>, such as respawn times,
that we could move to the monitor.
Feedback welcome!
Ludo’.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-06-27 13:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-27 13:18 [Shepherd] Service monitoring agent Ludovic Courtès
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).