Blog

ActivityPub, Fediverse and the Future of social networks

A Crash Course into ActivityPub

The ActivityPub protocol is a decentralized social networking protocol, it defines how applications can represent and communicate classic social network interactions such as ‘Posting a Photo’ or ‘Following a person’, creating a standard with which decentralized social network servers and clients can communicate. ActivityPub is a real-time pub/sub protocol, based on HTTP and JSON.

Let’s start by breaking down an ActivityPub request with one example request, this is a request from Alice to follow Bob on a social network:

HTTP POST Request:

{
"@context" : "https://www.w3.org/ns/activitystreams",
"id":"https://my-example.com/my-first-follow",
"type" : "Follow",
"actor" : "https://mastodon.social/users/Alice",
"object" : "https://mastodon.social/users/Bob"
}

At first glance, you might notice how intuitive it is, we are making a request of type ‘Follow’ performed by the actor ‘Alice’ to the object ‘Bob’. There are three sets of types in ActivityPub:

Activities: They describe actions that can happen on the social network.
Actors: Describe entities that can perform activities.
Objects: Describes an object of any kind.

With these three sets, we can describe classic social network interactions, such as posting an image, following someone, or checking in on an event. The value that ActivityPub creates is by defining a standard to communicate these interactions across federated social networks, creating the possibility, for example, for a user on a social network to follow and interact with someone on a different network.

In order to enable federated social network interactions ActivityPub created the definition of an actor Inbox and Outbox, these are a collection of every action published by the actors that are ready to be requested by other social networks (Outbox) and a collection in which an actor receives actions performed by other actors (Inbox).

In practical terms, your “Inbox” will be an endpoint in which other actors can do POST requests to inform you of new activities, and your “Outbox” will be requested using GET requests by actors to update themselves on the latest activities you created.

Your Inbox and Outbox exist on your ‘Home Server’, we are going to explore the concept of a ‘Home server’ later but for now think of it as the server that is hosting your social network account, this server is going to be responsible for the underlying infrastructure of your social network, for receiving new activities posted on your Inbox and for making your Outbox available for other networks to fetch.

The Fediverse

‘Fediverse’ is a combination of the words “Federated” and “Universe”, it’s also a term that was invented to describe a group of federated social networks that interact with each other using protocols such as the ActivityPub. It started out with a single social network in 2008 and now has more than thousands of live instances with millions of active users. Since the release of ActivityPub in 2018 most of these servers already added support for it and it’s now the most prominent protocol for this server-to-server communication.

In order to join the Fediverse as a user you need to either create your own server to host your account or to choose an existing instance to be your ‘Home server’. Your home server will be responsible for all your account infrastructure on the Fediverse, it will host your Inbox and Outbox and will be the source of truth for your account information.

Adding support for ActivityPub and joining the Fediverse means that a social network can leverage the existing user base of the Fediverse to create content for its own users and to increase the reach of users on its network.

One of the biggest drivers behind the growth of the Fediverse is the open-source project Mastodon. Mastodon is an open-source social network server based on ActivityPub that you can use to host your own social network, it’s also the backend for some of the biggest Fediverse projects that are currently live, such as the Mastodon Social (1M+ users) and Truth Social (2M+ users).

Why would users care about the Fediverse?

There are two main benefits of being part of the Fediverse, Freedom and Content.

Being part of the Fediverse means that you have the freedom to choose a network tailored to your specific needs as your home server, users are free to pick instances based on their content moderation policy, technical reliability, and others, while still being able to interact with their friends that are using a different network or even hosting their own instance.

Using a Fediverse social network also means that you are going to have more content than a traditionally upcoming social network. The Fediverse already has millions of users and several social networks have already announced that they are going to add support for it, such as Tumblr and Threads, this means that even if you are part of a small federated instance you can still consume content being posted on other social networks.

As Bill Gates once said, “Content is king” on the Internet, and since the beginning of social networks users have flocked to where content is being published, but this might change with the Fediverse. With content being available to the whole Fediverse as opposed to a single social network instance this means that each user can make their decision about their home server without taking content into consideration.

Challenges Ahead

Both ActivityPub and the Fediverse have several challenges ahead if they are to continue with their current growth rate.

