|

What Is The IPFS Protocol?

What Is The IPFS Protocol

Like the Beastie boys say, InterGalactic Planetary – Planetary InterGalactic, IPFS is a new transport technology for the web, and it’s name is: The InterPlanetary File System or IPFS. Currently, the entire web depends on the Hyper Text Transfer Protocol or HTTP for which we as web developers are oh so familiar. For those able to handle reading sleep inducing white papers, here is the actual RFC which explains exactly how HTTP/1.1 works. So why do we need this thing that sounds like a science fiction movie, and why now?


How HTTP Works

Way back in 1990, Tim Berners Lee came up with the idea for a worldwide web. Think about that for a moment. When you think about the size of the current internet at about 5 billion web pages, give or take, it is amazing to think of how fast his invention has grown. As we can see HTTP has done it’s job amazingly well. HTTP is works in a request / response fashion. As web developers, we are most familiar with the typical GET or POST request however there are also others. We call the entire suite a REST based or RESTful type protocol and include the methods of GET POST PUT PATCH and DELETE. To see how basic HTTP works, we can test a request / response cycle ourselves using a simple tool like hurl.it or hurl.eu. Let’s try it.

HTTP Request

http request


HTTP Response

http response

So we can see with this most basic of examples, exactly how the HTTP request / response process works. A client makes a request using one of the method types we discussed above, and the server provides a response with the resource which was requested, along with a 200 OK if all goes well. Check out the entire list of possible responses here. To see another example of a request / response HTTP lifecycle, you can also check out this tutorial.

What it does well

HTTP is clearly working. We have a thriving internet with billions of pages, and entire new world economies built on this very platform. HTTP allows for efficient identification of resources via a MIME type. This makes it possible for the receiving end of the connection to easily process the incoming resource, since it has been told exactly what it will be dealing with. Another benefit of HTTP is that it can make many simultaneous requests at once or in succession. A web page may consist of many files, and they may also be different types. HTTP makes it possible to download and assemble all of these dispersed files to be rendered as what we all perceive as a completed web page. When HTTP was created, the way in which it used addressing was revolutionary. By a combination of DNS and HTTP, everyday users could easily remember how to visit something like http://www.yahoo.com instead of the user unfriendly https://98.138.253.109. HTTP also has a large amount of flexibility, is easy to program for, makes for excellent search functionality and more.

Where it falls a bit short

With HTTP, the client must connect directly to a given server in order to fetch the resources needed for a webpage. The problem with this is, that server or server may be on the other side of the world, and bandwidth does become expensive. In addition, you have a single point of failure. If that server goes down, so to does your ability to access the resources you are looking for. HTTP is not peer to peer, where resources are fully distributed. This architecture can lead to slow connections, reliability problems, and puts to much power in the hands of the network operators. (Do you like paying through the nose for mobile data?).


Welcome To IPFS

To address these shortcomings, a group of open source software engineers are proposing the IPFS protocol. Instead of relying on a client / server architecture, IPFS uses a peer to peer architecture which relies of a distributed collection of files to compose and present resources. IPFS is different in that everything is addressed by content and identities, and is quite radical once you wrap your mind around how it works. You are likely familiar with peer to peer technologies already, in the form of BitTorrent, and other popular peer to peer services that have come and gone over the years. The official IPFS project describes this as:

IPFS provides a high throughput content-addressed block storage model, with content-addressed hyperlinks. This forms a generalized Merkle DAG, a data structure upon which one can build versioned file systems, blockchains, and even a Permanent Web.

From HyperText to HyperMedia

HTTP as we know stands for Hyper Text Transfer Protocol. Hypermedia does not have an official acronym, so I will coin one now. HMTP – Hyper Media Transfer Protocol. Hypertext allows text based documents to be served as files via centralized servers on the internet, with the killer application being the hyperlink. IPFS allows all files to be distributed everywhere, and made accessible via content and identity addressing. Think of it as a BitTorrent that powers the entire web, making it faster, safer, more open, and without any single points of failure. It is basically BitTorrent for the entire internet.

Will IPFS Catch On?

So will the InterPlanetary File System catch on? It’s really hard to say. HTTP has matured to a point where there is a viable internet platform for the world to enjoy. What we do have currently however, are some extremely powerful monopolies that control vast sections of the entire web in addition to directing traffic to whom it may benefit most. So as the web has evolved, we have seen power shift from the individual contributor or small business, to the mega corporations. Let’s not be fooled, there are powerful organizations that would be perfectly happy to make sure the status quo remains. At the same time however, there is a valid argument that the web as it exists today, is simply running up against the limitations of what HTTP is capable of providing. In addition to this, the video and media heavy modern internet with services such as YouTube, HULU, Netflix, Vemo, and more are pushing the very limits of content delivery and is extremely expensive.

Remember Diaspora?

Does anyone remember the big hype surrounding Diaspora when it was first announced? I sure do, and I remember the talk of how it would fix everything that is wrong with Facebook and make social networking good again. Facebook has it’s issues, the unending ads, the concerns for privacy, questions about data ownership, and more. Diaspora came along and said, hey, we’re going to fix all of that and more – and we’ll take over the social networking space in the process. It was a great idea, a great vision, great software even. Did it ever catch on? Nope.

What about Windows?

Surely we’ve all heard the stories of how Windows was actually an inferior technology to what Apple or Xerox was offering at the time. Why then did Windows take over the entire industry while the other two lagged? Sometimes, this is just the way things shake out.

As much as IPFS sound like a cool idea, and that it could solve all of the web’s problems, it probably will not see any large scale adoption any time soon. My guess is that if IPFS does not take hold, HTTP will continue to evolve to support more features, more distribution, better safety mechanisms, and more efficient content delivery. Only Time will tell!

|