ActivityPub Viewer

A small tool to view real-world ActivityPub objects as JSON! Enter a URL or username from Mastodon or a similar service below, and we'll send a request with the right Accept header to the server to view the underlying object.

Open in browser →
{ "@context": "https://www.w3.org/ns/activitystreams", "type": "Create", "id": "https://hypha.coop/dripline/p2p-primer-part-1/create/1648425600.jsonld", "actor": "https://hypha.coop/about.jsonld", "published": "2022-03-28T00:00:00+00:00", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "cc": [ "https://social.distributed.press/v1/@dripline@hypha.coop/followers" ], "object": { "@context": [ "https://www.w3.org/ns/activitystreams", { "@language": "en", "sensitive": "as:sensitive" } ], "type": "Note", "id": "https://hypha.coop/dripline/p2p-primer-part-1.jsonld", "url": [ { "type": "Link", "mediaType": "text/html", "href": "https://hypha.coop/dripline/p2p-primer-part-1/", "rel": "canonical" } ], "summary": "Taking the Mauve Pill: Exploring Alternatives to the Centralized Web", "published": "2022-03-28T00:00:00+00:00", "updated": null, "attributedTo": "https://hypha.coop/about.jsonld", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "cc": [ "https://social.distributed.press/v1/@dripline@hypha.coop/followers" ], "inReplyTo": null, "sensitive": false, "content": "<h3 id=\"a-peer-to-peer-primer-comparing-protocols\">A Peer to Peer Primer: Comparing Protocols</h3><p><img src=\"https://hypha.coop/assets/images/posts/2022-03-24-logos.png\" alt=\"A collection of peer to peer logos\" width=\"45%\"></p><p>Peer to peer (P2P) protocols make it easier to build decentralized applications that can work without any extra server or network infrastructure. They provide more privacy and resilience than centralized platforms, and reduce the barrier to building applications that enable people to share data. However, there are a few to choose from, and it can be daunting to figure out which one is right for your use case.</p><p>This post compares several peer to peer protocols, looking at how they work and the tradeoffs to consider when choosing what to use. We will specifically be looking at <a href=\"https://www.bittorrent.org/index.html\">BitTorrent</a>, <a href=\"https://ipfs.io/\">Interplanetary File System (IPFS)</a>, <a href=\"https://scuttlebutt.nz/\">Secure Scuttlebutt (SSB)</a> and <a href=\"https://hypercore-protocol.org/\">Hypercore</a> since they have been around for a while and have some similarities that make them easy to compare. We’ll explore how each protocol handles content, links, data models, peer discoverability, security, performance, implementations, and backups. Since that’s a lot to cover in one post, we’ll focus on links and content here; stay tuned for three additional posts. We’ve also included a chart that compares each protocol discussed in this series. Although this comparison is subjective, we hope it’s a useful reference when thinking through which protocol might work best for a particular project.</p><p>This post is aimed at people wanting to use these protocols who have basic knowledge about how peer to peer systems work already. If you see a new term, click the links for further reading or <a href=\"https://duckduckgo.com/\">search about it online</a>.</p><table class=\"mbtablestyle\"><thead><tr><th>&nbsp;</th><th style=\"text-align: center\">BitTorrent</th><th style=\"text-align: center\">Interplanetary File System</th><th style=\"text-align: center\">Hypercore</th><th style=\"text-align: center\">Secure Scuttlebutt</th></tr></thead><tbody><tr><td>Content</td><td style=\"text-align: center\">🇦</td><td style=\"text-align: center\">🇧</td><td style=\"text-align: center\">🇩</td><td style=\"text-align: center\">🇦</td></tr><tr><td>Links</td><td style=\"text-align: center\">🇨</td><td style=\"text-align: center\">🇦</td><td style=\"text-align: center\">🇧</td><td style=\"text-align: center\">🇨</td></tr><tr><td>Data Model</td><td style=\"text-align: center\">🇧</td><td style=\"text-align: center\">🇦</td><td style=\"text-align: center\">🇦</td><td style=\"text-align: center\">🇧</td></tr><tr><td>Mutability</td><td style=\"text-align: center\">🇩</td><td style=\"text-align: center\">🇧</td><td style=\"text-align: center\">🇦</td><td style=\"text-align: center\">🇦</td></tr><tr><td>Peer Discoverability</td><td style=\"text-align: center\">🇦</td><td style=\"text-align: center\">🇧</td><td style=\"text-align: center\">🇦</td><td style=\"text-align: center\">🇧</td></tr><tr><td>Security</td><td style=\"text-align: center\">🇨</td><td style=\"text-align: center\">🇨</td><td style=\"text-align: center\">🇧</td><td style=\"text-align: center\">🇧</td></tr><tr><td>Performance</td><td style=\"text-align: center\">🇨</td><td style=\"text-align: center\">🇨</td><td style=\"text-align: center\">🇦</td><td style=\"text-align: center\">🇩</td></tr><tr><td>Implementations</td><td style=\"text-align: center\">🇦</td><td style=\"text-align: center\">🇦</td><td style=\"text-align: center\">🇨</td><td style=\"text-align: center\">🇧</td></tr><tr><td>Backups</td><td style=\"text-align: center\">🇦</td><td style=\"text-align: center\">🇦</td><td style=\"text-align: center\">🇨</td><td style=\"text-align: center\">🇦</td></tr></tbody></table><p><em>Mauve grades protocols (don’t @ them if you disagree)</em></p><h2 id=\"content\">Content</h2><p>Each P2P protocol focuses on different types of content and ways of accessing them. We discuss these below and give a final grade.</p><h3 id=\"content---bittorrent\">Content - BitTorrent</h3><p>BitTorrent has strong associations with internet piracy where projects like The Pirate Bay are used to upload illegal copies of copyrighted content to bypass restrictions such as DRM or lack of access. However, BitTorrent is frequently used to distribute datasets for things like Linux ISO images, <a href=\"https://pubmed.ncbi.nlm.nih.gov/20418944/\">scientific data</a>, and other legitimate data sharing use cases. It’s also being used in applications like <a href=\"https://joinpeertube.org/\">PeerTube</a>, which allow independent content creators to share the bandwidth costs of viewing videos. BitTorrent has also been used by archiving groups like <a href=\"https://archive.org/\">The Internet Archive</a> in order to distribute archives of content that’s our digital history.</p><p>Since BitTorrent has been around for a long time, it’s well known and there’s a lot of content out there to explore.</p><p><em>Final Grade: A</em></p><h3 id=\"content---interplanetary-file-system-ipfs\">Content - Interplanetary File System (IPFS)</h3><p>IPFS has been building buzz among blockchain communities by acting as a decentralized file storage alternative to central file servers for things like <a href=\"https://docs.ipfs.io/how-to/mint-nfts-with-ipfs/\">Non-Fungible Tokens (NFT)</a> and various bits of web content such as <a href=\"https://ipfs.io/ipns/two.compost.digital/\">COMPOST</a>. Its high level APIs have also been used with tools like <a href=\"https://webrecorder.net/about\">WebRecorder</a> to make it easier to archive content and preserve it in immutable records while deduplicating file content whenever possible.</p><p><em>Final Grade: B</em></p><h3 id=\"content---hypercore\">Content - Hypercore</h3><p>Although Hypercore has a lot of content published in the <a href=\"https://beakerbrowser.com/\">Beaker Browser</a>, much of it is now incompatible with newer versions of Hypercore. Outside of that, there are apps that build on top of the lower level bits of Hypercore like Mapeo or Cabal that share content among specific groups.</p><p><em>Final Grade: D</em></p><h3 id=\"content---ssb\">Content - SSB</h3><p>Most content on SSB is locked away in people’s social graphs and can only be accessed if you get introduced into these networks; for example, by joining Manyverse. However, there are public <a href=\"https://viewer.scuttlebot.io/\">viewers</a> that offer a glimpse into content that people have chosen to make public.</p><p><em>Final Grade: A</em></p><h2 id=\"links-small-but-critical-infrastructure\">Links: Small But Critical Infrastructure</h2><p>One of the first things people see when interacting with P2P protocols is how data can be linked to them. Most people are using these protocols for loading content from peer to peer networks, and probably don’t think too hard about what the links actually mean. But links are important to consider because the link structure can start to tell you about the different ways the protocols work and some of the constraints in how they can be used. Most of the protocols here have registered URI schemes with <a href=\"https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml\">IANA</a>, which gives straightforward paths for integrating with different applications without worrying about conflicts.</p><h3 id=\"links---bittorrent\">Links - BitTorrent</h3><p>BitTorrent uses links that use the <code class=\"language-plaintext highlighter-rouge\">magnet:</code><a href=\"https://en.wikipedia.org/wiki/Magnet_URI_scheme\">URI scheme</a> by specifying a property that links to the <code class=\"language-plaintext highlighter-rouge\">urn:btih</code> (BitTorrent InfoHash) for a given Torrent. The standard is used by several other content networks like Kazaa and eDonkey, which were popular file sharing networks that aren’t as active these days. The link format can contain extra information like <code class=\"language-plaintext highlighter-rouge\">tracker</code> servers for discovering other peers with data and metadata; this lets you know whether a torrent is “private” without needing to download the torrent itself. One thing to note is that magnet links are <a href=\"https://en.wikipedia.org/wiki/Uniform_Resource_Identifier\">URIs</a>, which can identify a torrent, but are not suitable to use as browser <a href=\"https://en.wikipedia.org/wiki/URL\">URLs</a> because they do not have a “hostname” property that browsers could use as a “origin” to associate things like cookies and permissions with. As well, URI cannot be used for navigating between files inside a given torrent. To address some of the drawbacks of using URI, there’s been some talk about standardizing a <a href=\"https://github.com/bittorrent/bittorrent.org/issues/92\">bittorrent://</a> URL format that would better integrate with browsers and link to specific data, rather than entire torrents.</p><p><em>Final Grade: C</em></p><h3 id=\"links---ipfs\">Links - IPFS</h3><p>IPFS has a couple of approaches to links. Primarily they use <a href=\"https://docs.ipfs.io/concepts/content-addressing/#cid-conversion\">Content Identifiers, a.k.a. CIDs,</a> with two ways of turning them into links. <code class=\"language-plaintext highlighter-rouge\">/ipfs/{CID}/</code> style URLs, which can be easily converted to paths within <a href=\"https://docs.ipfs.io/concepts/ipfs-gateway/\">IPFS gateways</a> were initially fairly common. These mirror the underlying <a href=\"https://github.com/multiformats/multiaddr#protocols\">Libp2p multi-address format</a> and rely on paths with a “type” prefix.</p><p>More recently, IPFS has been using <code class=\"language-plaintext highlighter-rouge\">ipfs://{CID}</code> URLs that have had some growing pains based on the encoding of the CID. At first, IPFS was using the case-sensitive CIDv0 spec, based on the <a href=\"https://learnmeabitcoin.com/technical/base58\">Base58 Bitcoin encoding</a>; but this caused problems with loading IPFS URLs in browsers since the <code class=\"language-plaintext highlighter-rouge\">hostname</code> portion of a URL is case insensitive and generally gets converted to lowercase when parsed within a browser. To mitigate this, IPFS started migrating to CIDv1 which defaults to <code class=\"language-plaintext highlighter-rouge\">base32</code> encoding, using all lowercase characters. There’s still some growing pains when people try to use CIDv0 style links that are the default in older tools, so if your webpage has a URL that starts with <code class=\"language-plaintext highlighter-rouge\">Qm</code>, consider updating it with a <a href=\"https://cid.ipfs.io/\">CID inspector</a>. In addition to IPFS links, there are also <code class=\"language-plaintext highlighter-rouge\">IPNS</code> (InterPlanetary Name System) links that can make use of public keys or DNS (Domain Name Server) names instead of CIDs, like <code class=\"language-plaintext highlighter-rouge\">ipns://{Public Key or DNS}/</code>. The DNS functionality comes from the <a href=\"https://www.dnslink.io/\">DNSLink</a> standard.</p><p><em>Final Grade: A</em></p><h3 id=\"links---hypercore\">Links - Hypercore</h3><p>Hypercore’s URL standard has changed over time, primarily guided by innovations in the <a href=\"https://docs.dat.foundation/docs/cli-intro\">Dat CLI</a> and by Paul Frazee’s <a href=\"https://beakerbrowser.com/\">Beaker Browser</a>. Initially, the ecosystem used <code class=\"language-plaintext highlighter-rouge\">dat://{public key}/</code> URLs where the <code class=\"language-plaintext highlighter-rouge\">public key</code> was 64 hex characters representing a 32 byte public key. This was extended to specify a <code class=\"language-plaintext highlighter-rouge\">version</code> in the URL using the <code class=\"language-plaintext highlighter-rouge\">dat://{public key}+{version}/</code> syntax, and also to specify a <a href=\"https://www.npmjs.com/package/hyper-dns\">DNS name</a> in the URL. Then in <a href=\"https://blog.datproject.org/dat-protocol-renamed-hypercore-protocol/\">2020</a>, the core team working on the Hypercore Protocol part of the Dat ecosystem split off to do their own thing, and the URL scheme was changed to use the <code class=\"language-plaintext highlighter-rouge\">hyper://</code> name instead of <code class=\"language-plaintext highlighter-rouge\">dat://</code>. This URL format is problematic because the <code class=\"language-plaintext highlighter-rouge\">hostname</code> portion is technically invalid according to the URL standard since it uses 64 characters; the maximum allowed length is 63. Luckily, browsers and many other tools like Node.js happily consume the full length of the key, but the community might need to switch from <code class=\"language-plaintext highlighter-rouge\">hex</code> encoding to something like IPFS’ <code class=\"language-plaintext highlighter-rouge\">base32</code> encoding in order to better conform with existing standards.</p><p><em>Final Grade: B</em></p><h3 id=\"links---secure-scuttlebutt-ssb\">Links - Secure Scuttlebutt (SSB)</h3><p>Secure ScuttleButt is a bit of an outlier in that people generally interact with its data via an app like <a href=\"https://www.manyver.se/\">Manyverse</a>, which abstracts the linking of data to an extent. Under the hood, however, SSB has two methods of linking to data: <a href=\"https://handbook.scuttlebutt.nz/concepts/link\">Cypherlinks</a> and <a href=\"https://github.com/ssb-ngi-pointer/ssb-uri-spec\">SSB URI</a>. The Cypherlink spec seems to have evolved for the #hashtag syntax that SSB uses to link to “channels’’ (a.k.a. “tags” in other social media platforms), and adds three new types: <code class=\"language-plaintext highlighter-rouge\">@feed</code> to link to a specific person or “feed,” <code class=\"language-plaintext highlighter-rouge\">%message</code> to link to a message, and <code class=\"language-plaintext highlighter-rouge\">&amp;blob</code> to link to a blob. This syntax is unique among P2P protocols, and is generally only used when rendering Markdown in apps like <a href=\"https://github.com/ssbc/patchwork\">Patchwork</a> or Manyverse. The latest innovations are URIs that make use of the ssb: URI scheme, and a “type” like “message,” “feed,” or “blob;” (for example ssb:message/sha256/<msgid>, ssb:identity/fusion/<key>, ssb:feed/bendybutt-v1/<feedid>`.) SSB URIs are the \"latest and greatest'' in linking structures and put effort into being forward compatible with changes to how SSB feeds are encoded and distributed. However, not all SSB apps such as Patchwork make use of these links (as of March 2022) so you might need to revert to Cypherlinks depending on what you're using.</feedid></key></msgid></p><p><em>Final Grade: C</em></p><p><em>Stay tuned for the next post in the series, which will compare data models and mutability.</em></p>", "name": "Taking the Mauve Pill: Exploring Alternatives to the Centralized Web", "contentMap": { "en": "<h3 id=\"a-peer-to-peer-primer-comparing-protocols\">A Peer to Peer Primer: Comparing Protocols</h3><p><img src=\"https://hypha.coop/assets/images/posts/2022-03-24-logos.png\" alt=\"A collection of peer to peer logos\" width=\"45%\"></p><p>Peer to peer (P2P) protocols make it easier to build decentralized applications that can work without any extra server or network infrastructure. They provide more privacy and resilience than centralized platforms, and reduce the barrier to building applications that enable people to share data. However, there are a few to choose from, and it can be daunting to figure out which one is right for your use case.</p><p>This post compares several peer to peer protocols, looking at how they work and the tradeoffs to consider when choosing what to use. We will specifically be looking at <a href=\"https://www.bittorrent.org/index.html\">BitTorrent</a>, <a href=\"https://ipfs.io/\">Interplanetary File System (IPFS)</a>, <a href=\"https://scuttlebutt.nz/\">Secure Scuttlebutt (SSB)</a> and <a href=\"https://hypercore-protocol.org/\">Hypercore</a> since they have been around for a while and have some similarities that make them easy to compare. We’ll explore how each protocol handles content, links, data models, peer discoverability, security, performance, implementations, and backups. Since that’s a lot to cover in one post, we’ll focus on links and content here; stay tuned for three additional posts. We’ve also included a chart that compares each protocol discussed in this series. Although this comparison is subjective, we hope it’s a useful reference when thinking through which protocol might work best for a particular project.</p><p>This post is aimed at people wanting to use these protocols who have basic knowledge about how peer to peer systems work already. If you see a new term, click the links for further reading or <a href=\"https://duckduckgo.com/\">search about it online</a>.</p><table class=\"mbtablestyle\"><thead><tr><th>&nbsp;</th><th style=\"text-align: center\">BitTorrent</th><th style=\"text-align: center\">Interplanetary File System</th><th style=\"text-align: center\">Hypercore</th><th style=\"text-align: center\">Secure Scuttlebutt</th></tr></thead><tbody><tr><td>Content</td><td style=\"text-align: center\">🇦</td><td style=\"text-align: center\">🇧</td><td style=\"text-align: center\">🇩</td><td style=\"text-align: center\">🇦</td></tr><tr><td>Links</td><td style=\"text-align: center\">🇨</td><td style=\"text-align: center\">🇦</td><td style=\"text-align: center\">🇧</td><td style=\"text-align: center\">🇨</td></tr><tr><td>Data Model</td><td style=\"text-align: center\">🇧</td><td style=\"text-align: center\">🇦</td><td style=\"text-align: center\">🇦</td><td style=\"text-align: center\">🇧</td></tr><tr><td>Mutability</td><td style=\"text-align: center\">🇩</td><td style=\"text-align: center\">🇧</td><td style=\"text-align: center\">🇦</td><td style=\"text-align: center\">🇦</td></tr><tr><td>Peer Discoverability</td><td style=\"text-align: center\">🇦</td><td style=\"text-align: center\">🇧</td><td style=\"text-align: center\">🇦</td><td style=\"text-align: center\">🇧</td></tr><tr><td>Security</td><td style=\"text-align: center\">🇨</td><td style=\"text-align: center\">🇨</td><td style=\"text-align: center\">🇧</td><td style=\"text-align: center\">🇧</td></tr><tr><td>Performance</td><td style=\"text-align: center\">🇨</td><td style=\"text-align: center\">🇨</td><td style=\"text-align: center\">🇦</td><td style=\"text-align: center\">🇩</td></tr><tr><td>Implementations</td><td style=\"text-align: center\">🇦</td><td style=\"text-align: center\">🇦</td><td style=\"text-align: center\">🇨</td><td style=\"text-align: center\">🇧</td></tr><tr><td>Backups</td><td style=\"text-align: center\">🇦</td><td style=\"text-align: center\">🇦</td><td style=\"text-align: center\">🇨</td><td style=\"text-align: center\">🇦</td></tr></tbody></table><p><em>Mauve grades protocols (don’t @ them if you disagree)</em></p><h2 id=\"content\">Content</h2><p>Each P2P protocol focuses on different types of content and ways of accessing them. We discuss these below and give a final grade.</p><h3 id=\"content---bittorrent\">Content - BitTorrent</h3><p>BitTorrent has strong associations with internet piracy where projects like The Pirate Bay are used to upload illegal copies of copyrighted content to bypass restrictions such as DRM or lack of access. However, BitTorrent is frequently used to distribute datasets for things like Linux ISO images, <a href=\"https://pubmed.ncbi.nlm.nih.gov/20418944/\">scientific data</a>, and other legitimate data sharing use cases. It’s also being used in applications like <a href=\"https://joinpeertube.org/\">PeerTube</a>, which allow independent content creators to share the bandwidth costs of viewing videos. BitTorrent has also been used by archiving groups like <a href=\"https://archive.org/\">The Internet Archive</a> in order to distribute archives of content that’s our digital history.</p><p>Since BitTorrent has been around for a long time, it’s well known and there’s a lot of content out there to explore.</p><p><em>Final Grade: A</em></p><h3 id=\"content---interplanetary-file-system-ipfs\">Content - Interplanetary File System (IPFS)</h3><p>IPFS has been building buzz among blockchain communities by acting as a decentralized file storage alternative to central file servers for things like <a href=\"https://docs.ipfs.io/how-to/mint-nfts-with-ipfs/\">Non-Fungible Tokens (NFT)</a> and various bits of web content such as <a href=\"https://ipfs.io/ipns/two.compost.digital/\">COMPOST</a>. Its high level APIs have also been used with tools like <a href=\"https://webrecorder.net/about\">WebRecorder</a> to make it easier to archive content and preserve it in immutable records while deduplicating file content whenever possible.</p><p><em>Final Grade: B</em></p><h3 id=\"content---hypercore\">Content - Hypercore</h3><p>Although Hypercore has a lot of content published in the <a href=\"https://beakerbrowser.com/\">Beaker Browser</a>, much of it is now incompatible with newer versions of Hypercore. Outside of that, there are apps that build on top of the lower level bits of Hypercore like Mapeo or Cabal that share content among specific groups.</p><p><em>Final Grade: D</em></p><h3 id=\"content---ssb\">Content - SSB</h3><p>Most content on SSB is locked away in people’s social graphs and can only be accessed if you get introduced into these networks; for example, by joining Manyverse. However, there are public <a href=\"https://viewer.scuttlebot.io/\">viewers</a> that offer a glimpse into content that people have chosen to make public.</p><p><em>Final Grade: A</em></p><h2 id=\"links-small-but-critical-infrastructure\">Links: Small But Critical Infrastructure</h2><p>One of the first things people see when interacting with P2P protocols is how data can be linked to them. Most people are using these protocols for loading content from peer to peer networks, and probably don’t think too hard about what the links actually mean. But links are important to consider because the link structure can start to tell you about the different ways the protocols work and some of the constraints in how they can be used. Most of the protocols here have registered URI schemes with <a href=\"https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml\">IANA</a>, which gives straightforward paths for integrating with different applications without worrying about conflicts.</p><h3 id=\"links---bittorrent\">Links - BitTorrent</h3><p>BitTorrent uses links that use the <code class=\"language-plaintext highlighter-rouge\">magnet:</code><a href=\"https://en.wikipedia.org/wiki/Magnet_URI_scheme\">URI scheme</a> by specifying a property that links to the <code class=\"language-plaintext highlighter-rouge\">urn:btih</code> (BitTorrent InfoHash) for a given Torrent. The standard is used by several other content networks like Kazaa and eDonkey, which were popular file sharing networks that aren’t as active these days. The link format can contain extra information like <code class=\"language-plaintext highlighter-rouge\">tracker</code> servers for discovering other peers with data and metadata; this lets you know whether a torrent is “private” without needing to download the torrent itself. One thing to note is that magnet links are <a href=\"https://en.wikipedia.org/wiki/Uniform_Resource_Identifier\">URIs</a>, which can identify a torrent, but are not suitable to use as browser <a href=\"https://en.wikipedia.org/wiki/URL\">URLs</a> because they do not have a “hostname” property that browsers could use as a “origin” to associate things like cookies and permissions with. As well, URI cannot be used for navigating between files inside a given torrent. To address some of the drawbacks of using URI, there’s been some talk about standardizing a <a href=\"https://github.com/bittorrent/bittorrent.org/issues/92\">bittorrent://</a> URL format that would better integrate with browsers and link to specific data, rather than entire torrents.</p><p><em>Final Grade: C</em></p><h3 id=\"links---ipfs\">Links - IPFS</h3><p>IPFS has a couple of approaches to links. Primarily they use <a href=\"https://docs.ipfs.io/concepts/content-addressing/#cid-conversion\">Content Identifiers, a.k.a. CIDs,</a> with two ways of turning them into links. <code class=\"language-plaintext highlighter-rouge\">/ipfs/{CID}/</code> style URLs, which can be easily converted to paths within <a href=\"https://docs.ipfs.io/concepts/ipfs-gateway/\">IPFS gateways</a> were initially fairly common. These mirror the underlying <a href=\"https://github.com/multiformats/multiaddr#protocols\">Libp2p multi-address format</a> and rely on paths with a “type” prefix.</p><p>More recently, IPFS has been using <code class=\"language-plaintext highlighter-rouge\">ipfs://{CID}</code> URLs that have had some growing pains based on the encoding of the CID. At first, IPFS was using the case-sensitive CIDv0 spec, based on the <a href=\"https://learnmeabitcoin.com/technical/base58\">Base58 Bitcoin encoding</a>; but this caused problems with loading IPFS URLs in browsers since the <code class=\"language-plaintext highlighter-rouge\">hostname</code> portion of a URL is case insensitive and generally gets converted to lowercase when parsed within a browser. To mitigate this, IPFS started migrating to CIDv1 which defaults to <code class=\"language-plaintext highlighter-rouge\">base32</code> encoding, using all lowercase characters. There’s still some growing pains when people try to use CIDv0 style links that are the default in older tools, so if your webpage has a URL that starts with <code class=\"language-plaintext highlighter-rouge\">Qm</code>, consider updating it with a <a href=\"https://cid.ipfs.io/\">CID inspector</a>. In addition to IPFS links, there are also <code class=\"language-plaintext highlighter-rouge\">IPNS</code> (InterPlanetary Name System) links that can make use of public keys or DNS (Domain Name Server) names instead of CIDs, like <code class=\"language-plaintext highlighter-rouge\">ipns://{Public Key or DNS}/</code>. The DNS functionality comes from the <a href=\"https://www.dnslink.io/\">DNSLink</a> standard.</p><p><em>Final Grade: A</em></p><h3 id=\"links---hypercore\">Links - Hypercore</h3><p>Hypercore’s URL standard has changed over time, primarily guided by innovations in the <a href=\"https://docs.dat.foundation/docs/cli-intro\">Dat CLI</a> and by Paul Frazee’s <a href=\"https://beakerbrowser.com/\">Beaker Browser</a>. Initially, the ecosystem used <code class=\"language-plaintext highlighter-rouge\">dat://{public key}/</code> URLs where the <code class=\"language-plaintext highlighter-rouge\">public key</code> was 64 hex characters representing a 32 byte public key. This was extended to specify a <code class=\"language-plaintext highlighter-rouge\">version</code> in the URL using the <code class=\"language-plaintext highlighter-rouge\">dat://{public key}+{version}/</code> syntax, and also to specify a <a href=\"https://www.npmjs.com/package/hyper-dns\">DNS name</a> in the URL. Then in <a href=\"https://blog.datproject.org/dat-protocol-renamed-hypercore-protocol/\">2020</a>, the core team working on the Hypercore Protocol part of the Dat ecosystem split off to do their own thing, and the URL scheme was changed to use the <code class=\"language-plaintext highlighter-rouge\">hyper://</code> name instead of <code class=\"language-plaintext highlighter-rouge\">dat://</code>. This URL format is problematic because the <code class=\"language-plaintext highlighter-rouge\">hostname</code> portion is technically invalid according to the URL standard since it uses 64 characters; the maximum allowed length is 63. Luckily, browsers and many other tools like Node.js happily consume the full length of the key, but the community might need to switch from <code class=\"language-plaintext highlighter-rouge\">hex</code> encoding to something like IPFS’ <code class=\"language-plaintext highlighter-rouge\">base32</code> encoding in order to better conform with existing standards.</p><p><em>Final Grade: B</em></p><h3 id=\"links---secure-scuttlebutt-ssb\">Links - Secure Scuttlebutt (SSB)</h3><p>Secure ScuttleButt is a bit of an outlier in that people generally interact with its data via an app like <a href=\"https://www.manyver.se/\">Manyverse</a>, which abstracts the linking of data to an extent. Under the hood, however, SSB has two methods of linking to data: <a href=\"https://handbook.scuttlebutt.nz/concepts/link\">Cypherlinks</a> and <a href=\"https://github.com/ssb-ngi-pointer/ssb-uri-spec\">SSB URI</a>. The Cypherlink spec seems to have evolved for the #hashtag syntax that SSB uses to link to “channels’’ (a.k.a. “tags” in other social media platforms), and adds three new types: <code class=\"language-plaintext highlighter-rouge\">@feed</code> to link to a specific person or “feed,” <code class=\"language-plaintext highlighter-rouge\">%message</code> to link to a message, and <code class=\"language-plaintext highlighter-rouge\">&amp;blob</code> to link to a blob. This syntax is unique among P2P protocols, and is generally only used when rendering Markdown in apps like <a href=\"https://github.com/ssbc/patchwork\">Patchwork</a> or Manyverse. The latest innovations are URIs that make use of the ssb: URI scheme, and a “type” like “message,” “feed,” or “blob;” (for example ssb:message/sha256/<msgid>, ssb:identity/fusion/<key>, ssb:feed/bendybutt-v1/<feedid>`.) SSB URIs are the \"latest and greatest'' in linking structures and put effort into being forward compatible with changes to how SSB feeds are encoded and distributed. However, not all SSB apps such as Patchwork make use of these links (as of March 2022) so you might need to revert to Cypherlinks depending on what you're using.</feedid></key></msgid></p><p><em>Final Grade: C</em></p><p><em>Stay tuned for the next post in the series, which will compare data models and mutability.</em></p>" }, "attachment": [ { "type": "Document", "mediaType": "image/webp", "url": "https://hypha.coop/assets/images/social/dripline/2022-03-28-p2p-primer-part-1.webp", "name": "Taking the Mauve Pill: Exploring Alternatives to the Centralized Web" }, { "type": "Document", "mediaType": "image/png", "url": "https://hypha.coop/assets/images/posts/2022-03-24-logos.png", "name": "A collection of peer to peer logos" } ], "tag": [], "replies": "https://social.distributed.press/v1/@dripline@hypha.coop/inbox/replies/aHR0cHM6Ly9oeXBoYS5jb29wL2RyaXBsaW5lL3AycC1wcmltZXItcGFydC0xLmpzb25sZA==", "shares": "https://social.distributed.press/v1/@dripline@hypha.coop/inbox/shares/aHR0cHM6Ly9oeXBoYS5jb29wL2RyaXBsaW5lL3AycC1wcmltZXItcGFydC0xLmpzb25sZA==", "likes": "https://social.distributed.press/v1/@dripline@hypha.coop/inbox/likes/aHR0cHM6Ly9oeXBoYS5jb29wL2RyaXBsaW5lL3AycC1wcmltZXItcGFydC0xLmpzb25sZA==" } }