Mr. World Wide turn Mr. Interplanetary

Owen Tran
Points San Francisco
4 min readApr 18, 2016

--

The Hypertext Transfer Protocol (HTTP) is so ubiquitous, 2 year olds around the world are swiping away at their favorite web pages on yogurt stained tablets. HTTP is the backbone of the World Wide Web and has reliably served endless kitten pictures since 1989.

Back in the day, anyone could throw up a blinking webpage with links to their favorite cereal. Today, there is a centralization of data and services into the hands of a very few companies (Google, Amazon, Facebook, Microsoft, Yahoo, Medium, Reddit, etc). All of this HTTP traffic needs to travel through datacenters and the Internet backbones which connect these datacenters from folks in the US to all those K-Dramas in Korea.

In addition, with the push of everything into the “cloud”, there’s a growing percentage of sites hosted on the same infrastructure which lights up Twitter with the next AWS outage or Google Cloud Platform network issue. And that is if Twitter is not fail-whaling.

To summarize, there’s some baggage with HTTP:

  • Current availability of the website (site outages)
  • Future availability of the website (the dreaded 404)
  • Websites can be shutdown if it’s not on strategy or has such low traffic that it doesn’t generate enough traffic to be cost-effective to run

Bodacious naming

So, how do you improve on something as ambitious as the World Wide Web? You come us with an more awesome name… the InterPlanetary File System (IPFS).

Imagine if you will, that every piece of content is versioned like git, but shared as a bittorrent so that websites are completely distributed, have no origin server, can run entirely on the web browser, and have no server to talk to!

What dark magic is this?

If you use git, you are hopefully familiar with the git commit hashes which is actually a 40 character SHA-1 hash that generates a unique identifier for that particular version of the code. If you trust git and all the inner workings of Git’s tree storage of objects, then you can use this system to create versioned content (e.g. webpages, images, etc).

So, in the IPFS world, instead of referring to objects with a URL, objects are referred to by their Base58 encoded hash. No need to worry about a domain name, and the lookup is very efficient with the distributed hash table (DHT). Any change results in a new hash generated for that object, just like git.

ipfs object get QmarHSr9aSNaPSR6G9KFPbuLV9aEqJfTk1y9B8pdwqK4Rq

History lesson, Napster was the first large-scale P2P content delivery system, but required a central index server which made it vulnerable to attacks and lawsuits. A distributed hash table uses a structured key-based routing that allows decentralization, but only supports direct exact-match searches (the object id, no name searches).

Every machine running IPFS would be a “node” as part of the torrent-like “swarm”. When you run the get command you are sending out a request to all machines connected to the network to begin sending pieces of it to your machine. This ecosystem allows a torrent-like experience, with peers serving each other content quickly and accurately without worry of proximity to the original host of the content. Accuracy of the content can be verified easily with the hashes employed on both ends of the exchange.

In short, instead of torrenting the newest episode of Game of Thrones, you can use IPFS to read your favorite content-heavy news site. The advantages of IPFS:

  • Content served on IPFS will be around forever, if one node hosting it goes down there will be others
  • Direct Denial of Service (DDoS) lose their sting with so many hosts
  • Content would be available offline by default

Viewing the latest blog entry for bacon inspired recipes by hashes may be a barrier of entry for some, so there is the Inter-Planetary Naming System (IPNS). IPNS adds a small amount mutability to the permanent immutability that is IPFS. It allows you to store a reference hash under a namespace, so it can have the latest hash, just like a git branch references the latest commit.

http://gateway.ipfs.io/ipns/<your-peer-ID-hash-of-your-public-key>

Challenges and the Future

IPFS is a creative use of proven technology to address the growing shortfall of HTTP and reliance on the goodwill of the Internet to host content. IPNS can be used to map HTTP addresses which can hasten the adoption of IPFS into major browsers, however, IPFS is best served statically. Solutions for serving dynamic content will need to be further developed (see Orbit P2P chat application on IPFS).

HTTP is going nowhere in the near-term (except to HTTP/2), but with the tensions of centralization of data and services, bandwidth latency/costs in developing countries, and the disruption of blockchain technology, WWW may go interplanetary, or even intergalactic.

When it comes to envy y’all is green
Jealous of the rhyme and the rhyme routine
Another dimension new galaxy
Intergalactic planetary

--

--