ActivityPub
{{Short description|Decentralized social networking protocol}}
{{Infobox networking protocol
| title = ActivityPub
| abbreviation = AP
| logo = ActivityPub-logo.svg
| logo size = 300px
| image = ActivityPub-tutorial-image.svg|caption=An infographic of the core functionality of ActivityPub
| image alt = The image depicts a infographic of the basic functionality of ActivityPub. It shows a person (known as an Actor in ActivityPub terminology) reading incoming messages ("activities") from an inbox, which receives messages from other Actors (depicted as a cloud labeled "REST OF THE WORLD") via federation. The Actor also sends messages to their outbox, which the rest of the world receives via federation.
| developer = World Wide Web Consortium and {{Plain list|
- Christine Lemmer-Webber
- Jessica Tallon
- Erin Shepherd
- Amy Guy
- Evan Prodromou
}}
| date = {{Start date and age|2018|01|23}}
| purpose = Decentralized social networking
| based on = ActivityStreams, JSON-LD
| influenced = AT Protocol{{Cite web |title=FAQ |work=AT Protocol |url=https://atproto.com/guides/faq#why-not-use-activitypub |access-date=2024-06-20}}
| website = {{Official URL}}
}}
ActivityPub is a protocol and open standard for decentralized social networking. It provides a client-to-server (C2S) API for creating and modifying content, as well as a federated server-to-server (S2S) protocol for delivering notifications and content to other servers.{{Cite web |title=W3C Recommendation 23 January 2018 |url=https://www.w3.org/TR/2018/REC-activitypub-20180123/}} ActivityPub has become the main standard used in the fediverse, a popular network used for social networking that consists of software such as Mastodon, Pixelfed and PeerTube.{{Cite web |last=Pierce |first=David |date=2024-02-07 |title=The fediverse, explained |url=https://www.theverge.com/24063290/fediverse-explained-activitypub-social-media-open-protocol |access-date=2024-06-20 |website=The Verge |language=en}}
ActivityPub is considered to be an update to the ActivityPump protocol used in pump.io, and the official W3C repository for ActivityPub is identified as a fork of ActivityPump.{{Citation |title=w3c/activitypub |date=2024-06-20 |url=https://github.com/w3c/activitypub |access-date=2024-06-22 |publisher=World Wide Web Consortium}}{{Cite web |date=29 May 2016 |title=Sandstorm and the Social Web |url=https://zenhack.net/2016/05/29/sandstorm-and-the-social-web.html |url-status=dead |archive-url=https://web.archive.org/web/20201030010607/https://zenhack.net/2016/05/29/sandstorm-and-the-social-web.html |archive-date=30 October 2020 |access-date=23 September 2017 |website=zenhack.net}} The creation of a new standard for decentralized social networking was prompted by the complexity of OStatus, the most commonly used protocol at the time. OStatus was built using a multitude of technologies (such as Atom, Salmon, WebSub and WebFinger), a product of the infrastructure used in GNU social (the originator and largest user of the OStatus protocol), which made it difficult to implement the protocol into new software. OStatus was also only designed to work with microblogging services, with little flexibility to the types of data that it could hold.
The standard was first published by the World Wide Web Consortium (W3C) as a W3C Recommendation in January 2018 by the Social Web Working Group (SocialWG), a working group chartered to build the protocols and vocabularies needed to create a standard for social functionality.{{Cite web |title=Social Web Working Group |url=https://www.w3.org/groups/wg/social/ |access-date=2024-06-23 |website=W3C |language=en}} Shortly after, further development was moved to the Social Web Community Group (SocialCG), the successor to the SocialWG.
Design
ActivityPub uses the ActivityStreams 2.0 format for building its content, which itself uses JSON-LD. The three main data types used in ActivityPub are Objects, Activities and Actors. Objects are the most common data type, and can be images, videos, or more abstract items such as locations or events. Activities are actions that create and modify objects, for example a {{code|Create}} activity creates an object. Actors are representative of an individual, a group, an application or a service, and are the owners of objects.
Every actor type contains an inbox and outbox stream, which sends and receives activities for a user. In order to publish data (for example liking an article), a user creates an activity that declares that they liked an Article object and publishes it to their outbox, where it is then delivered by the ActivityPub server via a POST request to the inboxes listed in the activity's {{code|to}}, {{code|bto}}, {{code|cc}} and {{code|bcc}} fields. The receiving servers then account for the newly received activity and update the article by adding the like action to it.
=Example data=
An example actor object that represents a user account:{{Cite web |date=January 23, 2018 |title=ActivityPub Specification |url=https://www.w3.org/TR/activitypub/#client-addressing |access-date=June 22, 2024 |website=W3C}}
{
"@context": ["https://www.w3.org/ns/activitystreams",
{"@language": "ja"}],
"type": "Person",
"id": "https://kenzoishii.example.com/",
"following": "https://kenzoishii.example.com/following.json",
"followers": "https://kenzoishii.example.com/followers.json",
"liked": "https://kenzoishii.example.com/liked.json",
"inbox": "https://kenzoishii.example.com/inbox.json",
"outbox": "https://kenzoishii.example.com/feed.json",
"preferredUsername": "kenzoishii",
"name": "石井健蔵",
"summary": "この方はただの例です",
"icon": [
"https://kenzoishii.example.com/image/165987aklre4"
]
}
An example activity that likes an article object:
{
"@context": ["https://www.w3.org/ns/activitystreams",
{"@language": "en"}],
"type": "Like",
"actor": "https://dustycloud.org/christine/",
"summary": "Christine liked 'Minimal ActivityPub update client'",
"object": "https://rhiaro.co.uk/2016/05/minimal-activitypub",
"to": ["https://rhiaro.co.uk/#amy",
"https://dustycloud.org/followers",
"https://rhiaro.co.uk/followers/"],
"cc": "https://e14n.com/evan"
}
An example article object:
{
"@context": ["https://www.w3.org/ns/activitystreams",
{"@language": "en-GB"}],
"id": "https://rhiaro.co.uk/2016/05/minimal-activitypub",
"type": "Article",
"name": "Minimal ActivityPub update client",
"content": "Today I finished morph, a client for posting ActivityStreams2...",
"attributedTo": "https://rhiaro.co.uk/#amy",
"to": "https://rhiaro.co.uk/followers/",
"cc": "https://e14n.com/evan"
}
Project status
The SocialCG previously organized a yearly free conference called ActivityPub Conf about the future of ActivityPub.{{Cite web |title=ActivityPub Conf 2019 |url=https://redaktor.me/apconf/}}{{Cite web |title=ActivityPub Conf 2020 |url=https://conf.activitypub.rocks/ |url-status=dead |archive-url=https://web.archive.org/web/20210602161023/https://conf.activitypub.rocks/ |archive-date=2021-06-02 |access-date=2020-08-01}} Triages are held regularly to review issues pertaining to the ActivityPub and ActivityStreams 2.0 specifications as part of the SocialCG.{{Cite web |title=W3C Social Web Incubator Community Group Mailing List |url=https://www.w3.org/Search/Mail/Public/search?type-index=public-swicg&index-type=t&keywords=issue+triage&search=Search |access-date=March 18, 2024}}
In 2023, Germany's Sovereign Tech Fund donated €152,000 to socialweb.coop with the goal of building a new suite for testing various ActivityPub implementations and their compliance with the specification.{{Cite web |title=ActivityPub Test Suite |url=https://www.sovereigntechfund.de/tech/activitypub-test-suite |access-date=2024-05-26 |website=Sovereign Tech Fund |language=en}}
=Adoption=
{{Further|Fediverse#Adoption}}
The initial wave of adoption for ActivityPub (circa 2016-2018) came from software that was already using OStatus as their federation protocol, such as Mastodon, GNU social and Pleroma.{{Cite web |date=2018-02-10 |title=Pleroma Encyclical: ActivityPub |url=https://blog.soykaf.com/post/pleroma-encyclical-activity-pub/ |access-date=2024-06-23 |website=blog.soykaf.com |language=en-US}} Following the acquisition of Twitter by Elon Musk in 2022, many groups of users that were critical of the acquisition migrated to Mastodon, bringing new attention to the ActivityPub protocol with it.{{Cite web |last=MacManus |first=Richard |date=2022-11-15 |title=Devs Are Excited by ActivityPub, Open Protocol for Mastodon |url=https://thenewstack.io/devs-are-excited-by-activitypub-open-protocol-for-mastodon/ |access-date=2024-06-23 |website=The New Stack |language=en-US}} Various major social media platforms and corporations have since pledged to implement ActivityPub support, including Tumblr,{{Cite web |last=Perez |first=Sarah |date=2022-11-21 |title=Tumblr to add support for ActivityPub, the social protocol powering Mastodon and other apps |url=https://techcrunch.com/2022/11/21/tumblr-to-add-support-for-activitypub-the-social-protocol-powering-mastodon-and-other-apps/ |access-date=2024-06-23 |website=TechCrunch |language=en-US}} Flipboard{{Cite web |last=McCue |first=Mike |date=2023-12-18 |title=Flipboard Begins to Federate |url=https://about.flipboard.com/inside-flipboard/flipboard-begins-to-federate/ |access-date=2024-06-23 |website=Flipboard |language=en-US}} and Meta Platforms' Threads.{{Cite web |last=Guinness |first=Harry |date=2023-07-12 |title=How ActivityPub is setting the stage to weave all your social media feeds together |url=https://www.popsci.com/technology/activitypub-fediverse/ |access-date=2024-06-23 |website=Popular Science |language=en-US}}
Criticism
=Accidental denial-of-service attacks=
Poorly optimized ActivityPub implementations can cause unintentional distributed denial-of-service (DDOS) attacks on other websites and servers, due to the decentralized nature of the network.{{Citation needed|date=June 2024|reason=Add citations from more social networks, not just Mastodon.}} An example would be Mastodon's implementation of OpenGraph link previews, wherein every instance that receives a post that contains a link with OpenGraph metadata will download the associated data, such as a thumbnail, in a very short timeframe, which can slow down or crash servers as a result of the sudden burst of requests.{{Cite web |date=2024-05-01 |title=Please Don't Share Our Links on Mastodon: Here's Why! |url=https://news.itsfoss.com/mastodon-link-problem/ |access-date=2024-06-18 |website=It's FOSS News |language=en}}{{Cite web |last=Balkan |first=Aral |date=2022-11-09 |title=Is the fediverse about to get Fryed? (Or, 'Why every toot is also a potential denial of service attack') |url=https://ar.al/2022/11/09/is-the-fediverse-about-to-get-fryed-or-why-every-toot-is-also-a-potential-denial-of-service-attack/ |access-date=2024-06-18 |website=ar.al |language=en}}
=Account migration=
ActivityPub has been criticized for not natively supporting moving accounts from one server to another, forcing implementations to build their own solutions.{{Cite web |title=FAQ {{!}} AT Protocol |url=https://atproto.com/guides/faq#why-not-use-activitypub |access-date=2024-06-20 |website=atproto.com}} While there has been work on building a standardized system for migrating accounts using the Move activity via the Fediverse Enhancement Proposal organization, the current proposal only allows for basic follower migration, with all other data remaining linked to the original account.{{Cite web |last=fediverse |title=FEP-7628 |url=https://codeberg.org//fediverse/fep/src/branch/main/fep/7628/fep-7628.md |access-date=2024-06-20 |website=Codeberg.org |language=en-US}}
=Missing content and data=
ActivityPub implementations have been criticized for missing replies and parts of reply threads from remote posts, and presenting outdated statistics (e.g. likes and reposts) about remote posts.{{Cite web |last=Wave |first=Setsune |date=2023-12-17 |title=This is a serious problem the fediverse has... |url=https://furries.club/@Setsune/111596877006547564 |access-date=2024-06-18 |website=Furries.club |language=en}}{{Cite web |last=Armando |first=Armando |date=2024-06-19 |title=I think one of the things that most annoy newcomers to the #Fediverse is... |url=https://fedia.social/notes/9uoxk3dsm6a3w1vx |access-date=2024-06-19 |website=Fedia.Social}} However, this isn't a problem with the ActivityPub protocol itself, but with implementations not refreshing their content for updated data when needed.{{Cite web |last=Nedelcu |first=Alexandru |date=2022-12-21 |title=Missing replies · Mastodon · Discussion #22608 |url=https://github.com/mastodon/mastodon/discussions/22608 |access-date=2024-06-18 |website=GitHub |language=en}}{{Cite web |last=Prodromou |first=Evan |date=2024-06-19 |title=All of that information is available through ActivityPub... |url=https://cosocial.ca/@evan/112641540530853533 |access-date=2024-06-19 |website=CoSocial |language=en}}{{Citation needed|date=June 2024|reason=Add a citation for this claim; Additionally, in this entire paragrpah, add citations for software other than Mastodon.}}
Software using ActivityPub
=Future implementations=
- GitLab, a Git forge and development platform{{Cite web |title=Support ActivityPub for merge requests (&11247) · Epics · GitLab.org · GitLab |url=https://gitlab.com/groups/gitlab-org/-/epics/11247 |access-date=2023-08-26 |website=GitLab |language=en}}
- Forgejo, a Git forge and development platform{{Cite web |title=First forgejo monthly update - December 2022 |url=https://forgejo.org/2022-12-26-monthly-update/ |access-date=2023-08-29 |website=forgejo.org |date=26 December 2022 |language=en}}
- Tumblr, a microblogging platform{{Cite web |last=Perez |first=Sarah |date=2023-12-11 |title=Tumblr's 'fediverse' integration is still being worked on, says owner and Automattic CEO Matt Mullenweg |url=https://techcrunch.com/2023/12/11/tumblrs-fediverse-integration-is-still-being-worked-on-says-owner-and-automattic-ceo-matt-mullenweg/ |access-date=2023-12-19 |website=TechCrunch |language=en-US}}{{Cite web |last=Perez |first=Sarah |date=2022-11-21 |title=Tumblr to add support for ActivityPub, the social protocol powering Mastodon and other apps |url=https://techcrunch.com/2022/11/21/tumblr-to-add-support-for-activitypub-the-social-protocol-powering-mastodon-and-other-apps/ |access-date=2023-12-19 |website=TechCrunch |language=en-US}}{{Cite web |last=Perez |first=Sarah |date=2025-02-11 |title=Tumblr to join the fediverse after WordPress migration completes |url=https://techcrunch.com/2025/02/11/tumblr-to-join-the-fediverse-after-wordpress-migration-completes/ |access-date=2025-02-12 |website=TechCrunch |language=en-US}}
See also
{{Portal|Free and open-source software}}
References
{{Reflist}}
External links
{{Commons}}
- {{Official website}}
- [https://www.w3.org/TR/activitypub ActivityPub specification]
{{Fediverse}}
{{W3C standards}}
Category:Distributed computing
Category:Microblogging software