Mailing a letter ‘round the world, for most of human history, was impossible. By 1860, it was decidedly possible, yet an exercise in tabulation. Deciding to route it (from New York to Florence, say) via Prussia (for 40 cents—$15.57 in today’s dollars—for up to half an ounce) or France (for 21 cents per quarter ounce), send it by steamer or slower ship, train or carriage, then calculating and affixing enough postage, and logging every step of the months-long journey. Better hope the destination post office could decipher the address and that a war didn’t break out before it arrived.
Then came the Universal Postal Union, founded 71 years before the UN, abstracting out the details enough that a world of disparate mail systems feels like a singular Postal Service with worldwide coverage. Their codified handoffs ensure that, with a country name and postal code plus 6-10 business days and a $1.70 stamp, your mail will get through.
So when it came time to build electronic mail, we did so as a standardized decentralized system, UPU style, with usernames and hostnames. An email address and common email language gets your email through.
Then we invented social networks, and threw interoperability out the window in the name of profitability. It took 5,101 days from Facebook’s launch to start rectifying the situation, with ActivityPub.
...“a protocol for building decentralized social networking applications,” described co-author Christine Lemmer-Webber when the protocol launched as a W3C standard in 2018.
It, in a single standard, is for social networking what SMTP and IMAP are for email. ActivityPub includes both a server-to-server protocol so social networks can send messages and likes and follows and more between each other, and a client-to-server protocol so anyone can build a social networking app or integration for any ActivityPub network (like the diversity of apps that sprang up around the nascent Twitter).
“To decentralize social networking is to completely separate the user interface from the underlying data,” is how David Pierce described decentralized social networking on The Verge. “The dream,” as co-author Amy Guy described it, “is as many options for your posting apps as there are for todo list apps, or, I dunno, raincoats.”
And yet, every now and then, that 15th attempt works (via the ever-applicable XKCD).
Evan Prodromou, one of ActivityPub’s co-editors, started working on open social networking protocols back with StatusNet around six months after Twitter launched in 2007. Soon came a plethora of protocols, each name more inscrutable than the last: OpenMicroBlogging, PubSubHubbub, Activity Streams, WebFinger, OStatus, ActivityPump. “It was just a bunch of engineers throwing things together,” Evan reminisced years later.
It worked, at first. Facebook and WordPress supported ActivityStreams. And Google Buzz—the search giant’s ill-fated social networking venture—launched with demos of interoperability between Buzz and StatusNet. But when Google shuttered their network, partly from lack of tracking, partly in the wake of privacy lawsuits, the early dream faded.
Faded, but wouldn’t die. After successive rounds of competing standards gaining and then losing popularity, it fell to an ad-hoc team at W3C to pull the best of everything together and build the social networking protocol that could rival email for interoperability.
“We had a lot of libre social networks but they were largely fractured and failed at interoperability... surely we could do better if we got everyone in a room together!” Christine Lemmer-Webber recalled, after spending 3 years nurturing ActivityPub to life. “Sometimes you know where you want to go but not how to get there.”
For Lemmer-Webber the impetus was building MediaGoblin as a self-hosted photo-sharing site like Flickr. So rather than reinvent the wheel, the team built on the stuff that came before, with ActivityStreams content in JSON format, designed around the way modern social networks work, with just enough features to power an Instagram or Twitter-style short message network, backed by the authority of the W3C.
Today, every Mastodon server communicates with ActivityPub. Meta’s Threads supports the protocol. Blogging platforms WordPress and Ghost and forum platform Discourse are all on board. 121 of the 124 projects on the Fediverse.party directory support ActivityPub (versus the 10 that support OStatus). It seems the engineers throwing stuff together finally found something that’d stick.
ActivityPub, at its most basic, is a wrapper around Activity Streams. Activity Streams, in turn, is standardized JSON for social media posts. Jack Dorsey’s original Tweet would look like this, in Activity Streams format:
Imagine similar JSON for likes, replies, and user profiles and you’ve got a basic concept of Activity Streams. It’s RSS for social networking, if you squint.
Then, add in some vocabulary to make sense of things. A User is an “actor,” a standard post is a “note,” and the “fediverse” is the collective social networks that can all communicate to each other with the shared ActivityPub language (or, technically, any social language—but ActivityPub is the one most have settled on).
Then, the wrapper. ActivityPub adds an inbox and outbox for Activity Streams, email-style, along with a bunch of GET and POST calls to push the messages around, and standardized @user@server.domain addresses to figure out who actors are and where they post their status updates. And each app can figure out how it wants to show posts in their network, making everything in the fediverse the same, but different.
You can fetch any recent ActivityPub post from Terminal
So imagine you want to follow someone on another ActivityPub server. You’ll first search for @theirname@their.server in your network. Your network will fetch their profile, pulling in their name and other account details, and give you an option to follow. If you do so, your server will tell that person’s outbox to send you every new message they post.
The next time they post a status update, it’ll land in their outbox, and their server will dutifully send it to each of their follower’s inboxes. And if you reply, your app will put the reply in your outbox and push it to the person you mentioned’s inbox. And on and on, keeping the posts, replies, and likes flowing back and forth.
All of that’s open; you can pull up any Mastodon user’s most recent posts in Terminal with the following script, swapping in their name and server for our Buttondown account shown below:
curl -s -H "Accept: application/activity+json" \
"https://mastodon.social/users/buttondown/outbox?page=true" \
| jq '.orderedItems[0].object | {published, content}'
Drill down deep enough, and the entire internet seems to be held together by JSON and CRON jobs.
Threads posts show up on Mastodon, via ActivityPub, but their spoiler tags do not.
ActivityPub works. Mastodon’s proof of that; every Mastodon server uses it to communicate. Meta launching Threads with the promise of ActivityPub support, and WordPress.com adding support the same year, made 2023 the year of the fediverse more than we’ve ever had a year of Linux on the desktop.
And yet, there are still cracks. Speed, for one. It’s resource-intensive to receive every message every account posts, then filter them into each person’s feed. If one person follows one other on another server, parsing each post into a feed alongside local posts isn’t that hard a job. But at scale, it’s a massive challenge. “ActivityPub in its basic form creates an all-to-all communication pattern. Anyone who has worked in distributed systems knows that's going to be an exponentially more painful problem as the system grows” worried Jeff Darcy in 2022.
Mastodon’s survived—thrived, even, in the interim—yet the problem’s still there. A Threads post took around 8 minutes to show up in my Mastodon.social account, recently, and while that’s not the end of the world and could be either service’s fault, there’s a weightiness and slowness to fediverse interactions.
Email, perhaps, would suffer similar problems if we each ran our own email servers. We’re spoiled by push email and near-instant delivery partly because most of us use email powered by software giants like Google and Microsoft. It’s not hard to imagine the open social network protocols being used on the backend, but by larger corporations that can afford the server capacity to support the weight of a billion posts.
Standardization, then, is the other challenge—one that email’s faced as well, with its plodding, RFC-driven change that standardized subjects, attachments, and signatures but left email stuck for the most part with HTML 4.01 (launched in 1999) and CSS 2 (launched a year earlier). “What if Meta builds good features that don’t translate to ActivityPub?,” wonders former Twitter developer Joe Fabisevich—and already, such edge cases have cropped up.
“On Threads,” Fabisevich explains, “you can control who replies to you, but since it's not a part of the ActivityPub spec that feature isn't available to Mastodon users. This isn't nefarious, it's perfectly reasonable.” Reasonable, but frustrating all the same.
ActivityPub, today, doesn’t support truly private messaging; the best a network can do is create a post to a specific user with an email-style to: field in the JSON, meaning a server operator could still see any “private” message that comes through. And it doesn’t, say, support Threads’ new Spoiler tag; what appears to be blurred-out text on Threads (until you tap it) shows bright and clear when federated to Mastodon.
Just like email, each client could add its own features (as Gmail added tags, then mapped them to IMAP’s folders). But short of getting them standardized into a future version of ActivityPub, they won’t spread across the network.
We’ve got a system to follow folks and share status across networks, one with wide and growing adoption. That’s a start. Even that’s enough to do quite a bit. Buttondown doesn’t support ActivityPub just yet, but we do support sharing your newsletters via Mastodon, and from there to the broader fediverse via Mastodown-powered ActivityPub. It’s a start.
What’s next for ActivityPub, though, will require working through the growing pains. That, and email-style wide adoption, where it becomes something so widely used that software giants wouldn’t think of neglecting the standard.
Buttondown on Mastodon, the ActivityPub-powered network
“RSS won the battle, but lost the war,” commented @factorialboy about how RSS beat Microsoft’s ICE protocol. RSS won the battle for the most popular protocol to syndicate content, but lost the war for the most popular way for people to subscribe to sites. Following news and blogs on social networks, in many ways, became a centralized take on what RSS allowed.
And a similar comment about ActivityPub rings true as well. “ActivityPub isn't the future,” wrote @mfer. “Useful things that are built, brought to market, and meet user needs that may happen to use ActivityPub under the hood are the future.”
If Threads maintains its popularity and Meta continues to support ActivityPub in it, if Mastodon continues to be the most popular self-hostable social network, if Ghost and WordPress and other blogs make ActivityPub the new cool way to subscribe to blog posts instead of email newsletters, then ActivityPub has a bright future indeed. Just as your favorite news app very likely uses RSS in the backend without your knowledge, and their social media posts for new articles are likely automated from an RSS feed, if ActivityPub wins, it’ll win as tech plumbing, invisible and behind-the-scenes to the vast majority of us.
At its best, it would mean it’d start feeling natural to follow and mention folks from one social network on another, that you’d tell people to follow you on name@network without wondering if they’re on the same network, that new social networking apps would support ActivityPub by default, that people would keep showing up and making use of the ActivityPub features developers build out. And that, for social network interoperability, would be a massive win.
After all, as Lemmer-Webber said, “revolutions are run by those who show up, I suppose.”
Image Credits: Header photo by Victor Clime via Unsplash