marnanel: (Default)
[personal profile] marnanel
ActivityPub in Godmother's House

ActivityPub is a protocol which connects social media sites, like Mastodon, together to form a network called the fediverse.

Let's start with an example.

Once upon a time, your goddaughter Marigold decided to follow you on social media. You received a message containing a JSON object:

{
"@‌context": "https:‌//www.w3.org/ns/activitystreams",
"id": "https:‌//pegs.example.org/activity/1234",
"type": "Follow",
"actor": "https:‌//pegs.example.org/users/marigold",
"object": "https:‌//house.example.com/users/godmother"
}

As you can probably guess, someone named "https:‌//pegs.example.org/users/marigold" (that's Marigold) is asking to follow someone called "https:‌//house.example.com/users/godmother" (that's you).

You are delighted! You reply, accepting Marigold's message:

{
"@‌context": "https‌://www.w3.org/ns/activitystreams",
"id": "https‌://house.example.com/activity/9876",
"type": "Accept",
"actor": "https‌://house.example.com/users/godmother",
"object": "https‌://pegs.example.org/activity/1234"
}

Now Marigold is following you, and will hear all your news.

Next time: how did we know the message was really from Marigold?

Click for: next part, all parts.

Profile

marnanel: (Default)
Monument

January 2022

S M T W T F S
      1
2345678
9101112131415
1617 1819202122
23242526272829
3031     

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 8th, 2025 10:01 pm
Powered by Dreamwidth Studios