[Nix-dev] Ideas for a NixOS-related bachelors thesis?

Nicolas Pierron nicolas.b.pierron at gmail.com
Sun Nov 1 19:51:16 CET 2015


I had quite a long discussion today on #ipfs, on the topic of using
IPFS for sharing Nix derivation output.

As Eelco mentioned there is no problem of using IPFS today if we want
to reproduce the model that we have today with the binary cache.  IPNS
can be used to index all the compressed nar archived and the narinfo
files.
On the other hand, if we want to go to a model where the cache is not
built by a central authority, which sounds a bit more interesting and
challenging, then we would need a way to map a derivation to the
output.

Note, that the intentional would not help in any way.  The intentional
model compute hashes after moving the self-references hash to be
indexes, which means that you effectively got a different hash than
just blindly hashing the content.

Also, you probably don't want to upload nar files as-is, even if
nothing prevents you from doing so, because you probably want to take
advantage of the merkle-dag for sharing similar files, in the same way
as we optimize the nix-store with hard links.


On Sun, Nov 1, 2015 at 5:58 PM, Eelco Dolstra
<eelco.dolstra at logicblox.com> wrote:
> Hi,
>
> On 01/11/15 18:17, Ericson, John wrote:
>
>> This is perhaps a bigger project, and one that would require C++, but I think a
>> lack of the intentional store[1] is the single biggest missing feature for Nix.
>>
>> On 29-10-2015 13:28:10, Erik Rybakken wrote:
>>
>>      The IPFS-thing would be a channel with a binary cache, not a
>>     /nix/store!
>>
>>
>> I really want IPFS too, but we can only use it correctly once we have the
>> intentional store.
>
> Without an intentional store, IPFS could be used to store the NARs of the binary
> cache, since those can be content-addressed. This is already the case for
> cache.nixos.org:
>
> $ curl
> http://cache.nixos.org/nar/1ssnjdbi6jc9729gql4par7g03jz0r52xawkck1kdik4h5ij894g.nar.xz
> \
>   | nix-hash --type sha256 --flat --base32 /dev/stdin
> 1ssnjdbi6jc9729gql4par7g03jz0r52xawkck1kdik4h5ij894g
>
> The .narinfo files should be stored somewhere else, though, since they're not
> content-addressed. However, even in the intensional model, you would need
> non-content-addressed files (namely the .drv -> output path mappings).
>
>> We can also ditch SQLite by
>> just storing everything in IPFS.
>
> Well, you still need to keep track of the metadata of the local store somewhere
> (if only for caching), which may as well be in SQLite.
>
> --
> Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev



-- 
Nicolas Pierron
http://www.linkedin.com/in/nicolasbpierron - http://nbp.name/


More information about the nix-dev mailing list