[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Service refactoring
From: |
Ludovic Courtès |
Subject: |
Re: Service refactoring |
Date: |
Thu, 24 Sep 2015 19:09:02 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
宋文武 <address@hidden> skribis:
> 2015-09-24 15:41 GMT+08:00 Ludovic Courtès <address@hidden>:
>> "Thompson, David" <address@hidden> skribis:
>>
>>> On Mon, Sep 21, 2015 at 12:00 PM, Ludovic Courtès <address@hidden> wrote:
>>>> Andy Wingo <address@hidden> skribis:
>>>>
>>>>> On Sun 20 Sep 2015 15:42, address@hidden (Ludovic Courtès) writes:
>>>>>
>>>>>> I’m quite happy with the result, but comments are welcome! I’ll convert
>>>>>> some more services to see how it goes.
>>>>>
>>>>> Neat! Sounds great. One question: there are some services like colord
>>>>> or geoclue that don't need to be managed by DMD, but are just declared
>>>>> as services so that their users are created, there /var/foo directories
>>>>> are created, etc. The can be started by D-Bus as needed. Does the new
>>>>> design support services of this kind?
>>>>
>>>> Yes it does.
> Great news! I don't miss NixOS's modules anymore :-)
Heheh, NixOS modules are a very good competitor. ;-)
I think this model handles multiple service instances better than NixOS
modules. NixOS services can be enabled/disabled, for instance with
‘services.httpd.enable = true’ or ‘services.openssh.enable = true’, but
I don’t think there’s a general mechanism to have multiple instances of
httpd or sshd.
Also in NixOS any service can do ‘foo.bar = baz’ and change an unrelated
OS setting, which is not possible here.
I find the fixed-point approach of NixOS modules very elegant, but it
also complicates things: It’s easy to enter an infinite recursion, and
one has to carefully use ‘mkIf’ and similar constructs where it matters,
which is non-obvious.
> I think the difference is that we don't seperate options and implementations
> like NixOS did, 'service-type' have both in one place.
‘service-type’ is sort-of an interface: it describes how services are
composed, but not what they do.
> So, our services is highly tie to gexps and dmd (that's ok).
The whole thing is rather tied to gexps, but it’s not tied to dmd. dmd
is just a service that has nothing special, and (gnu system) does not
embed any knowledge about dmd.
The only service type that’s known to (gnu system) is
‘boot-service-type’.
Thanks for your feedback!
Ludo’.
- Re: Service refactoring, (continued)
- Re: Service refactoring, Ludovic Courtès, 2015/09/20
- Re: Service refactoring, Andy Wingo, 2015/09/21
- Re: Service refactoring, Ludovic Courtès, 2015/09/21
- Re: Service refactoring, Thompson, David, 2015/09/23
- Re: Service refactoring, Ludovic Courtès, 2015/09/24
- Re: Service refactoring, 宋文武, 2015/09/24
- Re: Service refactoring,
Ludovic Courtès <=
- Re: Service refactoring, Christopher Allan Webber, 2015/09/25
- Re: Service refactoring, Ludovic Courtès, 2015/09/26
Re: [PATCHES] Get elogind-service working as intended, Ludovic Courtès, 2015/09/10