I've set up two private nodes using the instructions at https://github.com/ipfs/go-ipfs/blob/master/docs/experimental-features.md#private-networks and it worked great. Now I've got some questions about the experience of actually using it...
Here's my use case: I've got a bunch of projects with audio files. IPFS seems like it could be very useful for snapshotting the projects, sharing between systems, and de-duplicating files across projects. So for example, I've got a project with the following structure:
I add it to IPFS with
ipfs add -r my project and get a hash
hash1. Then I add a file
audio3.wav and add the dir again to get
Now I'm a bit stuck. How do I know which version is the most current version of the project? From what I've seen so far, IPFS doesn't have any metadata to tell me that
hash2 was created more recently than
hash1 – which makes sense, because I'd get the same results if I had added all three audio files first and then deleted one!
But still, I want some record of the versions so I know what's current.
It seems to me like there needs to be an index of hashes that sits outside of IPFS – is that the typical pattern?
Another question I have is about discoverability of my IPFS content. How do I get any insight into what's sitting in my IPFS? So far the only thing I've figured out is
ipfs ls hash, or clicking every DAG link in the webui. That's pretty long-winded. I guess the way we solve that with regular file systems is with names
Actually, I may have just figured something out using
ipfs files. I can create a named directory structure:
ipfs files mkdir /myproject
ipfs files cp /ipfs/hash1 /myproject/version1
ipfs files cp /ipfs/hash2 /myproject/version2
Now, if I do an
ipfs pin ls and pass it the hash of
/myproject (retrieved via
ipfs files stat /myproject) then it doesn't show up in the pins list. But when I do
ipfs repo gc it doesn't remove them. So does
ipfs files provide a sort of "soft" pin, where whatever's referenced in
ipfs files won't get garbage collected? Is it reliable, or should I manually pin each version to be safe?
Related: Can I
ipfs files ls on a different node? I'd like to be able to see the state of the project that's on a different computer... so far the closest thing I can think of is doing an
ipfs name publish myprojecthash, but if I could query node1 for what it thinks
/myproject is that would be great.
Also, if I
ipfs mount to make the IPFS file system readable through standard command-line tools, is there a way to access the named
/myproject path? Or do I have to get the hash and access it that way? e.g. I'd love to be able to
ls /ipfs/myproject but so far I seem to have to do
ls /ipfs/$(ipfs files stat --hash /project1)
My understanding at this point comes down to this: IPFS provides a flexible distributed file system, with little-to-no built-in tools for assigning meaning to the contents of the file system. If I want to incorporate meaning, I have to do that myself. Is that accurate?