名词解释:对等知识互联网_HTTP与IPFS:对等共享Web的未来吗?

名词解释:对等知识互联网

Thanks to Adrian Sandu, Panayiotis Velisarakos and Tim Severien for kindly helping to peer review this article.

感谢Adrian SanduPanayiotis VelisarakosTim Severien的帮助, 本文进行了同行评审

The Inter-Planetary File System (IPFS) is a revolutionary model that could change the way we use the Internet. Unlike the typical server-client model we’re accustomed to, IPFS is something more like BitTorrent. Does that grab your attention? Then read on!

行星际文件系统 (IPFS)是一种革命性的模型,可以改变我们使用Internet的方式。 与我们习惯的典型服务器-客户端模型不同,IPFS更像BitTorrent。 会引起您的注意吗? 然后继续阅读!

IPFS logo

当今网络的问题 (The Problems With Today’s Web)

The Hypertext Transfer Protocol (HTTP) is the backbone of the World Wide Web. We use HTTP to access most of the Internet. Any website we visit, typically, is via HTTP. It’s essentially a server–client mentality, where our computer sends requests to the server hosting a website, and the server sends back responses.

超文本传输​​协议 (HTTP)是万维网的基础。 我们使用HTTP访问大多数Internet。 我们访问的任何网站通常都是通过HTTP。 从本质上讲,这是一种服务器-客户端的方式,我们的计算机将请求发送到托管网站的服务器,然后服务器发送回响应。

HTTP, though, lends itself naturally to a narrower and narrower subset of services. It’s natural for large services to emerge as the sort of structure of a large portion of the Web, but that sort of centralized environment can be dangerous. If any of the large hosting companies and/or providers of services – such as Google, Microsoft, Amazon, Dropbox, Rackspace, and the like – were to suddenly falter, the results to the Web would be disastrous in the short term. And herein lies the problem (at least one of them).

但是,HTTP自然会使其自身适用于越来越小的服务子集。 大型服务作为Web很大一部分的结构出现是很自然的,但是这种集中式环境可能很危险。 如果任何大型托管公司和/或服务提供商(例如Google,Microsoft,Amazon,Dropbox,Rackspace等)突然摇摇欲坠,那么短期内对Web的结果将是灾难性的。 问题就在这里(至少其中之一)。

In addition to the natural process of centralization that’s occurring, there’s also a troubling reliability issue with today’s web. Most websites and applications are hosted by a single server, or by a redundant array of load balanced servers, or whatever the case may be. If the owner of those servers, or the datacenter’s management, or even a natural disaster, takes those machines out, will the application continue to run? Backups and redundancy can be put into effect by organizations with enough resources, but even those can’t stop a company which simply decides to take down their website or application.

除了自然发生的集中化自然过程外,当今的网络还存在令人担忧的可靠性问题。 大多数网站和应用程序都由一台服务器托管,或者由负载平衡服务器的冗余阵列托管(无论何种情况)。 如果这些服务器的所有者,数据中心的管理,甚至是自然灾害将这些计算机撤出,应用程序是否将继续运行? 备份和冗余可以由拥有足够资源的组织来实施,但是即使是那些不能停止仅仅决定关闭其网站或应用程序的公司也无法停止。

依赖主机 (Reliance on Hosts)

If and when the server hosting a site goes down, we’re now reliant on the hosting company to have fail safes, redundant systems, backups, etc. They must recognize that your service is out, and assist you in restoring it. If it’s a hardware issue, they should have alternative systems they can port your setup onto. They should have backup networking systems, and they should be keeping at least a backup of your data, whether they advertise it or not, in the event of a data loss situation that is their fault.

如果托管站点的服务器出现故障,并且当托管服务器出现故障时,我们现在依靠托管公司提供故障保险柜,冗余系统,备份等。他们必须认识到您的服务已失效,并协助您进行恢复。 如果是硬件问题,他们应该拥有可以将您的设置移植到其中的替代系统。 他们应该有备用的联网系统,并且在出现数据丢失情况是他们的错的情况下,无论是否发布数据,他们都应该至少保留数据的备份。

What if they don’t?

如果他们不这样做怎么办?

依赖站点管理员 (Reliance on Site Administrators)

Now the impetus falls on site administrators to keep a service going and data backed up. If you’ve ever been an avid user of an application that was suddenly removed, you know this feeling.

现在,推动力由站点管理员来保证服务继续运行并备份数据。 如果您曾经是突然被删除的应用程序的狂热用户,您就会知道这种感觉。

Movements to open source help tremendously, allowing multiple forks of a project to take off, and allowing things that are more static – like documentation – to be preserved in multiple locations and in multiple formats. But the fact remains that the majority of the Web is controlled by people like you or me, maintaining servers.

开源运动极大地帮助了我们,使一个项目的多个分支可以起飞,并允许将更静态的内容(例如文档)保存在多个位置和多种格式中。 但是事实仍然是,大多数Web都是由像您这样的人控制的,并维护服务器。

Some freelance developers even manage the hosting and maintenance of some of their smaller clients’ sites. What if they forget to pay their bill? Get angry with a client and lock them out of their site? Get hit by a truck? Yes, the site owner may have legal options in any of these cases, but will that help you while your site is completely inaccessible?

一些自由开发人员甚至管理一些较小客户站点的托管和维护。 如果他们忘记付账怎么办? 对客户生气并把他们拒之门外? 被卡车撞到? 是的,在上述任何一种情况下,网站所有者都有合法的选择权,但是当您的网站完全无法访问时,这对您有帮助吗?

依赖用户 (Reliance on Users)

Yet one more problem is that of the users of any web application. Content often must have a critical mass of users or visitors to even merit hosting. Often low-traffic applications or static sites are shuttered simply because they aren’t cost effective to run. Additionally, the reverse problem is also very real. Users of the modern Internet are still clustering together. Facebook – which is a single social network – has somewhere in the ballpark of one out of every five persons on the face of the Earth reported as active users. There are countless businesses who entirely depend upon Facebook to exist. What if it shut down tomorrow?

还有一个问题是任何Web应用程序用户的问题。 内容通常必须具有一定数量的用户或访问者才能托管。 通常,低流量的应用程序或静态站点被关闭是因为它们运行起来并不划算。 另外,反向问题也很现实。 现代Internet的用户仍在聚集在一起。 Facebook是一个单一的社交网络据称是活跃用户 ,在地球上,五分之一的人处于活跃状态 。 有无数企业完全依赖Facebook的存在。 如果明天明天关闭怎么办?

Of course, Facebook won’t shut down tomorrow, and neither will most of the apps you love and use. But some may. And the more users that have flocked to them before that happens, the more damage that will cause to everyday workflows, or even to personal and business finances, depending on what kind of applications you use and for what.

当然,Facebook明天不会关闭,您喜欢和使用的大多数应用程序也不会关闭。 但是有些可能。 而且,在此之前蜂拥而至的用户越多,对日常工作流程甚至个人和企业财务造成的损害就越大,这取决于您所使用的应用程序类型和用途。

答案是IPFS (The Answer is IPFS)

So, you may be asking, how does IPFS solve these problems? IPFS is a relatively new attempt to solve some of these issues using distributed file systems. The IPFS project is still fairly low on documentation, and is perhaps the first of many different solutions.

因此,您可能会问,IPFS如何解决这些问题? IPFS是使用分布式文件系统解决其中一些问题的相对较新的尝试。 IPFS项目的文档仍然很少,并且可能是许多不同解决方案中的第一个。

IPFS节点 (IPFS Nodes)

First and foremost, you should understand a few things about IPFS. IPFS is decentralized. Without a typical server providing web pages for every client that arrives at the website’s domain, a different infrastructure must be imagined. Every machine running IPFS would be a node as part of a swarm.

首先,您应该了解有关IPFS的一些知识。 IPFS是分散的。 如果没有典型的服务器为到达网站域的每个客户端提供网页,则必须考虑不同的基础架构。 每台运行IPFS的机器都将成为一个群集节点

