What is IPFS?
Okay. It’s a joke. The Guardians of the Galaxy are a disastrous interplanetary team but no, IPFS is not referring to them.
IPFS (InterPlanetary File System) represents a radical change in the way content is accessed on the Internet. Normally, when we access a web page and want to see an image, the image is loaded thanks to a link indicating where the image is stored; a server. As we already know, if that server is turned off or out of service, the image will not be able to be loaded in our browser. However, if other users were able to access the web page before it failed, they may have the image still in their cache (Google caches all the web pages it crawls). It would be great to be able to access that file through another user’s cache so that it doesn’t depend on the server always being operational.
That’s basically what IPFS does. IPFS uses a distributed storage system very similar to Bittorrent and now we no longer ask where the file we want to view is but what file you want to locate. When users store their files on an IPFS server, this server generates a hash code to recognize it unambiguously. IPFS servers are interconnected in a decentralized network and when we request a file from the network, the system asks “who has this file” and retrieves it from any computer that is connected to the IPFS network.
dTube and dSound are two services that use the IPFS system to make video and audio streeming saving a lot of infrastructure costs.
Install an IPFS server
The easiest way is to install the desktop version from the github of ipfs.io
There are versions for Windows, Linux, and Mac.
Once installed we can connect to the IPFS network.
To upload a file we can click on the +Add button
We select the file from our computer and accept. Now, our server has generated the hash of the file and we can share its address to make the file accessible.