Gnutella: A Protocol Outliving the World That Created It
Gnutella: A Protocol Outliving the World That Created It
Gnutella:一个比创造它的世界更长寿的协议
A Protocol Outliving the World That Created It Gnutella is a file sharing protocol that many have forgotten and it has the story of a decentralized technology adopted by millions of casual users who did not care to learn what a peer-to-peer system was. Users showed up because the protocol solved real problems at scale and the solution just so happened to be decentralized. No one ever pretended to use Gnutella in hopes their GnutellaCoinTM would go up in value later. They just downloaded MP3s. The network exploded in popularity, then plateaued for almost a decade, then settled into a permanent long tail state of continued but diminished use. Welcome to my overly enthusiastic love letter to Gnutella.
Gnutella 是一个许多人已经遗忘的文件共享协议。它讲述了一个去中心化技术的故事:数以百万计的普通用户在根本不关心什么是“点对点(P2P)系统”的情况下,就采纳了它。用户之所以使用它,是因为该协议在大规模场景下解决了实际问题,而这种解决方案恰好是去中心化的。当时没有人会假装使用 Gnutella,指望他们的“GnutellaCoin™”未来能升值,他们只是单纯地下载 MP3。该网络曾风靡一时,随后经历了近十年的平稳期,最终进入了一个持续存在但使用率下降的“长尾”状态。欢迎阅读我这封写给 Gnutella 的、充满热情的“情书”。
Despite its meteoric rise and its role as a driving force behind the file-sharing phenomenon of the 2000s, Gnutella has gone mostly forgotten. Some of that is because it was a component technology hidden beneath more visible projects like LimeWire. The other half of this is that the walled garden model of modern platforms means most internet users don’t even remember what a filesystem is anymore. The Gnutella project began as an internal demo that leaked to the public after its corporate overlord, AOL, cancelled the project. Owing to its server-free decentralized design, it was impossible to put the toothpaste back in the figurative tube after it reached the public. It grew explosively for a decade and still works today despite years of attempts to stop it. Copies of the original Gnutella.exe are out there on archive.org if you dig for them.
尽管 Gnutella 曾迅速崛起,并成为 2000 年代文件共享浪潮背后的驱动力,但它如今已被大多数人遗忘。部分原因是它作为一种底层技术,隐藏在 LimeWire 等更显眼的软件项目之下。另一个原因是现代平台“围墙花园”的模式,导致大多数互联网用户甚至不再记得什么是“文件系统”了。Gnutella 项目最初是一个内部演示程序,在其企业东家 AOL 取消该项目后泄露给了公众。由于其无服务器的去中心化设计,一旦进入公众视野,就再也无法收回。它在十年间呈爆炸式增长,尽管多年来一直有人试图封杀它,但它至今仍在运行。如果你去 archive.org 挖掘,还能找到原始的 Gnutella.exe 安装包。
Many have wrongly asserted that Gnutella failed, but that’s not a fair representation of what happened. Gnutella scaled to mainstream adoption (millions of concurrent active users) and thrived for a solid decade. The true reason for its fall from the mainstream was simply that the world it was born into disappeared. Gnutella stood the test of time and solved problems for a software user that no longer exists. It’s still there today, chugging along at reduced capacity.
许多人错误地断言 Gnutella 失败了,但这并不公平。Gnutella 实现了主流普及(拥有数百万并发活跃用户),并繁荣了整整十年。它从主流视野中消失的真正原因,仅仅是因为它所诞生的那个世界已经不复存在了。Gnutella 经受住了时间的考验,为那个时代的软件用户解决了问题,而如今那样的用户群体已不复存在。它今天依然存在,只是在以较低的负载继续运行。
Historic Conditions Leading to Adoption
促成其普及的历史条件
The early 2000s represented a strange transition period for US consumers. Internet adoption hit 50% sometime around 2000-2001. The internet was slowly mutating from a complicated tool for nerds into a mainstream part of daily life. Music file sharing became a common practice during this time for a number of reasons: The music industry refused to adapt to changing consumer preference. MP3 players and solid-state data storage became affordable and ubiquitous. Low-speed dial-up internet made music streaming unfeasible. Managing disk space, directories, backups, and downloaded files was still a palatable and acceptable activity for even casual computer users of the era. These conditions set the stage for a golden era that lasted into the early 2010s. If you do not believe me, ask anyone over the age of 35 about their LimeWire memories. I was there, man. It was wild. Gnutella’s lack of single points of failure makes it difficult to kill and the base protocol, though simple, was easily extended via optional protocol extensions baked into the spec.
21 世纪初对美国消费者来说是一个奇怪的转型期。互联网普及率在 2000 年至 2001 年左右达到了 50%。互联网正缓慢地从极客的复杂工具演变为日常生活的主流部分。音乐文件共享在这一时期成为普遍做法,原因有几点:音乐产业拒绝适应消费者偏好的变化;MP3 播放器和固态存储设备变得廉价且普及;低速拨号上网使得音乐流媒体播放不可行;对于当时的普通电脑用户来说,管理磁盘空间、目录、备份和下载文件仍然是一项可以接受且乐于从事的活动。这些条件为持续到 2010 年代初的“黄金时代”奠定了基础。如果你不相信,问问任何 35 岁以上的人关于 LimeWire 的记忆。我当时就在那里,伙计。那真是太疯狂了。Gnutella 没有单点故障,这使得它很难被彻底封杀;其基础协议虽然简单,但通过内置在规范中的可选协议扩展,可以轻松进行功能扩展。
Protocol Features
协议特性
For most Gnutella was a file transfer tool. This categorization misses a basic function of the protocol. At its core, Gnutella is just a peer-to-peer search engine for blobs. We could have used it as a poor man’s DNS system, or a global metadata lookup table for key/value pairs, or a matchmaking service for your Unreal Tournament league, but that never really happened. Gnutella was good at providing file downloads that matched search queries, and that is what history remembers it for. Loads and loads of easy downloads. Usually MP3s. Resources [things shared on Gnutella] can be anything: mappings to other resources, cryptographic keys, files of any type, meta-information on keyable resources, etc. --- Gnutella 0.6 draft spec
对大多数人来说,Gnutella 是一个文件传输工具。这种分类忽略了该协议的一个基本功能。从本质上讲,Gnutella 只是一个针对数据块(blobs)的点对点搜索引擎。我们本可以用它作为简易的 DNS 系统,或者作为键值对的全局元数据查找表,甚至是《虚幻竞技场》(Unreal Tournament)联赛的匹配服务,但这些从未真正实现。Gnutella 擅长提供与搜索查询匹配的文件下载,这也是历史对它的记忆——大量轻松的下载,通常是 MP3。资源(在 Gnutella 上共享的东西)可以是任何东西:指向其他资源的映射、加密密钥、任何类型的文件、可键控资源的元信息等。——摘自《Gnutella 0.6 草案规范》
The process worked as follows: You opened a desktop application that spoke Gnutella, such as LimeWire, BearShare, or GTK-Gnutella. The client connected to a handful of peers somewhere on the internet (I will explain how you found them later). You typed something into a search box, like LinkinPark.mp3.exe. Your query spread outward through the network from peer to peer. Results slowly trickled back from random computers around the world. You inspected filenames, guessed which results were fake, compared connection speeds, and hoped none of them were viruses. Once you picked a file, your client downloaded pieces of it directly from user’s computer over HTTP. Sometimes you downloaded the wrong thing and accidentally discovered new content. Or malware, you never really knew for sure. This foraging behavior has disappeared with the advent of recommendation engines and we lost a tiny bit of internet magic in the process.
其工作流程如下:你打开一个支持 Gnutella 协议的桌面应用程序,例如 LimeWire、BearShare 或 GTK-Gnutella。客户端会连接到互联网上的一些节点(我稍后会解释你是如何找到它们的)。你在搜索框中输入内容,比如 LinkinPark.mp3.exe。你的查询会通过点对点的方式在网络中向外扩散。结果会从世界各地的随机计算机中缓慢地回传。你检查文件名,猜测哪些结果是假的,比较连接速度,并祈祷它们都不是病毒。一旦你选中一个文件,你的客户端就会通过 HTTP 直接从对方的电脑上下载文件片段。有时你会下载错东西,却意外发现了新内容。或者下载到了恶意软件,你永远无法确定。这种“觅食”般的行为随着推荐引擎的出现而消失了,我们在这一过程中失去了一点点互联网的魔力。
Clients usually offer 3-4 main features, mirroring the 5 main message types of the underlying protocol: A query manager: Querying was slow and spread across thousands of peers. A file manager: You specified which directories or paths you wanted to share and where downloaded files would end up. A transfer manager: A means of handling the resuming, splitting, and management of file transfers in both directions. Out-of-band Extras: IRC chat, message boards, a search query monitor, and browsing of a specific host. Many of these things were not actually part of the protocol, much like your AI search sidebar is not part of the HTTP spec. The interesting thing here for me is that Gnutella managed to maintain a diversity of clients. Despite market leaders like LimeWire, there were still multiple options available and it was possible for independent devs to write a client from scratch. I built my own Gnutella client this year for fun, and I walked away realizing that this interoperability was somewhat of a miracle. There is a lot of stuff that is not in the spec. There is a lot of stuff that was never written down. Or in an add-on spec. The protocol evolved to add new features.
客户端通常提供 3-4 个主要功能,对应底层协议的 5 种主要消息类型:查询管理器(查询速度慢,分布在数千个节点上);文件管理器(指定要共享的目录或路径,以及下载文件的存放位置);传输管理器(处理文件传输的断点续传、分片和双向管理);带外扩展功能(IRC 聊天、留言板、搜索查询监控和特定主机浏览)。这些功能中的许多实际上并不属于协议本身,就像你的 AI 搜索侧边栏不属于 HTTP 规范一样。对我来说,有趣的是 Gnutella 成功保持了客户端的多样性。尽管有 LimeWire 这样的市场领导者,但仍有多种选择,独立开发者完全可以从零开始编写一个客户端。我今年为了好玩自己写了一个 Gnutella 客户端,写完后我意识到这种互操作性简直是个奇迹。规范中有很多东西没有写,有很多东西从未被记录下来,或者只存在于附加规范中。该协议在不断演进以增加新功能。