Let’s dive into ActivityPub

Protocol for the social web and beyond

Jan Vlnas, May 29th 2024

jan.vlnas.cz

Hi, I'm Jan

👋

Hi, I'm Jan

👋

Do you have an account on Mastodon?

🙋

…before 2022?

I’m excited about ActivityPub

I’m excited about ActivityPub

As a user,

I have a choice

I can engage on my terms

I’m excited about ActivityPub

As a developer,

I don't need to trust another platform

I don't need this bulls**t

Tweetbot by Tapbots

2011—2023

Twitterific by Iconfactory

2007—2023

Ivory for Mastodon
by Tapbots

Project Tapestry by Iconfactory

ActivityPub is…

product

platform

protocol

Outline

  1. What is ActivityPub & federation
  2. What's being built with ActivityPub
  3. How ActivityPub works & demo
  • ❌ Culture of the fediverse
  • ❌ Ethics of Threads.net federation

ActivityPub

“The ActivityPub protocol is a decentralized social networking protocol […]”

ActivityPub
W3C Recommendation, January 2018

Federation

Centralized services

Centralized services

Federated services

Federated services

image/svg+xml
image/svg+xml

Federation + Universe

“Fediverse”

image/svg+xml
image/svg+xml

threads.net

pixelfed.fr

social.bbc

fedi.video

*.wordpress.com

retrolemmy.com

write.as

infosec.press

literature.cafe

witter.cz

gram.social

image/svg+xml

threads.net

pixelfed.fr

social.bbc

fedi.video

*.wordpress.com

retrolemmy.com

write.as

infosec.press

literature.cafe

witter.cz

gram.social

image/svg+xml

threads.net

pixelfed.fr

social.bbc

fedi.video

*.wordpress.com

retrolemmy.com

write.as

infosec.press

literature.cafe

witter.cz

gram.social

Server software

Instances

Client applications

(alternative UIs)

What’s being built with ActivityPub

Microblogging (Mastodon, Misskey, Pleroma, Friendica…)

Blogging (WriteFreely, WordPress plugin, Ghost.org*)

Discussion forums (Lemmy, mbin, NodeBB, Discourse…)

Media sharing (Pixelfed, PeerTube, Funkwhale, Owncast…)

Book reviews (BookWyrm)

Podcasts hosting (Castopod)

What’s being built with ActivityPub

Follow

Publish

React

View

Microblogging (Mastodon, Misskey, Pleroma, Friendica…)

Blogging (WriteFreely, WordPress plugin, Ghost.org*)

Discussion forums (Lemmy, mbin, NodeBB, Discourse…)

Media sharing (Pixelfed, PeerTube, Funkwhale, Owncast…)

Book reviews (BookWyrm)

Podcasts hosting (Castopod)

“Our dream for the fediverse is a world in which you don't have to make a screenshot to share something from one network into another network. The fediverse is all one big network.
It's all connected.

Evan Prodromou
co-author of ActivityPub and ActivityStreams 2.0

WordPress ↔ Mastodon

“The Verge and 404 Media are building out new functions that would allow them to distribute posts on their sites and on federated platforms […]. Replies to those posts on those platforms become comments on their sites.

Why publishers are preparing to federate their sites
Sara Guaglione, Digiday, May 24 2024

[…] Instead of spending time building a presence on other platforms for their benefit, a publisher can do that on their own sites — while giving readers the ability to see those posts on other federated platforms.”

Beyond publishing

Federated software development

Beyond publishing

Federated software development

How ActivityPub works

JSON files pointing to other JSON files.

“The ActivityPub protocol is a decentralized social networking protocol

ActivityPub
W3C Recommendation, January 2018

based upon the ActivityStreams 2.0 data format. It provides a client to server API for creating, updating and deleting content, as well as a federated server to server API for delivering notifications and content.”

Activity Streams

ActivityPub

Activity Streams

Alice created a note.

Activity

Activity Streams

Alice created a note.

Actor

Verb
“Create”

Object
of type “Note”

Activity

Activity Streams

Bob followed Charlie.

Actor

Verb

“Follow”

Object

of type “Actor”

Activity

Activity Streams

JSON-LD

ActivityPub

{
"@context": "https://www.w3.org/ns/activitystreams",
"type": "Note",
"to": ["https://www.w3.org/ns/activitystreams#Public"],
"attributedTo": "https://social.example/alice/",
"content": "Hello world!"
}

Object of type “Note”

{
"type": "Note",
"to": ["https://www.w3.org/ns/activitystreams#Public"],
"attributedTo": "https://social.example/alice/",
"content": "Hello world!"
}

“Create” activity

{
"@context": "https://www.w3.org/ns/activitystreams",
"type": "Create",
"id": "https://social.example/alice/posts/123",
"to": ["https://www.w3.org/ns/activitystreams#Public"],
"actor": "https://social.example/alice/",
"object":
}

“Create” activity with object reference

{
"@context": "https://www.w3.org/ns/activitystreams",
"type": "Create",
"id": "https://social.example/alice/posts/123",
"to": ["https://www.w3.org/ns/activitystreams#Public"],
"actor": "https://social.example/alice/",
"object": "https://social.example/alice/posts/abcdef"
}

Activity Streams

JSON-LD

ActivityPub

WebFinger

RFC 9421
HTTP Message Signatures

Demo

  1. Profile discovery
  2. Actor profile
  3. Publishing a note

@webexpo@mastodon.social

https://mastodon.social/.well-known/webfinger
?resource=acct:webexpo%40mastodon.social

inbox

inbox

inbox

(outbox)

ActivityPub Challenges

  • Compatibility
  • Profile portability
  • Moderation
  • Scalability

FediTest

FEPs
(Fediverse Enhancement Proposals)

Creating an activity

Sending a reply

Conclusion

ActivityPub is…

product

platform

protocol

social media app

platforms

protocols

Fediverse

Social web

Web

bitoff.org/ap

jan.vlnas.cz

@jnv@bitoff.org