ActivityPub explained

Abbreviation:AP
Developer:World Wide Web Consortium, Christine Lemmer-Webber, Evan Prodromou, et al.
Based On:ActivityStreams, JSON-LD
Influenced:AT Protocol[1]
ActivityPub
Purpose:Decentralized social networking
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.

ActivityPub is a protocol and open standard for decentralized social networking. It provides a client-to-server (shortened to 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.[2] 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.[3]

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.[4] 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.[5] Shortly after, further development was moved to the Social Web Incubator 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 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 to, bto, cc and bcc fields. The receiving servers then accounts for the newly received activity and updates the article by adding the like action to it.

Example data

An example actor object that represents a user account:[6]

Notes and References

  1. Web site: FAQ AT Protocol . 2024-06-20 . atproto.com.
  2. Web site: W3C Recommendation 23 January 2018.
  3. Web site: Pierce . David . 2024-02-07 . The fediverse, explained . 2024-06-20 . The Verge . en.
  4. Web site: 29 May 2016 . Sandstorm and the Social Web . zenhack.net . 23 September 2017 . 30 October 2020 . https://web.archive.org/web/20201030010607/https://zenhack.net/2016/05/29/sandstorm-and-the-social-web.html . dead .
  5. Web site: Social Web Working Group . 2024-06-23 . W3C . en.
  6. Web site: January 23, 2018 . ActivityPub Specification . June 22, 2024 . W3C.