IPFS browser/downloader for NC

Any wishes
Locked
JayB
Posts: 192
Joined: Sun Jan 08, 2017 4:38 pm

IPFS browser/downloader for NC

Post by JayB » Tue May 09, 2017 5:16 pm

The future of the internet is the IPFS:
https://ipfs.io
https://github.com/ipfs

Why not make Nimble Commander the first filemanager that supports IPFS?

I don't expect Nimble Commander to have a functionality to add files to the IPFS (or pin files to local storage), but it would surely be possible. The first step should imho focus on getting content from the IPFS (and actually browsing that content, if it has a directory structure). This might be an interesting (if not totally awesome) functionality for a new NC VFS.

For starters, NC would need an integrated IPFS node, so it would also work for users who haven't yet installed IPFS. (Which they should do nonetheless: easy with Homebrew.)

The functionality would be similar to connecting to an external server: Menu "Go" > Connect To…

There you'd have two options: (1) IPFS, and (2) IPNS.

(1) IPFS would let you connect to a standard IPFS object, a window would pop up, and you would have to enter the IPFS hash (copy/paste). If that object is just a single file, NC would download the file to e.g. your homefolder, to ~/Downloads, or (preferably) to a special IPFS download folder the user can designate in NC preferences. If that object is a directory, you can then choose to either download the whole directory with NC, or mount the object recursively in a VFS, to be able to browse the IPFS object, and just copy certain files you want. (EDIT: an IPFS object, incl. a directory, might probably be downloaded anyway to be browsable, so that should go into a NC temp folder, and if the user chooses to copy single files or the whole directory, NC would simply copy the files locally to the other user-designated folder.)

(2) IPNS is a fixed hash pointing to an IPFS hash (file or directory); if the file or directory contents change, the originator can update the IPNS pointer to link to the new IPFS file(s), while the IPNS hash itself doesn't change. Therefore, connecting to an IPNS hash with NC would always download/mount the current version. Then the user should also be able to store IPNS presets in the remote server favorites of Nimble Commander, and also be able to give a title, under "Manage Connections", e.g.

Code: Select all

Title: My Colleague's shared IPNS directory
IPNS Hash: <IPNS_HASH>

User avatar
mike
Posts: 1060
Joined: Thu Jul 16, 2015 5:35 am
Location: Exeter, UK

Re: IPFS browser/downloader for NC

Post by mike » Thu May 11, 2017 9:23 am

Oh, that's a serious stuff!
It reminds of bittorrent's approaches a bit.
But honestly I think this feature is too niche and and it won't fit in NC, which is more or less a generic-purpose tool.

JayB
Posts: 192
Joined: Sun Jan 08, 2017 4:38 pm

Re: IPFS browser/downloader for NC

Post by JayB » Thu May 11, 2017 10:09 am

Yeah, it's mind-blowing if you think of the possibilities, if this replaces http one day & is built into… well, hopefully everything. It has a p2plib at its core (with Kademlia), so there's some torrent-like swarm thing at the outset, but coupled with the blockchain for file immutability, git for structure, DAG, a namespace, all forming a distributed file system.

As for the functionality: I noticed that Protocol Labs has a repo for an IPFS browser on GitHub, but it's empty: https://github.com/protocol/ipfs-browser

So I assume that there will be something like that in the future.

At the moment it's still niche, very much so, but one day it'll be the de facto standard. You already have a possibility to mount objects (ipfs & ipns) locally as read-only: https://ipfs.io/docs/commands/#ipfs-mount … so the user can probably mount stuff himself with a service or script (or the command-line), and then it would be accessible via NC as a volume, but in my view this should eventually be the same as simply mounting FTP or SSHFS, built into macOS Finder, FTP clients like transmit, and yeah, also other file managers. At some point it'll become a necessity. :)

JayB
Posts: 192
Joined: Sun Jan 08, 2017 4:38 pm

Re: IPFS browser/downloader for NC

Post by JayB » Sat Jul 08, 2017 8:49 am

An IPFS node actually comes with a virtual mutable file system (MFS). It is empty at first, but the user can use the ipfs files command – https://ipfs.io/docs/commands/#ipfs-files – to mkdir, cp, mv, rm etc., with the twist that all objects in that MFS are virtual, a little bit like symlinks that point to the IPFS node's main datastore, where the real objects are. So if NC detects that a node is running, and the MFS isn't empty, it could integrate this MFS into the GUI somehow, and the user could then make directories, traverse the MFS hierarchy, list subfolders, remove, move (rename) and copy files or folders, maybe even open or preview files, possibly also adding files from the main datastore. I know IPFS is not on your agenda… I'm just thinking out loud here. ;)

Locked