Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breaking Free from the Client-Server Model #459

Merged
merged 18 commits into from
Sep 19, 2022
Merged

Conversation

TheDiscordian
Copy link
Member

@TheDiscordian TheDiscordian commented Aug 23, 2022

WIP This is ready to go!

TODO

@2color 2color requested review from 2color and emilymvaughan August 30, 2022 13:30
@2color 2color marked this pull request as ready for review August 30, 2022 13:30
@TheDiscordian
Copy link
Member Author

All that's left is the publishing date (not sure what it should be), and to upload the videos to the IPFS YouTube channel (but I think if that's going to be a blocker, we should just review+publish).

CC @2color

@2color
Copy link
Member

2color commented Sep 9, 2022

Normally we publish blog posts on Tuesdays and Thursdays.

I don't see anything else scheduled so we can probably publish it next Tuesday.

@emilymvaughan
Copy link
Collaborator

Hey all, we currently have an ecosystem highlight blog scheduled for Tuesday, the 13th, can we push this to Thursday Sept 15th instead?

@2color
Copy link
Member

2color commented Sep 9, 2022

Sounds good! Thanks for the heads up @emilymvaughan

@TheDiscordian
Copy link
Member Author

@emilymvaughan @2color date set for this Thursday, this is ready to go :)

![An outage of just one server can bring several services down](../assets/ipfs-breaking-free/4.png)
### Single Point of Failure