Consider the way torrents currently work. You choose a file to download, and when you use a torrent application to do so, you’re essentially sending out a request to all of the computers attached to the same torrent network as you, and if any of them have the file you’re requesting, and are able to upload at the moment, they begin sending pieces of it to your computer. That’s a condensed version.

考虑一下洪流当前的工作方式。 您选择要下载的文件,然后使用torrent应用程序进行下载时,实际上是在向与您连接到同一torrent网络的所有计算机发出请求,并且如果其中任何一个都有您要下载的文件,重新请求,并且现在可以上传,他们开始将其发送到您的计算机。 这是精简版。

So how do IPFS nodes work? Each machine that’s running IPFS is able to select what files they want their node to serve.

那么IPFS节点如何工作? 每台运行IPFS的计算机都可以选择它们希望其节点服务的文件。

散列和IPNS (Hashing and IPNS)

Every file that exists on IPFS would have a unique hash to represent it, and any minute change would result in a new hash being generated. These hashes are how content can be viewed. A client queries the system for a hash, and any node that has that content available can serve it to peers. The “swarm” provides a torrent-like experience, wherein peers are capable of serving each other content.

IPFS上存在的每个文件都会有一个唯一的哈希来表示它,任何微小的更改都将导致生成新的哈希。 这些哈希是如何查看内容的方式。 客户端向系统查询哈希,任何具有该内容可用的节点都可以将其提供给对等方。 “群体”提供了类似激流的体验,其中同伴能够彼此提供内容。

This system will allow content to be served quickly and accurately to clients, regardless of their proximity to the original host of the content. Additionally, because hashes are employed, both ends of the exchange can be checked for correct content, as a single bit out of place would result in a different hash.

该系统将允许将内容快速准确地提供给客户端,而不管其与内容原始主机的接近程度。 另外,由于使用了哈希,因此可以检查交换的两端是否包含正确的内容,因为单个位不正确会导致不同的哈希。

The Inter-Planetary Naming System (IPNS) can be used to assign a name to mutable (changeable) content, so that your node publishes a piece of content, has a name attached to it, and then is able to republish changes with the same name. This, of course, could result in loss of available content, so IPNS entities, according to the developers, may some day function more like a Git commit log, allowing a client to iterate back through versions of the published content.

行星际命名系统(IPNS)可用于为可变(可变)内容分配名称,以便您的节点发布一个内容,并附加一个名称,然后能够使用相同的名称重新发布更改名称。 当然,这可能会导致可用内容的丢失,因此,根据开发人员的说法,IPNS实体有一天可能会更像Git提交日志,从而允许客户端遍历已发布内容的版本。

分权优势 (Advantages of Decentralization)

So, you’ve heard all about centralization and decentralization. But what are the practical benefits of the fact that IPFS is decentralized?

因此,您已经听说了有关集中化和分散化的全部内容。 但是,IPFS分散化这一事实的实际好处是什么?

Reliability and Persistence The content being served on the IPFS network is going to be around, essentially, forever, if people want it to be. There’s not any single weak link, server, or failing point. With larger files, there may be a benefit to having multiple peers as options for your IPFS to choose from to acquire the file. But the real benefit comes from having those multiple options to start with. If one node hosting it goes down, there will be others.

可靠性和持久性如果人们希望,IPFS网络上提供的内容将永远存在。 没有任何单一的弱链接,服务器或故障点。 对于较大的文件,将多个对等方作为IPFS的选项来获取文件可能会有好处。 但是真正的好处来自于拥有这些多种选择。 如果托管它的一个节点出现故障,那么将会有其他节点。

Secured Against DDoS-style Attacks Simply by its nature, distributed peer to peer content cannot be affected by “Direct Denial of Service” style attacks. These attacks are primarily concerned with bombarding host servers to bring down websites or services. However, if the same content is being served to you from multiple peers, an effective DDoS attack would have to find and target all of them.

