From: "Ludovic Courtès" <ludo@gnu.org>
To: Alex Sassmannshausen <alex.sassmannshausen@gmail.com>
Cc: Guix-devel <guix-devel@gnu.org>
Subject: Re: Thoughts on stateful services in Guix
Date: Wed, 05 Feb 2020 15:04:12 +0100 [thread overview]
Message-ID: <87a75xp1ur.fsf@gnu.org> (raw)
In-Reply-To: <87r1zexcu3.fsf@gmail.com> (Alex Sassmannshausen's message of "Sat, 01 Feb 2020 21:38:28 +0100")
Hi Alex,
Thanks for sharing your thoughts and this tricky but important use case!
Alex Sassmannshausen <alex.sassmannshausen@gmail.com> skribis:
> 3 A generalisation: the Stateful-Service Service
> ════════════════════════════════════════════════
>
> State dumping and restoration *should* be generalisable.
>
> It should normally consist of one or more operations of:
> • running a special program to dump data, encrypting the dump, and
> storing it, together with the service revision hash, in a known
> location.
> • tarring up a directory tree, encrypting the archive and storing it,
> together wtih the service revision hash, in a known location.
>
> These operations should be able to be provided by a daemon, managed by
> shepherd, which can be configured with a gpg key for encryption, a
> mechanism for decryption (interactive or programmatic), a location for
> storing/retrieving dumps (local or remote?), and a DSL for mapping
> data dump / data restoration program invocations or file-system
> locations to data dumps it already knows of.
Back in my Nix days, Wouter den Breejen worked on “S-Nix”, whose goal
was to explore how Nix could be extended to support state¹. Back then,
I think the experiment was not considered fruitful, in part due to its
complexity, the implementation’s reliance on ext3cow, things like that.
There may still be good ideas to take from that, although it’s probably
more reasonable to start with something simple and practical, trying to
address a couple of concrete use cases before trying to generalize.
What you propose above sounds like it could be a good start!
Ludo’.
¹ “Managing state in a purely functional deployment model”, master
thesis,
<http://www.cs.uu.nl/education/scripties/scriptie.php?SID=INF/SCR-2007-053>.
I couldn’t find a copy on-line so here’s one from my attic:
<http://web.fdn.fr/~lcourtes/tmp/snix-thesis.pdf>.
prev parent reply other threads:[~2020-02-05 14:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-01 20:38 Thoughts on stateful services in Guix Alex Sassmannshausen
2020-02-05 13:03 ` Giovanni Biscuolo
2020-02-05 14:04 ` Ludovic Courtès [this message]
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=87a75xp1ur.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=alex.sassmannshausen@gmail.com \
--cc=guix-devel@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).