Think of when [AWS, Fastly, Facebook, or YouTube go offline](https://totaluptime.com/notable-network-and-cloud-outages-of-2021/). These events are treated as news, and often slow or even halt productivity. **When one of these services goes offline, it’s much more impactful than just a single image or video being lost**, you’ve now lost access to your ability to make new data available at all! All the data you have hosted in these central hubs is temporarily completely inaccessible, or worse, permanently. The location of the data cannot be accessed, because it’s offline. You cannot ask for the data from the wider web, and expect to receive it, even if another related entity has the very data you’re looking for.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Think of when [AWS, Fastly, Facebook, or YouTube go offline](https://totaluptime.com/notable-network-and-cloud-outages-of-2021/). These events are treated as news, and often slow or even halt productivity. **When one of these services goes offline, it’s much more impactful than just a single image or video being lost**, you’ve now lost access to your ability to make new data available at all! All the data you have hosted in these central hubs is temporarily completely inaccessible, or worse, permanently. The location of the data cannot be accessed, because it’s offline. You cannot ask for the data from the wider web, and expect to receive it, even if another related entity has the very data you’re looking for.
Think of when [AWS, Fastly, Facebook, or YouTube go offline](https://totaluptime.com/notable-network-and-cloud-outages-of-2021/). These events are treated as news, and often slow or even halt productivity. **When one of these services goes offline, it’s much more impactful than just a single image or video being lost**, you’ve now lost access to your ability to make new data available at all! All the data you have hosted in these central hubs is completely inaccessible – temporarily or worse, permanently. The location of the data cannot be accessed, because it’s offline. You cannot ask for the data from the wider web and expect to receive it, even if another related entity has the very data you’re looking for.

![Scaling can be very expensive - an explosion of traffic can translate into an explosion of cost](../assets/ipfs-breaking-free/5.png)
### Costly to Scale

This leads in to my next point: **Scaling can be very expensive**. These expenses don’t always, or maybe not even usually happen linearly. Meaning, an explosion of traffic can translate into an explosion of costs. Whether you host your own infrastructure, or you pay someone else to, you’ll be paying for it if you want it to scale and run effectively. The more users you have, the more traffic that generates, your CPU, RAM, and bandwidth expenses ramp up. On top of this, if users end up depending on your service, you’re obligated to keep this service running and available if you want to retain users and keep them happy. Not everyone can afford these costs, and they can be quite daunting, especially if you just want to create a fun project, technology, or even a blog. A lot of companies mentioned previously turn to advertising to supplement these costs. This results in so much of humanity selling their private information in exchange for free services online.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This leads in to my next point: **Scaling can be very expensive**. These expenses don’t always, or maybe not even usually happen linearly. Meaning, an explosion of traffic can translate into an explosion of costs. Whether you host your own infrastructure, or you pay someone else to, you’ll be paying for it if you want it to scale and run effectively. The more users you have, the more traffic that generates, your CPU, RAM, and bandwidth expenses ramp up. On top of this, if users end up depending on your service, you’re obligated to keep this service running and available if you want to retain users and keep them happy. Not everyone can afford these costs, and they can be quite daunting, especially if you just want to create a fun project, technology, or even a blog. A lot of companies mentioned previously turn to advertising to supplement these costs. This results in so much of humanity selling their private information in exchange for free services online.
This leads to my next point: **Scaling can be very expensive**. These expenses usually don’t happen linearly. In other words, a sudden spike in traffic can translate into an explosion of costs. Whether you host your own infrastructure, or you pay someone else to, you’ll be paying for it if you want it to scale and run effectively. The more users you have, the more traffic that generates, and your CPU, RAM, and bandwidth expenses ramp up. On top of this, if users end up depending on your service, you’re obligated to keep this service running and available if you want to retain users and keep them happy. Not everyone can afford these costs, and they can be quite daunting, especially if you just want to create a fun project, technology, or even a blog. A lot of companies mentioned previously turn to advertising to cover these costs. This results in so much of humanity selling their private information in exchange for free services online.


If you want to host any content at all on one of these platforms you must ensure you’re abiding by their rules and regulations. This can be quite unfortunate when **popular content gets lost to rules changing or updating**, which is quite common with video and graphic media today. As a content creator sometimes it can feel like an impossibly daunting task to solve this problem. One could setup their own services as mentioned previously, however not everyone knows how to do that effectively, and aren’t prepared for the time and costs associated with doing that.

We can do better; **breaking free from the client-server model means re-thinking how the web works as we know it today**. The client-server model represents web2 as we know it today. Love it or hate it, there’s a clear and strong argument for how the web2 model, referring to the client-server model, can be improved. What do we call this new model?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
We can do better; **breaking free from the client-server model means re-thinking how the web works as we know it today**. The client-server model represents web2 as we know it today. Love it or hate it, there’s a clear and strong argument for how the web2 model, referring to the client-server model, can be improved. What do we call this new model?
We can do better; **breaking free from the client-server model means rethinking how the web works as we know it today**. The client-server model represents Web2 as we know it today. Love it or hate it, there’s a clear and strong argument for how the Web2 model characterised by the client-server model, can be improved. So what do we call this new model?


![The distributed web](../assets/ipfs-breaking-free/8.png)

This new model is referring to **the distributed web**, so let’s talk about that, and how IPFS fits in. But first, for the uninitiated, let’s briefly discuss what the distributed web is, and what it means to you. Whether you’re a user or a developer, you can benefit from the distributed web, what I think of as web3.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This new model is referring to **the distributed web**, so let’s talk about that, and how IPFS fits in. But first, for the uninitiated, let’s briefly discuss what the distributed web is, and what it means to you. Whether you’re a user or a developer, you can benefit from the distributed web, what I think of as web3.
This new model is **the distributed web**, so let’s talk about that, and how IPFS fits in. But first, for the uninitiated, let’s briefly discuss what the distributed web is, and what it means to you. Whether you’re a user or a developer, you can benefit from the distributed web, which I think of as Web3.

![IPFS creates mathematically generated fingerprints for your data, called content IDs (CIDs)](../assets/ipfs-breaking-free/10.png)
### Content Addressing

We went over location-based addressing, now let’s talk about one of the fundamental building blocks of an alternative called **content addressing**. IPFS creates mathematically generated fingerprints for data called content identifiers, or CIDs for short. This step relates to something called IPLD or Inter-Planetary Linked Data which is fundamental to how IPFS works to give us content addressing, **breaking us free from location-based addressing**.
Copy link
Member

@2color 2color Sep 15, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this paragraph, I'd suggest:

Suggested change
We went over location-based addressing, now let’s talk about one of the fundamental building blocks of an alternative called **content addressing**. IPFS creates mathematically generated fingerprints for data called content identifiers, or CIDs for short. This step relates to something called IPLD or Inter-Planetary Linked Data which is fundamental to how IPFS works to give us content addressing, **breaking us free from location-based addressing**.
We went over location-based addressing, now let’s talk about one of the fundamental building blocks of an alternative called [**content addressing**](https://docs.ipfs.tech/concepts/content-addressing/). IPFS creates mathematically generated fingerprints for data called content identifiers, or CIDs in short. A CID is a deterministic pointer to data because it is derived from the data and is used as an address to that. In other words, CIDs make content addressing possible, thereby **breaking us free from location-based addressing**.
  • Connecting the dots between CIDs and content addressing
  • Avoid introducing IPLD

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why avoid introducing IPLD?

Copy link
Member

@2color 2color Sep 15, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's another big concept that isn't so easy to understand and doesn't seem critical for content addressing.


Now we’re to the multicodec, **dag-pb**, which is indicating this DAG (directed-acyclic graph) is protocol buffer encoded. The multicodec field itself is an unsigned-varint. The list of supported codecs are available in the [github multiformats repository](https://github.com/multiformats/multicodec/blob/master/table.csv).

Next up is the multihash, which includes 3 things, a multihash algorithm, a multihash length, and then finally the hash digest itself. You can see here we’re working with a **sha2 hash of 32 bytes in length**, then the hash itself trails off the screen. The [multihash specification](https://github.com/multiformats/multihash) is also available in the multiformats github repository.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Next up is the multihash, which includes 3 things, a multihash algorithm, a multihash length, and then finally the hash digest itself. You can see here we’re working with a **sha2 hash of 32 bytes in length**, then the hash itself trails off the screen. The [multihash specification](https://github.com/multiformats/multihash) is also available in the multiformats github repository.
Finally, is the multihash, which can be broken down into three parts:
- The multihash algorithm
- The multihash length
- The hash digest
You can see here we’re working with a **sha2 hash of 32 bytes in length**, then the hash itself trails off the screen. The [multihash specification](https://github.com/multiformats/multihash) is also available in the multiformats GitHub repository.


Now that we’ve broken free of location-based addressing, and moved on to content addressing, what does that mean for us? It means that now transparently, **the network can find new routes around problems**. Problems in this case can be outages, we know that if our node goes down for a period of time that we’re in the clear if we’ve gotten our data onto some other nodes. Or even if a user running an IPFS node happens to have a copy of our data.

With IPFS your node will cache new data until it’s garbage collected, this helps with automatically strengthening the resilience of a CID. This can aid with Internet outages as well in certain countries. As long as some node on the local network has a copy of the data, it can still be served. This shows that in a peer-to-peer network no single node outage or event can cause the service to go down.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
With IPFS your node will cache new data until it’s garbage collected, this helps with automatically strengthening the resilience of a CID. This can aid with Internet outages as well in certain countries. As long as some node on the local network has a copy of the data, it can still be served. This shows that in a peer-to-peer network no single node outage or event can cause the service to go down.
With IPFS your node will cache new CIDs until they are garbage collected, which helps automatically strengthen the availability of those CIDs. This can aid in regional and even country-wide Internet outages because as long as some node on the local network has a copy of the data, it can still be served. What's more, it shows how in a peer-to-peer network no single node outage can cause the whole service to go down.


With IPFS your node will cache new data until it’s garbage collected, this helps with automatically strengthening the resilience of a CID. This can aid with Internet outages as well in certain countries. As long as some node on the local network has a copy of the data, it can still be served. This shows that in a peer-to-peer network no single node outage or event can cause the service to go down.

This knowledge is important when you’re designing your application. You can leverage a gateway, and if you’re tight on time in a hackathon that makes perfect sense. If you want to really create a resilient web3 peer-to-peer application, then it’s important to think about how to achieve resilience. To do that, you must be utilizing the peer-to-peer nature of IPFS. When you rely on a gateway, especially just a single one, then if that gateway slows or goes down, your entire application will go with it. **If you instead use IPFS directly, leveraging it’s peer-to-peer capabilities, then you’re on track to creating a virtually unstoppable service**.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This knowledge is important when you’re designing your application. You can leverage a gateway, and if you’re tight on time in a hackathon that makes perfect sense. If you want to really create a resilient web3 peer-to-peer application, then it’s important to think about how to achieve resilience. To do that, you must be utilizing the peer-to-peer nature of IPFS. When you rely on a gateway, especially just a single one, then if that gateway slows or goes down, your entire application will go with it. **If you instead use IPFS directly, leveraging it’s peer-to-peer capabilities, then you’re on track to creating a virtually unstoppable service**.
This knowledge is important when you’re designing your application. You can leverage a [gateway](https://docs.ipfs.tech/concepts/ipfs-gateway/), and if you’re tight on time in a hackathon that makes perfect sense. If you want to create a resilient web3 peer-to-peer application, then it’s important to think about how to achieve resilience. To do that, you must be utilizing the peer-to-peer nature of IPFS. When you rely on a [gateway](https://blog.ipfs.tech/2022-06-09-practical-explainer-ipfs-gateways-1/), especially just a single one, then if that gateway slows or goes down, your entire application will go with it. **If you instead use IPFS directly, leveraging its peer-to-peer capabilities, then you’re on track to creating a virtually unstoppable service**.

Copy link
Member

@2color 2color left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great overall! Good flow and weaving of narrative and technical details.

Added some suggestions to improve flow and simplify.

Please add the images with an IPFS URL and the missing image of the anatomy of a CID to the PR directly.

@TheDiscordian
Copy link
Member Author

@2color thanks! I really appreciate the assistance with the images. Though I would have really appreciated the larger changes back when it was on HackMD, or at least not the deadline date for publishing :'3.

@emilymvaughan emilymvaughan merged commit 2f782b7 into main Sep 19, 2022
@emilymvaughan emilymvaughan deleted the breaking-free branch September 19, 2022 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants