Family Best Time >> Electronics

How the Interplanetary File System (IPFS) Could Decentralize the Web

Let's imagine you are downloading the latest memes and patiently waiting for the download to complete. The meme, of course, is fire, so you send a link to your friends. They grab the file from your phone and then start sharing with their friends. At this point the meme lives on a couple dozen devices so when someone new gets the link they end up connecting to several other people and getting a few bits from each of them making the download almost snapshot.

ContentsWhat is the Interplanetary File System?Why is it great?How It Works:The Short VersionHow It Works:The Technical VersionContent Addressing:What, Not WhereMerkle-DAGs:Everything Has A CID, And They All Are ConnectedDistributed Hash Tables:How IPFS Locates ContentIPFS Is Cool, But Will It Take Off?

Thanks to the Interplanetary File System, the very real and surprisingly easy-to-use system just might be our key to a faster, more democratic internet. As described above, the basic idea is that user devices store, index, and serve data that currently resides on centralized servers. If that sounds a bit like cryptocurrency, you're not wrong – the man behind the project, Juan Benet, described IPFS as "In a sense, doing to websites… what Bitcoin did to money.“

What is the interplanetary filesystem?

If you know how BitTorrent or any other P2P (Peer-to-Peer) technology works, you are the best way to understand what IPFS does. It sends files (including the HTML, CSS, and JavaScript files that make up most websites) and chunks of files between users' devices, much like torrenting a piece of public domain music totally legally. /P> How the Interplanetary File System (IPFS) Could Decentralize the Web

  • Decentralization:no single source can control or access the data.
How the Interplanetary File System (IPFS) Could Decentralize the Web
  • Information preservation:Since no single server stores all the data, it cannot just disappear and take away all your websites, for example, GeoCities.
  • Faster and more stable connections in poorly connected areas:As long as the content you want has been downloaded to a location you can access, you don't actually need to establish a longer distance connection , which would be extremely useful in areas with or compromised connections.
  • Censorship resistance:not perfect, but better than a centralized model.

How it works:the short version

Everyone can use the IPFS network now, because it has become very user-friendly. Here's what happens:

How the Interplanetary File System (IPFS) Could Decentralize the Web
  1. When you add a file to IPFS, the file is divided into blocks, each of which is executed through an algorithm and given a unique ID. The entire file, including these block IDs, also receives an ID. Initially, your machine will be the only place people can get the file, but other nodes (machines) can also pick it up and distribute it.
  2. If the network notices that some of your data is identical to the content already stored there, it just uses it instead of adding a copy. Let's say you're hosting a "deluxe edition" of an album you've recorded. Ten of the songs are identical to the album you already recorded, but two of them are new, so when you add them to IPFS, the system will recognize duplicate tracks and use the existing IDs for them, only adding new identifiers. for the two new songs.
How the Interplanetary File System (IPFS) Could Decentralize the Web
  1. Each node on the network stores data (probably data the node wants to distribute, plus data the node has opened recently) and part of an index that helps people find where to find content on the network .
  2. If you want to open a file, you ask the network to find its identifier and connect you to whoever has it. A naming system called IPNS converts human-readable names into machine-readable identifiers that the system will look for.

Even simpler translation:IPFS assigns a name to each piece of data, lists where that data is located at any given time, and helps devices send data directly to each other.

How it works:the technical version

There are three main things that make IPFS work:content addressing gives data identity, Merkle-DAGs give it structure, and distributed hash tables tell you where to find it.

Content addressing:what, not where

How the Interplanetary File System (IPFS) Could Decentralize the Web

Most of our current content has location-based addresses (C:/Users/Username/Documents, 192.124.249.3, etc.) that tell us where to go to find the data. This won't really work in a decentralized system, as content can be stored just about anywhere, so systems like IPFS and BitTorrent use "content addressing" instead.

A content addressing system works by running a piece of data through an algorithm that assigns it a unique identifier, or hash. Each identical copy of the file will have the same ID, which means that when IPFS searches for it, it can find all instances stored on the network.

Merkle-DAGs:everything has a CID, and they're all-connected

How the Interplanetary File System (IPFS) Could Decentralize the Web

As much as it sounds like a German political party, a Merkle-DAG (directed acyclic graph) is actually a way to organize data. In this system, each piece of data has its own content ID (CID):folders, files, blocks of data within files – everything. This means that files can be split into different parts, authenticated and reassembled.

The IPFS documentation describes it as a "bottom-out turtle scenario" because everything can be broken down into a collection of data identifiable by a CID. A folder's CID will direct you to a collection of file and folder CIDs, whose CIDs will then direct you to other CIDs that represent other content items, also with their own CIDs. Any changes to a file will cause its hash and folder hash to change.

How the Interplanetary File System (IPFS) Could Decentralize the Web

The data doesn't really live here - it just tells you where to find it and how all the pieces should fit together once you have them. The Merkle-DAG is essentially what gives all of these identifiers a structure, much like your computer's file system.

Distributed hashtables:how IPFS locates content

How the Interplanetary File System (IPFS) Could Decentralize the Web

So how can we find who has the data we want? Basically, there's a large database that matches content IDs with the locations of computers that host that content, and the database itself is shared among everyone on the network. When you request a piece of content represented by a CID, your computer searches for the CID until it finds a list of people who have it. Your computer then connects to these people, downloads the items you need, and puts them together. This is the distributed hash table – basically a big list of who has what.

IPFS is cool, but will it take-off?

How the Interplanetary File System (IPFS) Could Decentralize the Web

IPFS started in 2015 and has grown rapidly ever since. Dozens of applications and sites have been built on it, such as a blockchain file storage system (Filecoin), and a GeoCities replacement (Neocities). It's managed to strike the right mix of decentralization and user-friendliness, which is probably why it's become a go-to for projects looking to decentralize, like Sociall (a decentralized social network) and Courageous.

>

Cloudflare's IPFS Gateway has been a great success, and using the network is getting easier and easier; All you have to do is download a program and install a browser extension. Of course, there's some debate over whether this really is the best solution - it's far from the only project with the same vision - but it shows no signs of slowing down. Although it won't completely replace HTTP, it certainly looks like it will be part of the next version of the Internet.

Image credits:Directed Acyclic Graph, Hash Tree, IPFS