抵御DDoS样式攻击的安全性就其本质而言,分布式对等内容不受“直接拒绝服务”样式攻击的影响。 这些攻击主要与轰击主机服务器以关闭网站或服务有关。 但是,如果从多个对等方向您提供相同的内容,则有效的DDoS攻击将必须找到并定位所有这些内容。

Previously Viewed Content Available Offline With the caching system in place with IPFS, it’s entirely possible that quite a lot of your regularly viewed content would be available offline by default. Any dynamic content might not be up to date, of course, but previously viewed static content resources could be at your fingertips whether you were in range of your Wi-Fi or not.

以前查看的内容可以脱机使用有了IPFS的缓存系统,默认情况下,很有可能您的很多定期查看的内容都可以脱机使用。 当然,任何动态内容可能都不是最新的,但是无论您是否处于Wi-Fi范围之内,以前查看的静态内容资源都可以触手可及。

事情将如何改变? (How Would Things Change?)

With IPFS as a major player, things would definitely change. Although IPNS nodes can be mapped to HTTP addresses currently, they would not necessarily need to be forever. Web browsers might change, or be removed entirely. More likely, given the transition, you’d simply begin using multiple protocols to access content (instead of typing http:// you might end up with several other protocols available in major browsers). These browsers would also need to be equipped with an automatic way to replace any locally cached content, if the node the browser attempts to contact has content that has been altered and is presenting a new hash.

随着IPFS成为主要参与者,情况肯定会发生变化。 尽管IPNS节点当前可以映射到HTTP地址,但它们并不一定需要永远存在。 Web浏览器可能会更改,或被完全删除。 考虑到过渡,您更有可能只是开始使用多种协议来访问内容(而不是键入http:// ,而最终可能会在主要浏览器中获得几种其他协议)。 如果浏览器尝试联系的节点具有已更改的内容并呈现新的哈希值,则这些浏览器还需要配备自动方式来替换任何本地缓存的内容。

Browsers, or other clients, might be the only necessary software. Remember that IPFS is peer to peer, so your IPFS installation is simply reaching out to locate others.

浏览器或其他客户端可能是唯一必需的软件。 请记住,IPFS是对等的,因此您的IPFS安装只是在向外寻找其他人。

You also may wonder what happens with websites serving dynamic content. The answer here is far less clear. While updating static content and republishing to IPFS might not be such a challenge, dynamic, database-driven websites will be significantly more complicated. The challenge ahead will be for developers and proponents of the system to create not only viable, but also practical alternatives to cover these use cases, as a huge portion of the Web today is driven by dynamic database content. IPNS provides some potential solutions here, as do other services that are being developed, but a production-ready solution is yet to come.

您可能还想知道提供动态内容的网站会发生什么情况。 答案还不太清楚。 虽然更新静态内容并将其重新发布到IPFS可能不是这样的挑战,但动态的,数据库驱动的网站将变得更加复杂。 面临的挑战将是,系统的开发人员和支持者不仅要创建可行的而且要创建实用的替代方案来覆盖这些用例,因为当今Web的很大一部分是由动态数据库内容驱动的。 IPNS在这里提供了一些潜在的解决方案,其他正在开发的服务也提供了解决方案,但是现成的解决方案尚未到来。

IPFS的未来 (The Future with IPFS)

IPFS is definitely not a polished, well-oiled machine yet. It’s more of a fascinating prototype of what the Web could look like in coming years. The more people who test, contribute, and work to improve it, the greater chance it will have to change the way we serve content on the Internet as a whole. So get involved!

IPFS绝对不是抛光,上油的机器。 它更像是未来几年Web外观的一个迷人原型。 测试,贡献和改进它的人越多,它改变我们在整个Internet上提供内容的方式的机会就越大。 因此参与其中!

Download one of the prebuilt binaries, or source files, here , or check out the documentation, to get a little more information on the subject, and get started today!

在此处下载一个预编译的二进制文件或源文件之一,或查看文档 ,以获取有关该主题的更多信息,然后立即开始!

翻译自: https://www.sitepoint.com/http-vs-ipfs-is-peer-to-peer-sharing-the-future-of-the-web/

名词解释:对等知识互联网

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值