Cross-server Interactions in ActivityPub

So, Richard McManus asked me about how ActivityPub supports cross-server usage. As an example use case, let’s say a user with the account eric@social.example wants to comment on a photo by dionne@photos.example. In this scenario, Eric would go to the page https://photos.example/users/dionne/photos/1 and enter a comment. How would that work? I can talk about how it would work using the ActivityPub API. But I’m going to have to explain a lot about the API first!

ActivityPub’s API is how client applications interact with the data on a user’s main account server. It lets the user read data on the same or other servers, and it lets them create activities and other kinds of objects on that server that get shared (under the user’s control) with the rest of the world.

We can all kind of imagine this working for the general-purpose social apps we use — things like an Android social app. But what if we think about more special-purpose apps — applications that provide particular functionality not found in most general-purpose social clients? Let’s consider an ActivityPub enabled photo-editing tool that lets you change lighting, add cartoon characters, change your appearance, or other modifications that are often seen in “filters” on Instagram or Snap:

Two neat things to note: first, yes, there are control mechanisms so that remote apps can’t do just anything they want behind your back; you get control. The other thing that’s neat is that because ActivityPub is very extensible, you can have all kinds of cool apps interacting with your ActivityPub account. Games, dating, ecommerce, all kinds of stuff.

Now, what does all this have to do with cross-server interactions? Here’s the idea: when a user from social.example is browsing the web site for photos.example and wants to interact with the people or the photos, they log in and treat that remote server as if it was an ActivityPub client. Then, the ActivityPub server reports the activities back to the remote server using the ActivityPub federation protocol.

This is actually a good model that works fairly well. It makes your own ActivityPub server your real home on the social web, where all your activities go through. It’s still in development and unfolding in the ActivityPub world — not everyone supports the ActivityPub API fully, so it’s hard to see these benefits today.

This is a topic I cover in my book ActivityPub: Programming for the Social Web, so if you’re interested in more detail, please check out the book.

14 thoughts on “Cross-server Interactions in ActivityPub

    1. @evan @evanprodromou Thanks Evan, it sounds compelling and I look forward to reading more! Re “It makes your own ActivityPub server your real home on the Web” -> is the idea that you would host your own AP server (e.g. for me it could be at ricmac.org), or do you think managed services will emerge that offer this as a service? Or is it something you can do with your Mastodon account potentially?

      1. I meant “your own server” as in “the one where your account is”, not necessarily “the one on your bookshelf”.

        I think it’s great for people to run their own services, use managed services, or use services provided by their employer, university, etc.

        I think it’s something you can do with your Mastodon account potentially. Mastodon supports most of this interface already.

      2. @ricmac ActivityPub servers capable of hosting your identity at a domain of your choice, rather than the servers’ own domain, are going to be a thing. Mastodon today doesn’t do that. One of the few that does is @takahe – but it’ll become more common for a general purpose “social” server.

        And then there are going to be the special purpose apps, which will also speak ActivityPub – in their domains, or yours, depending on their ops model.@evan @evanprodromou

      3. @daveSure, that's a consideration. However I was more thinking about the wider fedi visibility. A single-domain, single-user Mastodon (or, presumably, gotosocial) instance will only see (to a gross approximation) that part of the fedi which the user is following, or quite little compared to a larger server.
        A multi-domain, single-user-per-domain server running something like Takahe would also have the context of every other users' graph.@ricmac @takahe @evan @evanprodromou @gotosocial

Leave a comment