InterPlanetary File System

Hi, I will be giving an introduction of InterPlanetary File System, in short IPFS.

InterPlanetary File System is a protocol and network designed to create a content-addressable, peer-to-peer method of storing and sharing files in a distributed file system.

And I will go through each of these features, but let me first talk a bit about what you can do with IPFS.

Individuals can run IPFS clients on their machines. They can make some files available to the internet using IPFS. Every file will have a hash associated with it. Other IPFS clients can get those files if they have its hash.

Primary implementation of IPFS is written in Golang https://github.com/ipfs/go-ipfs. There is a client in JavaScript as well https://github.com/ipfs/js-ipfs.

Let me now explain the features of IPFS one by one

Peer to Peer

If you understand how the internet works today, you would know that most of them are server-client communication. Say, you want to get a video of this talk. What we would do today, is to upload the video on cloud publish you all the link and you download from it.

Now, what is wrong with this? Even though we are sitting next to each other to send you this video, the network has to send the data to data centers of some cloud provider(there is a good chance that these things are far from us in the US) and for every download the data has to travel all the way from data centers to you. So much network inefficiency.

IPFS solves this problem. In IPFS world, I would add my video to IPFS, it will create a unique hash for that video. Using that hash anyone can get the video. IPFS will find the closest peer which has that data(initially just me) and fetch it from there. Because data doesn’t have to make huge roundtrip as earlier, you can get it faster. Plus, we saved energy by putting less strain on the network. Having a peer to peer structure prevents the system from a central bottleneck(no single point of failure unlike current client-server architecture) and censorship(there have been cases when government blocking certain websites or even shutting down the entire internet during critical times)

Content Addressable

Say, by now you all have a video of this talk. Say, I upload one on my personal website and YouTube. Some random folks are downloading because they like it and want to watch it later. It is at so many places over the internet. But when I want to download this video, I don’t know that there are so many copies available and I have no way to take advantage of this data redundancy. Enter IPFS. Every file is associated with a hash. If two files have the same hash, it means that they are copies. You can get the file based on the hash. IPFS can check who are the peers having the file with that hash and get it from the nearest user.

This property of content addressing can help us in de-duplicating(hence we will need less storage)

Using IPFS

IPFS is designed to be used in a number of different ways.
Here are just some of the use cases I will be pursuing:

1. As a mounted global filesystem, under `/ipfs` and `/ipns`.
2. As a mounted personal sync folder that automatically versions, publishes, and backs up any writes.
3. As an encrypted file or data sharing system.
4. As a versioned package manager for all software.
5. As the root filesystem of a Virtual Machine.
6. As the boot filesystem of a VM (under a hypervisor).