unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Christopher Baines <mail@cbaines.net>
To: zimoun <zimon.toutoune@gmail.com>
Cc: guix-devel@gnu.org
Subject: Re: extend ’guix archive’?
Date: Fri, 04 Feb 2022 12:36:52 +0000	[thread overview]
Message-ID: <87k0eag5pl.fsf@cbaines.net> (raw)
In-Reply-To: <86r1a6sxc6.fsf@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2093 bytes --]


zimoun <zimon.toutoune@gmail.com> writes:

> On Mon, 20 Dec 2021 at 23:07, Ludovic Courtès <ludo@gnu.org> wrote:
>
>> Regarding nar-herder, I think it’d be nice to have a solution to
>> mirroring in Guix proper, developed similarly to other components,
>> because it could be a fairly central tool.
>>
>> ‘guix publish’ is probably not extensible enough to support that, but we
>> could make it a new ‘guix mirror’ or ‘guix sync’ or whatever command.
>
> Why not extend “guix archive”?
>
> However, without all the details so my remark is totally naive, I miss
> what “nar-herder” is doing that “guix archive”+rsync+“guix publish” is
> not doing – other said I miss why another SQL database is required to
> serve stuff from one place to another.  I have read README but I did not
> get the point.

Apologies, I missed replying to this at the time.

Using an SQL database (sqlite) isn't required in my opinion, but I do
like that aspect of the design.

You could for example keep the narinfo's as files on the disk, and then
use rsync say to copy them between machines to setup mirrors. I think
this would perform worse compared to storing the narinfos in a database
when initially setting up a mirror. With a database, you only have to
download one large file, whereas with individual narinfo files, you have
to download lots of individual small files. Storing all the narinfo
files individually also generally takes up more space than storing them
in a database, since there's an overhead associated with each file on
the filesystem.

Additionally, the database is used to do extra things on top of just
storing the narinfos. The references from the narinfos are stored
separately to facilitate doing GC like removal of the
nars. Additionally, there's a way to tag nars, something which I was
thinking of using to allow selectively removing some nars which only
need to be stored for a short time.

https://git.cbaines.net/guix/nar-herder/tree/nar-herder/database.scm#n74

I hope that makes some sense,

Chris

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 987 bytes --]

  parent reply	other threads:[~2022-02-04 13:08 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-15 16:48 Mid-December update on bordeaux.guix.gnu.org Christopher Baines
2021-12-15 22:49 ` zimoun
2021-12-16  0:20   ` Christopher Baines
2021-12-16 11:05     ` zimoun
2021-12-16 12:48       ` Christopher Baines
2021-12-16 14:25         ` Andreas Enge
2021-12-21  9:53     ` Redundancy for source code and Disarchive Ludovic Courtès
2021-12-17  9:00 ` Mid-December update on bordeaux.guix.gnu.org Andreas Enge
2021-12-17  9:03   ` Andreas Enge
2021-12-20 22:07 ` Ludovic Courtès
2021-12-20 22:52   ` extend ’guix archive’? zimoun
2021-12-21  5:50     ` Jack Hill
2021-12-21 10:49       ` zimoun
2022-02-04 12:48       ` Christopher Baines
2021-12-21  9:39     ` Ludovic Courtès
2021-12-21 10:32       ` zimoun
2022-02-04 12:36     ` Christopher Baines [this message]
2022-01-06 13:26   ` Mid-December update on bordeaux.guix.gnu.org Christopher Baines

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=87k0eag5pl.fsf@cbaines.net \
    --to=mail@cbaines.net \
    --cc=guix-devel@gnu.org \
    --cc=zimon.toutoune@gmail.com \
    /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).