Decentralized Social Networks

Comparing federated and peer-to-peer protocols

Or, centralized, federated, and peer-to-peer

Federated protocols

Federated networks let users pick a server to sign up with, which gives them access to the entire network spread out across many different servers. This gives users more choices for applications, policies, and community cultures. Email is an example of a federated protocol that everyone on the internet uses. Gmail is a popular email application, but if you use a different provider you can still communicate with anyone with an email address.

ActivityPub

ActivityPub is a federated protocol that defines a set of interoperable social network interactions through specific APIs. Any server that implements this protocol can communicate with the rest of the network.

Home feed on Mastodon

Identity

Users create an account on a server (an “instance”), but can communicate with users on other instances. The entire constellation of instances that can interoperate is called the “Fediverse”. A full username is a user’s handle plus the name of the instance the user belongs to, for example:

@arcalinea@mastodon.social 

Moderation

Each instance sets its own moderation policies, either through the unilateral decisions of an admin, or through some sort of collective vote. Admins can ban entire instances, cutting off their visibility. If an instance gets banned by many others, its users can still talk with each other, but they will be isolated from the rest of the Fediverse. This happened to Gab.com, which set up an instance.

Monetization

Federated social networks require both hosting and development costs to maintain. Each instance is funded by its own administrator and community. Mastodon’s development is funded through a Patreon run by the main developer. It currently brings in about 70k a year, which supports him working on it full time, and covers hosting costs and a moderation team for the mastodon.social instance.

Another federated protocol: Matrix

Matrix is a protocol designed more for chat than for social networks, but it is worth mentioning because it has achieved a federated chat experience with good UX at scale, and has done valuable work on improving identity and moderation. The protocol currently has around 11 million users who use a variety of clients. It is developed by the company New Vector which raised an $8 million series A in 2019. Matrix has a more flexible identity solution than most decentralized protocols — users have a Matrix user id, but can also use 3rd party ids. A Matrix account links to ids such as email addresses, social accounts, and phone numbers. A globally federated cluster of trusted identity servers verify and replicate the mappings. The Matrix team has also been working intensively on tools for moderation, detailed here, and plans to release a p2p implementation soon.

Pros and Cons of Federation

Federated networks provide a familiar user experience, since users do not have to bear full responsibility for their account credentials, and can interact with content the way they’re used to. Users get to choose between different services in the same network that suit their needs better without having to adapt to a drastically different way of doing things.

P2P protocols

P2p protocols let users communicate directly with each other, as all devices in the network are peers, both requesting data and responding to requests. Some nodes may have special roles, like public bootstrap nodes that help new users get connected to the network, but every node is still functionally equivalent. This design gives users the most control, but also the most responsibility.

Ssb

Ssb, or secure-scuttlebutt, is a distributed gossip protocol designed for social sharing. Every node has a partial view of the network, which makes it hard to get a count of how many total users there are, but according to a network crawl run by a developer in Nov 2019, there are around 16,000 nodes on ssb. Users are distributed across a few different client apps that work on desktop (Patchwork) and mobile (Manyverse, Planetary).

Home feed on Patchwork, a desktop client for ssb

Identity

In ssb, users are identified by public keys. My public key is:

@3QHXrXl762sf7P/Q1RMtscA7IRipfUFnE5tpie5McvE=.ed25519

Moderation

At the ssb protocol level, there is a “flag” feature to send a strong negative signal about bad actors. There is no global moderation, and no specialized moderators. Applications built on top of ssb allow users to “block” and “ignore”. A block in ssb functions more strongly than a block in centralized networks because it means that blocked users no longer have their data passed through those nodes. If enough people block a user or group of users, their part of the network will become cut off from the rest.

Monetization

Maintainers of p2p networks do not have to pay for hosting costs, since there are no servers and the network naturally grows in capacity as new users join. Developers who want to work on more than a volunteer basis need to find their own funding. The ssb ecosystem is supported through a variety of grants, donations, income from side projects and consulting, and a few companies that have raised money to build applications on ssb.

Another p2p protocol: Aether

Aether is a Reddit-like p2p social network. Instead of an append-only log, its data structure is a DAG (directed-acyclic graph), and it makes posts ephemeral. You can edit and delete posts, and they automatically get dropped after a period of inactivity, unlike ssb, which stores every post. The p2p version is supported through funding from the self-hosted Aether Pro version. It has a strategy for multiple device logins — you can store and sync encrypted keys from a remote backend. Each sub-community has its own moderators, which communities elect or impeach themselves.

Pros and Cons of P2P

P2p networks place users fully in control of their data and identity. The data layer is functionally separate from the application view, so users can seamlessly switch between apps while keeping all their accumulated posts and connections. The capacity of p2p networks naturally scales with demand, since new users add resources to the network and don’t just consume. P2p networks are maximally resilient and censorship-resistant. Because p2p networks don’t need servers, applications can continue working even if the rest of the internet is down, as long as there is a local connection between two devices on the network. Accounts all have cryptographic keypairs, so private messages are easy to support — ssb provides end-to-end encrypted private messages.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store