IPFS stands for InterPlanetary File System, an abbreviation that sounds like it came from a Sci-Fi franchise like Star Wars in fact it’s a technology in some ways similar to commonly used BitTorrent protocol for data exchange. Speaking in technical terms, IPFS is a content-addressable, peer-to-peer method of storing and sharing hypermedia.
It was developed in 2015 by Juan Benet to facilitate the development of decentralized applications. The global goal of the protocol is to make the Internet a faster, more secure and transparent place than it is today.
IPFS is a distributed P2P file system, in other words a completely decentralized content delivery network (CDN), that allows an unprecedented degree of flexibility in handling and storing data.
The main unit of information storage is 262158 bytes or less, that contains parts of file and hyperlinks to other associated blocks. One of the weak spots of IPFS used to be the fact that the data loaded from the web was copied into the block storage on your hard drive, which lead to files occupying twice the size. Last year came the long-awaited “--nocopy” option, which fixed this imperfection and allowed the source files to be used as block source.
The similarity to BitTorrent is in IPFS you can’t browse any catalogue or search a file by its name. The IPFS network could be described as a BitTorrent swarm exchanging files within one Git-repository.
Too complicated? Just imagine BitTorrent, but more flexible and scalable, a uniform P2P online file storage space. The developers have a very ambitious goal set for their project - to replace HTTP protocol by their cryptographic IPFS.
How does IPFS work
IPFS is an open source project. It has a cross-platform client, written in GO. It can be downloaded, compiled on any system. It’s launched by a simple command ipfs daemon, all interactions happening via a simple web interface. On addition of a file or a catalogue, the system produces its multihash - a SHA128 ID, which comprises 3 parts (hash function, size in bytes, hash itself). Multihash has some room to grow, allowing the network to employ more secure hash-functions in the future. Multihash is included in the content ID.
The access to the network is available via gateway.ipfs.io. You’re required to know the multihash of the file you’re trying to access, in order to get its address, which looks like this http://gateway.ipfs.io/ipfs/[multihash]. There are two ways you can access IFPS - by creating your own local node and becoming a part of the infrastructure, or via an external public gateway.
One of the great advantages of this P2P hypermedia protocol is that sites no longer require a centralized file storage for files, which defies one of the Internet’s basic principles. Currently, when HTTP protocol is employed, a file can be located and downloaded from just one location (computer/server), whereas IPFS allows files to be downloaded from multiple locations simultaneously, resulting in considerable speed gains.
Moreover, an HTTP download can easily be interrupted if an intermediary link stops responding. We’re approaching the time when content delivery costs become a defining factor and IPFS will provide the cutting-edge advantage to both content producers and consumers.
Due to its nature, IPFS has an immunity to DDoS attacks, which plague a lot of centralized internet resources currently. On top of that, the decentralization is advantageous when internet access is unstable, it even allows data blocks to be accessed via offline cache when available.
Another potential hidden advantage of IPFS can be its IoT friendliness. Even now a multicooker with WiFi connection or a light switch are clogging the Internet network with their queries, and later on as the numbers of such appliances will see a drastic increase, the network could be overloaded. In this case IPFS with its simplicity and distribution principle will shine and leave the bulky and slow HTTP behind.
Finally, let’s turn to the example of Netflix, one of the largest content provider companies, which has recently started large-scale research into scalable P2P streaming technologies. The well-known CDN-provider CloudFlare is also actively researching this technology. The company was founded in 2009 and since then has attracted USD182 million investments. This illustrates the growing interest of large companies in distributed streaming, and yet again demonstrates the demand for projects like IPFS. This, and the fact that IPFS is open source, makes a convincing case even for a giant like YouTube.
In other words, IPFS can shape the Internet into the platform of our dreams, which is impossible due to current technical limitations. This protocol enables sustainable connections between people who happen to be offline and online sporadically, at a lower cost and with fast content delivery times.