Takahe / 15th Nov 2022

Twitter, ActivityPub and The Future

Twitter is - was - such a unique place. Somewhere where you can have the President of the United States coexist with teenagers writing fan fiction; where celebrities give personal insights into their lives while government departments post memes about public safety; the place that gave us @Horse_ebooks and @dril.

The "Fediverse", with Mastodon at its helm, is not this. It doesn't seem to want to be, and I honestly think that's fine - as many thinkpieces have recently said, the age of global social media might just be over. And given the effect it's had on the world, maybe that's alright after all.

But there is still a void to fill, and as someone who enjoyed Twitter most at its "medium" size, I think the ActivityPub ecosystem is well-placed to grow into such a space. But first, I think there's some important things we have to discuss about it.

Federation Is A UX Nightmare

If I was to tell you "hey, go sign up for this service, but to do that you need to pick one of these hundred servers at random", and I then gave you no guidance as to which were the good ones, you'd tell me it was a terrible service.

If I was to then tell you that the server you picked was more than just part of your eventual username/handle - that the people you shared the server with were somewhat culturally important - you'd probably walk away and go look for something else. And you'd be right.

Much like Twitter, the technology behind ActivityPub - Mastodon included - is merely an enabler in the grander product that is delivering people things they want to see and shielding them from stuff they don't. Right now, that's accomplished via leagues of tireless server administrators and moderators, sharing blocklists among themselves and suffering under the influx of the past few weeks, and making recommendations of where to go when their own servers are overloaded and can't take more people.

Of course, though, the federation is the point. If a server is suddenly bought by a billionare who starts to turn off pieces of it at random, then you can - in theory - simply move to another. Well, except you can't easily move your followers, and you can't move your posts at all.

It seems inevitable that the system as a whole will have to revert to a mean, one where there's clusters of homogenously-cultured servers with large, defederated gaps between them, and server choice is less important. That's not necessarily a failure mode, either, but it does put a lot of pressure on server admins to be moderators, SREs, and diplomats, all at once.

Building On A Foundation

Of course, the worst reaction to all this is to throw it away and try to build something that is Obviously Better - because the technology doesn't matter nearly as much as the network effect does. People will use a laggy Fediverse over an amazingly responsive and perfectly-designed alternative as long as the former still has all the people.

When I design distributed systems in my day job, I always make sure to have at least two axes of scaling - that way, if you've run into a wall scaling up on one axis (for example, your Mastodon server is full and Sidekiq is screaming under the load) you can scale up on the other one to relieve the pressure (launch another Mastodon instance). At a glance, ActivityPub seems to be well-placed in this regard to survive scaling pressure.

The problem, though, is that adding more instances comes with a cost - to be specific, the Handshake Problem. As the number of servers on the network increases, the cost for them all to talk to each other increases exponentially (assuming they're already being somewhat efficient and using shared inboxes). In addition, it takes more effort to moderate ten servers than it does one; most of the defederation, blocking and trends moderation you're doing is probably very similar across all of them.

Thus, it seems the right approach is to tend towards larger installations that can all handle these things at a reasonable efficiency, provide a server choice that is not entirely about culture, and also make moderation a little more sustainable (and, given it is the product, hopefully making it a paid job).


Now, you may have noticed that despite what I just said, I did not join a larger server - even though there are some run by people I trust - and that is because of the intersection of two things: trust, and burnout.

Even if I trust the server admins, if they're unpaid (and maybe even if they're paid), they are likely going to burn out at some point and no longer want to run a server. At that point, there's an issue; you can neglect the server and cause it to be a bad experience and maybe be blocked, you can shut down because you don't trust anyone else to safeguard your users (like mastodon.technology), or if you're prepared and not fully burnt out you can try to find trustworthy replacement admins (like wandering.shop did, after a lot of effort).

As a user, there's not much you can do to prevent this. If you're technically minded enough and want to lose more spare time, you can run your own server, but that's not a solution for anyone except those of us who are a bit sad about the current state of SMTP. And if your server suffers this fate, well, there goes your week and you have to do the choose-a-server dance again.

Mastodon has made some strides towards making identities moveable. ActivityPub limits this somewhat, due to its heavy use of canonical URIs for everything, but it's a start. I think it's a good foundation to build on, but I also think more improvements can be made there, over and on top of the existing spec.

The Mastodon team have been, from my understanding, a little uncooperative with other ActivityPub servers in trying to reach agreements on protocol changes, but I also sort of get it - there's still a lot of features to add even within the existing specs, plus they have to write a piece of software that has to simultaneously scale up to run mastodon.social as well as scale down to run small communities.

Talking of identities, domain names are also a big signal - for some technical individuals they're personal, but for companies and governments they're a verification symbol as well. If we want to engage governments in the same way on the Fediverse, especially local ones, we need to give them a solution where every city doesn't need to host their own server - which, right now, you need to if you want to use your own domain name.

ActivityPub Isn't Bad, Actually

You may have seen some hot takes from people about how ActivityPub is terrible, or it's hard to implement - well, sure, I share some of their pain (I never thought I'd need to think about RDF ever again), but it's surprisingly decent at its core.

When I refer to "ActivityPub", I also include ActivityStreams and other ancillary specs as well.

The inbox/outbox model is reasonable (though it maybe should have focused more on shared inboxes), the objects and actions it defines are quite flexible and cover several different kind of social networks you might want, and once you get your head around the signature code needed (which is, in many cases, not really part of the spec), it gets up and running quite quickly.

Do I have critiques? Of course I do! It doesn't really highlight how to move identities and objects around between URIs, it doesn't care about username presentation with domains, it doesn't specify several areas which leads to incompatibilities... I could go on.

But I do want to give my thanks to its authors because I don't think I could have done any better and it is crucially good enough. Perfect is the enemy of good, and in ActivityPub we have a protocol that has flaws but, crucially, that works, and has a standard we can all mostly agree on how to implement - and eventually, I hope, agree on how to improve.

Moving Forwards

So, what do I make of all this? Well, I think any effort to make a brand new social network that isn't based on ActivityPub is probably not going to work (apart from Cohost, who to their credit seem to have found a niche and I hope they do well by it - though I'd love them to add AP support).

Instead, I think there's some positive moves that can be made:

Such a list is as powered by hope as it is by logic, but from my twenty years maintaining Open Source software, I believe that hope and vision is an incredibly powerful force that should never be underestimated.

I think the likely endgame for ActivityPub is either a set of very large, potentially commercial, servers, or to fade into relative irrelevance like IRC (There are tens of us who use it! Tens!). There's still a path out of this, though, where we somehow establish a world where there's several sustainable, medium-scale, social networks, run for the good of society rather than profit.

We may be seeing the end of the "social media era" (congratulations to Reddit, by the way, for being the only apparent survivor) - but there are good things to take from it, as we have with every other era of communication.

For my part, I'm building Takahē as my springboard to try and effect some change. I doubt it will become nearly as popular as Mastodon or even the other, less popular server software, but I figure I can at least push some innovative ideas by showing they're possible, and maybe inspire others along the way. I'll also be listening to others who have been working on these spaces for a while - while I'm OK at building technology, it's been a decade since I moderated and administered a large public space!

And hey, if it does take off, so much the better. Well, as long as I find some fellow maintainers earlier on this time.