01 logo

What is IPFS?

Interplanetary File System Explained

By Exploit The EdgePublished 2 years ago 5 min read
Like

Today the Internet is such an important tool in our everyday life, we use it to consume media, communicate with friends and colleagues, learn to handle our finances, and much more… but the web as we know has a problem. A big problem. The information is mostly centralized.

It’s all stored on big server farms, and these are usually controlled by a single company. Have you ever wondered what would happen if sites like YouTube or Wikipedia would go offline?

The centralization brings another problem with it, and that is censorship. Because content is hosted on just a few servers, it’s easy for governments to block access to them. China is a good example of how governments could limit and drive the information.

But then why do we keep using such a model?

That’s because we have high expectations when it comes to the web. We want pages, images, and videos to load instantly, and we want them of high quality. Centralizing servers allows companies to have complete control over how fast they can deliver all of this content. Another reason we use this model is that there just isn’t a good and fast alternative, but that might be about to change thanks to IPFS (the interplanetary file system).

They have very ambitious goals: they want to make the web completely distributed, by running it on top of a peer-to-peer network that works similarly to how BitTorrent works.

How do we access content on the web?

Let’s say you want to download a photo from the internet. When you do that, you tell the computer exactly where to find the photo, in this case, the location of the photo is the IP address or the domain name. This is called location-based addressing. You tell the computer where to get the information, but if that location isn’t accessible, you won’t get that photo. However, when that happens, there is a high chance that someone else has downloaded that picture before, and still has a copy of it, but yet your computer won’t be able to grab a copy from that person. To fix this IPFS moves from location-based addressing to content-based addressing. Instead of saying where to find a resource, you just say what it is that you want.

How does that work?

Every file has a unique hash, which can be compared to a fingerprint. When you want to download a certain file, you just ask the network who has the file with this hash, and someone on the IPFS network will provide it to you. Because you use a hash function to request the file, you can verify what you have received.

Another nice feature of using hashes to address content is deduplication. When multiple people publish the same file on IPFS, it will only be created once, and that makes the network very efficient.

How does IPFS store files and makes them accessible to others?

Files are stored inside IPFS objects, and these objects can store up to 256 kilobytes worth of data; they can also contain links to other IPFS objects. Files that are larger than 256 kilobytes are split up into multiple IPFS objects that are all 256 kilobytes in size, and afterward, the system will create an empty IPFS object that links to all the other pieces of the file.

IPFS is data architecture is very simple and it can be very powerful; this architecture allows us to use it as a file system. Because IPFS uses content-based addressing, once something is added, it cannot be changed anymore; it’s an immutable data store, much like a blockchain.

But then how do we change stuff on it?

IPFS supports versioning of your files: let’s say you’re working on an important document that you want to share with everyone over IPFS; when you do that IPFS will create a new “commit object” for you. This object is really basic: it just tells IPFS which commits went before it, and it links to the IPFS object of your file. If you want to update this file, you just add your updated file to IPFS and the software will create a new commit object for your file; this command object now links to the previous commit, and this process can be repeated endlessly. IPFS will make sure that your file plus its entire history is accessible to other nodes on the network.

Like everything, there are downsides to this. The biggest problem that IPFS faces is keeping files available. Every node on the network keeps a cache of the files that it has downloaded and helps to share them if other people need them; but if a specific file is hosted and those nodes go offline, then that file becomes unavailable and no one can grab a copy of it.

There are two possible solutions to this problem:

- incentivize people to store files and make them available

- proactively distribute files and make sure that there is always a certain number of copies available on the network.

Here’s where FileCoin comes into play. It’s a blockchain built on top of IPFS that wants to create a decentralized storage market. If you have some free space on your hard drive you can rent it out to others, and make money from it in the process. FileCoin creates a strong incentive for nodes to keep the files online for as long as possible because otherwise they won’t get rewarded; the system also makes sure that files are replicated on many nodes, so they cannot become unavailable.

How IPFS can be used?

- IPFS is distributed and there are no central servers the government can block.

- DTube is a site like YouTube but entirely distributed and hosted on IPFS, anyone can publish videos and anyone can help to support the network, and no government or central authority can censor a video.

IPFS is a very ambitious project that could lead to a truly decentralized internet.

product review
Like

About the Creator

Exploit The Edge

Reader insights

Be the first to share your insights about this piece.

How does it work?

Add your insights

Comments

There are no comments for this story

Be the first to respond and start the conversation.

Sign in to comment

    Find us on social media

    Miscellaneous links

    • Explore
    • Contact
    • Privacy Policy
    • Terms of Use
    • Support

    © 2024 Creatd, Inc. All Rights Reserved.