The first and most pressing one is scalability, ActivityPub is a very recent protocol, it was published in 2018 and so far it has been an uphill battle to scale it with constant outages and degraded user experience. This could be a common case of scaling issues for an early-stage social network with a high growth rate however there are some design decisions behind this protocol that might make it especially hard to scale. Jeff Darcy, an engineer at Meta, wrote a post about this topic, I recommend the read for more context about some of these issues as well as some insights on scaling social networks.

Another important issue is privacy and safety, being a distributed and decentralized network the Fediverse doesn’t have guarantees on how instances are going to handle users right to privacy. Let’s walk through an example, a user posts a picture on their feed, the post is then distributed to all the instances connected to the Fediverse however the user realizes they made a mistake and chooses to delete the picture, in this scenario, a request to delete the picture will be sent to all instances but there are no guarantees that they are going to actually fulfill this request. This issue is not only about instances acting in bad faith, there might be legitimate instances with different policies regarding content deletion requests. In short, there are no guarantees on how instances and users in different instances will interact with the content you post.

Lastly, it’s not clear what the incentives will be for existing social networks to join the Fediverse. Networks in the Fediverse distribute all the content being posted on them, meaning that users will be able to access content that was previously only accessible on their own app/website on a completely different surface, over which the network has no control over. This creates several monetization issues, for example, websites won’t be able to display ads when you consume content shared by them on a different social network.

Keep an eye out

Regardless if you want to create an account in a Fediverse instance or if you use a social network that will add support for it, I recommend keeping an eye out for this space. It’s not frequent that we have an experience of a distributed and federated group of social networks at this scale and, given the current growth trend, it might just be the beginning of a new standard for how social networks operate on the web.

Fing

Fing is a complete network monitoring solution for home and small offices that catalogs and secures your devices in one click.

Fingは、No.1のネットワークスキャナです。ご使用のWiFiに接続されている全デバイスを検出し、識別します。当社の特許技術は、世界中のルーターメーカーやウイルス対策会社でも使用されています。

1. Fingはすでに世界中で4000万人のユーザーを以下のようにサポートしています。

WiFiに誰が接続しているか

WiFiとブロードバンドを誰かに無断で使用されていないか

ハッキングされていないか ネットワークは安全かどうか

私が泊まっているB&Bに隠しカメラはありますか?

なぜNetflixがバッファリングし始めたのか

インターネットプロバイダは、支払いに見合ったスピードで起動しているか

2. Fingアプリの無料ツールとユーティリティでできること。

FingのWi-Fiネットワークスキャナでネットワークをスキャンし、ネットワークに接続されている全デバイスを検出する

IPアドレス、MACアドレス、デバイス名、モデル、ベンダー、メーカーの最も正確なデバイス認識を取得する

インターネットのスピードテスト、WiFiのスピードテスト、ダウンロード/アップロードスピード解析、レイテンシー解析の実行

お住まいの地域のインターネットの停止、ISPの評価、レビュー、速度統計を閲覧

NetBIOS、UPnP、SNMP、Bonjourの名前、プロパティ、およびデバイスタイプの高度なデバイス解析

Wi-Fiへの侵入者を検出し、スキャンごとに未検出の新デバイスを表示する

ポートスキャン、デバイスping、traceroute、DNSルックアップ、Wake on LAN内包

携帯電話とEメールでネットワークセキュリティ&デバイスのアラート通信を受信するためにご登録ください

3. Fingboxを追加すると、高度なネットワーク保護機能とスマートホームトラブルシューティング機能を利用できます。

留守の時でも自宅に誰がいるか常に確認可能

自宅付近を通過する全デバイスの表示

侵入者や未知のデバイスがネットワークに接続する前に自動的にブロックする

ペアレンタルコントロール機能を設定して使用時間をスケジュールし、インターネットアクセスを一時停止する

デバイスごとに帯域幅の使用状況を分析し、ユーザーを特定する

Wi-Fiのスイートスポットを探す

ネットワークのスピードテストを自動化し、ISPのパフォーマンスをベンチマークするためのレポートを取得する

開かれたポートの検出とネットワーク脆弱性分析を使用してホームネットワークを保護する

Link

https://www.fing.com/