May 19, 2021
I'm Digvijay. I try to come up with mental models which helps me think & do stuff efficiently. Know more about me.
Imagine waking up with an idea for the next best approach for carbon sequestration. Super excited, you go to wikipedia.org and uh-oh, the government has banned the site. Something similar happened in Turkey 4 years back. The rapid access to files and information we take for granted is so prone to being censored any moment. The Kim Jong-un of your country would show no mercy if the XYZ news websites don’t stop exposing him.
Responding to the wikipedia ban, Protocol Labs published a mirror of tr.wikipedia.org on a peer-to-peer network. This distributed file sharing protocol is called IPFS (short for: Interplanetary file system, it’s really interplanetary).
There is more than one way to burn a book. And the world is full of people running about with lit matches. - Ray Bradbury, Fahrenheit 451
To understand IPFS, you must know a lil about the protocol we currently use i.e. HTTP. Briefly, it follows the client/server architecture. A centralized computer stores all the files/data, a domain name refers to it’s IP address hence letting you access the content. Which means the breakdown of that computer will cause all the data that has been ever stored there to be lost.
Wonder if suddenly wikis on the entire internet lose their data, in a way humans would have to start over again. Government can just block your fav biotech blog’s IP and you would have to stop your gene therapy experimentations.
The solution is to decentralize the web using protocols like IPFS. In the case of IPFS, each piece of content is referred to with an ID (or CID). You don’t care where it lives (i.e. IP address). The file is distributed among peers trying to access it. Let’s say person X accesses a file uploaded by person Z, X gets a copy or chunk of the file saved. Now anyone trying to access the file with that ID can fetch it from two servers, X & Y . This way, all the peers maintain a cache/clone of the data/file enabling faster delivery of content.
As the file is now stored on multiple computers, you can’t just take it down. Users in LAN can share files even if WAN is blocked or unavailable. Elon just has to open your website once on Mars once and his neighbouring astronauts would have a blazing fast experience. In other words, each computer is connected to every other computer accessing the same file.
Fun fact, the image above is stored on the metaverse (yeet! I tried running a node on my machine and uploaded some content) :wink. Try accessing it using Brave browser — ipfs://QmeLRaHGyXp3VEo3TUkEPocdUexgU86xxcrNL2fh3pu8WH or this url.
It’s time to lay foundations for a truly decentralized (or distributed, to be precise) and borderless web. Developers are cloning the entire wikipedia, literally saving the Wayback machine archives. Visit here to learn about more such applications being built on IPFS.
Torrent is another p2p file sharing protocol. I will talk about it in a later issue when I have more context over distributed computing sorta things. Don’t hate me but I never used Torrent, isn’t it too old for GenZ?