Why Libp2p

Why Libp2p

Welcome! If you're new to Libp2p, you've come to the right place. Before understanding what is Libp2p, let's first see why do we need Libp2p in the first place and Why do we need to rethink networking in 2019?

In order to understand its significance, we have to go back in history.

Around the 1960s, the early research on ARPANET(predecessor of the internet) began around the question that

How do you build a network which is so resilient, so that it could even survive a NUCLEAR WAR?

The reason that this topic was of such interest in the 1960s was that most of the communication infrastructure at that time looked like this:

Bell Telephone Switchboard Operators

These were banks of humans operators connecting wires to facilitate country-wide communication. This was a highly centralized system, which could be destroyed easily in a nuclear war.

Fast-forward to today’s world, most of the internet companies today have centralized servers, most of which are hosted in the data centers outside the cities. The internet we see today is still somehow full of services similar to the bank of human operators which are highly centralized and fragile(well, we aren’t in a constant threat of a nuclear war today, but any technical or natural disaster can cause great damage).

But, Why do we need to rethink about networking in 2019?

Today, we are dependent on the internet more than ever. We are dependent on it for life and death situations. But the current internet, as we see it today is quite fragile and has several design problems. Most of these problems stem from the location-addressing.

Hmm, But What's location addressing?

To understand this let's take an example of a library with a lot of books.

When you look for a book in the library, you often ask for it by the title. That's content addressing because you're asking for what it is.

If you were using location addressing to find that book, you would ask for it by where it is: "I want the book that's on the second floor, first stack, third shelf from the bottom, four books from the left." If someone moved that book, you would be out of luck!

It's the same on the internet(like a library) and on your computer(like a library section).

This means that whenever any device(your phone, laptop, fridge, car) connects to the internet(via wifi, broadband, satellite…whatever) it gets a name(and hence the data stored in it) based on its location.

An example of a location-based address(18.205.129.69) is shown below.

The proposed solution to this is content addressing, which allows a much resilient, peer-to-peer model.

However, in order to give content addressing properties to the current internet, we have to go deeper into networking and overcome many of the challenges that the current internet infrastructure has. These challenges include things like:

  • NATs: NATs blind devices from each other on the network. Ever tried to host a website from your college network? I bet the experience would have sucked.
  • Firewalls: Apply to restrictive filters on the network, which restricts different devices to talk to each other. Every got facebook blocked on your office networks? Yeah, that's firewalls right there.
  • High-latency networks: This is why sometimes the internet is slow, and you are mad because your favorite movie on Netflix is buffering.
  • Reliability: Networks which are just not reliable and keep failing. We all have a memory of one shitty wifi that would just lose connection every time.
  • Roaming: Problems with changing IP addresses while roaming due to location-based addressing. We all use free wifi of the coffee shops that we visit. While using the wifi your device is assigned an IP address(the identity of your device). When you move out of the coffee shop, your IP changes(as you disconnect from the wifi). So, your device never has a single identity that stays the same over a period of time.
  • Censorship: The fact that Google is banned in China and children(well, everybody) of Turkey have never used Wikipedia for their school assignments.
  • Runtimes with different properties: Lots of devices with very different connectivity properties force developers to work very hard to get around their limitations to get connected with each other, and a lot of times they are just simply not able to connect at all.
    Ever met a network engineer(IT guy) having a bad day? Well, that's the story of every IT guy.
  • Innovation is super slow: Innovation in networks land is really slowwww…It takes years or even a decade for a new protocol to go down the OSI stack and to be deployed on a large scale. Even with a huge amount of funding, it might take years to decades to deploy new fantastic ideas to the internet's fabric.
  • And the list goes on…

These problems are partly because of the location-addressing model. The proposed solution to these problems is content-addressing.

Libp2p is not the first project that is working on the peer-to-peer content-addressing model. There have been a ton of projects like eMule, Kazaa, LimeWire, Napster, BitTorrent, some of which even exist until today. There was a lot of research done on algorithms like Kademlia, Pastry which powered these projects. Even though all these projects existed and got popular, it is really hard to leverage the work done in the past. Most of these projects have the classic software usability problems.

These problems include:

  • Lack of good documentation, or none at all.
  • Restrictive Licensing or no licensing to be found.
  • Old with last update more than a decade away.
  • No easy to reach, point of contact.
  • Closed Source(Product) or the source doesn't exist anymore.
  • No specification provided.
  • The implementation doesn't expose a friendly API.
  • Projects that are tightly coupled with a specific use-case.
  • Make a lot of assumptions about how they work.

And this is something that we still see today.

A good example of this is WebRTC, the peer-to-peer transport of the web platform. Most of its opensource implementations are build by hacking the Chrome browser and are buggy and unreliable.

So, there is a need for a future-proof framework, that can efficiently encapsulate all the standards, which would allow:

  • faster innovation, as the things are modular as-well-as compatible.
  • future-proof system; so that things do not break as we add new things in the coming future.
  • cross-compatible; not only this allows new things to be added but also keeps the support for previously used standards, so that we don't kill the legacy systems.

Well, I know what you are thinking…

Are we talking about just another standard?

But, no. We are not talking about just another standard. Instead of creating just another project with another "unique" protocol, we are trying to build a toolkit that allows creating and managing these standards and protocol that do not suffer from the classic software usability problems.

Now, as we know Why do we need to think about networking in 2019 and Why do we need Libp2p, let's see What is Libp2p?.

Subscribe to SimpleAsWater

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe