unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Andy Wingo <wingo@igalia.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel@gnu.org
Subject: Re: Service refactoring
Date: Tue, 08 Sep 2015 12:33:17 +0200	[thread overview]
Message-ID: <871te9dwuq.fsf@igalia.com> (raw)
In-Reply-To: <87mvwxmd8s.fsf@gnu.org> ("Ludovic Courtès"'s message of "Tue, 08 Sep 2015 12:12:03 +0200")

Hi!  Some thoughts but I am interested to see your results, your
approach sounds good.

On Tue 08 Sep 2015 12:12, ludo@gnu.org (Ludovic Courtès) writes:

> An issue is that each finalization procedure is passed more information
> than strictly needed.  Thus, any service can potentially influence any
> other service’s configuration, which makes it harder to reason about
> service composition.

Good point.

> Another problem is that it’s not really extensible: we’ll have to keep
> adding new fields to <service> every time we think of a new way a
> service needs to extend another service.  We could use an alist instead
> of those record fields, but then that would make the thing sloppy (typos
> would go undetected, etc.)

On the scale of badness, this to me is bad but not so bad.  How many of
these kinds of services will there be?  I am guessing like 6 or so (pam,
udev, dbus, polkit, file systems, dunno).  It's manageable.

If you extend services as first-class values -- is this your proposal?
-- that gets more precise, but then you have the problem of -- well
let's say that desktop.scm defines dbus-service, which is a factory
procedure.  What would elogind-service capture?  Would you have to pass
in the value of the instantiated dbus service in your (operating-system
(services _))?

> There’s also the assumption that each service that the user specifies
> maps to a dmd service, which is not always the case (D-Bus services,
> Apache modules, etc.)

Good point...

> Lastly, without making the “extends” relations explicit, it’s easy to
> end up specifying an extension that actually extends nothing.  For
> instance, you use a service that has a non-empty ‘dbus-services’ field
> but forget to use the D-Bus service; Guix has no way to tell that
> something’s missing.

This is only the case if you have an open extension set.  If the
extension set is closed, like the set of <service> fields is closed, we
can add custom logic.

> What I suggested would address these by constraining things.  What
> remains to be seen is if this can be implemented without making things
> too complex.  I’ll try to experiment with this.

Good luck :)  Looking forward to see what you come up with.

Cheers,

Andy

  reply	other threads:[~2015-09-08 10:33 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-03 21:23 [PATCHES] Get elogind-service working as intended Mark H Weaver
2015-09-04  7:57 ` Andy Wingo
2015-09-06 21:23   ` Service refactoring Ludovic Courtès
2015-09-08  8:47     ` Andy Wingo
2015-09-08 10:12       ` Ludovic Courtès
2015-09-08 10:33         ` Andy Wingo [this message]
2015-09-08 14:48     ` Mark H Weaver
2015-09-10 16:05       ` Ludovic Courtès
2015-09-10 16:14       ` Ludovic Courtès
2015-09-20 15:42     ` Ludovic Courtès
2015-09-21  8:18       ` Andy Wingo
2015-09-21 16:00         ` Ludovic Courtès
2015-09-24  0:33           ` Thompson, David
2015-09-24  7:41             ` Ludovic Courtès
2015-09-24  9:33               ` 宋文武
2015-09-24 17:09                 ` Ludovic Courtès
2015-09-25 22:50               ` Christopher Allan Webber
2015-09-26 12:50                 ` Ludovic Courtès
2015-09-30  8:59       ` Ludovic Courtès
2015-10-10 21:01         ` Ludovic Courtès
2015-09-10 16:03 ` [PATCHES] Get elogind-service working as intended Ludovic Courtès

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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871te9dwuq.fsf@igalia.com \
    --to=wingo@igalia.com \
    --cc=guix-devel@gnu.org \
    --cc=ludo@gnu.org \
    /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 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).