IPFS, distributed file system for the web

Leturia Azkarate, Igor

Informatikaria eta ikertzailea

Elhuyar Hizkuntza eta Teknologia

Since its creation, the Web is based on computers called “servers”, in which the content is stored and in which “serve” users when requested through the browser. This dependency on servers has disadvantages in terms of speed, breakdowns, censorship or preservation of historical ones. To overcome it, the IPFS system has been created, which allows to store copies of files distributed on many computers and servers and serve among all. It is a P2P system, but renovated and with many other characteristics of interest. IPFS could bring to the web the biggest change ever experienced, the real revolution.
ipfs-webarentzako-fitxategi-sistema-banatua
Ed. PIRO4D/Pixabay

Two years ago we wrote in this same section of this magazine the article entitled Decentralizing the web. There we said how a spider web emerged so that information and content were decentralized and distributed, but over time most of it was concentrated on a few nodes (and in a few companies): social networking sites, messaging programs, online office services, search engines and a few other extended websites. This concentration poses great problems: accumulation of wealth, dependence, possibilities of censorship... For many of them decentralized alternatives were being created (Mastodon, Pixelfed, Peertube, Nextcloud, Matrix...) that allowed the distribution of information in different communities, each of them is on their servers, but in turn they can communicate with each other.

However, all these decentralized services are based on computers called servers. In fact, the HTTP protocol, the basis of web communications, is a client-server communication, in which there are computer servers that store information (powerful computers in the web infrastructure) and client computers that consume information. And depending on these servers you can slow down, interrupt, censor... Obviously, the problem is less in the decentralized model than in the centralized one, since it is distributed in more servers, but there is a problem.

IPFS or InterPlanetary File System

To solve this problem arises the IPFS protocol and free software, whose acronym means InterPlanetary File System. This protocol serves to host and serve duplicate files and content on many computers across the globe, including users.

In view of this definition, many are P2P networks, such as eDonkey or BitTorrent. And it's actually like them, but it has several differences. On the one hand, it has integrated several new technologies that did not exist at the time of its creation (version control, proprietary system of domain names, Blockchain concepts, encryption...). On the other hand, it arises from the need to improve the web and not from the fact that the audiovisual content (movies, music...) protected by copyright (movies, music...) can be downloaded and shared in a legally uncertain way (although its use cannot be avoided). Finally, the IPFS is designed for the web as a substitute or complement to the HTTP protocol and integrate it into the web browsers.

With IPFS, anyone who wants to make available content on the web (a document, a video, a web...), will not have to get a hosting server and upload the content to it: The IPFS will create a cryptographic hash for this content (a series of identifying characters of the content) and copy the content to other computers on the IPFS network, so that the content created by third parties will be copied into itself. In addition to the content, a document called DHT (Distributed Hash Table or Distributed Table Hash) is distributed over the network indicating the computer on which each content is found to know who to ask for it when someone needs a content. When a particular content is required, multiple nodes will be ordered simultaneously and obtained faster. And because content is on multiple nodes, censorship is avoided.

The usual website identifies a content with its URL, i.e. http(s):// plus the domain plus the file path, and the domain is associated with a server IP address. Well, in the IPFS system, ipfs:// plus the hash mentioned plus the file path, a resource is identified that will exit the DHT table on which node it is located. On the other hand, because it is a long series of characters difficult to remember the hash, the DNSLink is used to assign names easier to remember to hashes. In addition, IPFS is designed to save all web history. If we have updated a specific content that is in it, the old content is not deleted, it will continue on the network along with the new one. But for the new content a new hash is created and, if desired, the previous ones can also be accessible through the system called IPNS.

Available

IPFS was born in 2015 and basic tools for creative content and browser accessories were created to use the system. However, it was not easy for ordinary users to use it. To respond to this, various agents of the web launched the steps to IPFS, which have allowed to use IPFS practically from the beginning. For example, in the referendum held on October 1, 2017 for Catalan independence, after the closure of the referendum website by the Spanish government, the lists on which each citizen should vote were placed on the IPFS.

In January 2021, the Brave browser implemented the ipfs:// address drop capability, and others are expected to join shortly. So far, the use of IPFS has been very small and experimental, but it can be thought that making it available in browsers will increase much use.

However, for the moment it is not possible to pass the full current web to the IPFS. In fact, most of the website is made up of dynamic websites, that is, pages that are dynamically created by programming at all times: according to the search words and according to the user's history and profile; those that provide each registered user with the timeline of each day of a social network… The number of possible combinations is huge and very variable, and it is impossible for all of them to enter and constantly double in the IPFS. Its creators claim that basically the IPFS is also intended for dynamic content, but at the moment it is not clear that it is possible in practice. Therefore, until there is a solution for dynamic websites, at least, the IPFS will not completely replace HTTP but both will coexist.

However, if static websites, static content of dynamic websites, information that some government wants to ban, etc. pass to IPFS and can benefit from its advantages, we can say that it is already going to be a big change for the web. The real revolution is that the IPFS can be used together with the HTTP protocol, the only way to make available and distribute the contents since the creation of the web.

Babesleak
Eusko Jaurlaritzako Industria, Merkataritza eta Turismo Saila