J. R. Swab

Use This To Decentralize Web Content

Categories: [Technology]
Tags: [open-source], [decentralization], [ipfs]

The InterPlanetary File System (IPFS) is something that I am glad I came across over the past few months. It is an open source way to host files and share them around the web in a much faster and less expensive way.

You probably know by now that I am a massive fan of decentralizing all the things and do not think we need a blockchain to do it every time. IPFS is peer-to-peer and has no blockchain because there is no reason for them to have one. All cryptocurrencies are peer-to-peer, but not all peer-to-peer decentralization has to be on a blockchain.

Peer-to-peer is as it sounds. You connect to another user directly. There is no need for a central server to host, upload, download, or serve files. When there is no central server doing all the work, there is no one point of failure. Decentralization also eliminates the issue of centralized servers shutting you down because they don't like what you say or share. This way to network is a huge step in keeping the internet steeped in free speech.

In a peer-to-peer system, a computer will divide a portion of the resources it has and gives them to the network. These resources can include hard drive space, bandwidth, or processing power. These allocated resources are still the computer but, as with hard drive space, the predetermined amount is used to store information that can be called by other computers on the network. Doing this allows for more space, speed, or processing power to be used than a single computer on the network could hold alone.

Due to this structure, each of the peers supplies data and consumes data. With the most common model we use online today, the server does all the providing while the users on the web do all the consuming.

Better Than HTTP

When we download a file from the internet, we access a traditional server and request to have the data we need. Then the server sends this file over the internet to us little by little until the entire file is in our possession.

This process takes time and resources at a much higher rate than using a peer-to-peer service like IPFS. When we want to download a copy of a file hosted on the IPFS network we get bits and pieces from many computers, not just one. IPFS lessens the load a great deal on everyone overall and allows for slower bandwidth for the supplying computers.

On the IPFS website they claim:

With video delivery, a P2P approach could save 60% in bandwidth costs.

That's pretty epic! Look at YouTube, a centralized video hosting platform that can't seem to make money due to the high costs of both storing and streaming all that video. If a site could implement technology like IPFS, this problem may not exist.

Historical

The assumed lifespan of a webpage is only one hundred days long on average. That is short if you want to recall information you saved from a year ago. From an internet point of view as soon as a page goes offline it may as well never existed.

You may remember all the old Xanga blogs from the early 2000s, but to the internet, they are just in the human imagination. Which makes this a poor way to store anything long term unless you want to keep paying the hosting costs yourself.

IPFS has historical versioning that preserves the past so we as the users can find the information that may now be missing. Versioning also lets many nodes mirror the content of another node so that we will be able to get what we are looking for even if the original supplier goes offline.

Centralized Vs. Decentralized

When we use the centralized model, we are prone to many downsides. One such disadvantage is the control they have over the information that they host. If they do not like what you have uploaded to their server, then they will most likely remove your content.

These centralized servers can also fall victim to governments and bad actors who force companies into share information about the uploader and the content they uploaded. Since these hosting providers are companies, their primary goal is to stay alive to make money and will turn over any information no matter if it is legal or illegal.

When we use a decentralized approach like IPFS, make our content more resilient to deletion. No one entity can delete the files just because they don't agree with what it displays. The more nodes on the network, the harder it will be to take down that content.

How IPFS Works In A Nutshell

  1. Each file receives a cryptographic hash (an identifier) which is the unique identifier for that content.
  2. IPFS then removes any duplicates on the network based on the ID that file received. Since no two files have the same identifier, we can be sure that it is unique. If it does have a match, we can assume that the data is an exact copy with zero alterations.
  3. Each node then stores any and all content it is set up to accept this may or may not include the file that you added to the IPFS network. Your data is "backed up" so to speak on all nodes that will accept your content.
  4. Once the material is finished propagating, we can ask the network for the file of a particular hash. As we download the content, the system pulls bits from many servers hosting a part of that file matching our requested hash.

Ways to support the blog.

If you are an email kind of nerd you can sign up for mine here. You can donate to this site from my Liberapay account if you so choose. If you want a more passive way to support this site, use this link when shopping on Amazon; it kicks some of Amazon's profit to me at no extra cost to you.