Building ActivityPub: Day 1

Building ActivityPub: Day 1

Hello and welcome back to a weekly existential crisis about desperately trying to live up to promised potential. Just kidding! This is a newsletter about ActivityPub.

Firstly, thanks for all your comments on last week's newsletter — we did not expect to get so many, and it's amazing to hear your feedback and excitement. It's also, as an aside, great continued motivation to improve Ghost's commenting feature; but that's the subject of another newsletter.

What's new with ActivityPub?

Our initial work has largely revolved around a combination of laying technical foundations, reading the ActivityPub spec, trying to implement the smallest possible thing, and spending a disproportionate amount of time asking deep, profound engineering questions such as "why in the literal fuck isn't this working?"

Having overcome initial hurdles of a basic inbox and outbox with bubblegum and sticky tape (shoving everything into memory), we set about working on our very first use-case. Can we get one Ghost publication to follow another Ghost publication?

The upside of focusing on a basic Ghost<>Ghost connection to start is that we control both sides of the table, so we know exactly how both actors are behaving and can more easily predict what's going on.

The downside is that you end up having to wrestle a local development environment into running a decentralised networking protocol that really wasn't designed to run offline.

If you've ever built a web app that relied heavily on email and used a tool like Mailhog to make local development easier — it's exactly like that, except without any tool like Mailhog to make local development easier.

Regardless, we made some half-decent progress.

You can now enter a site to follow...

then see their new posts show up in your inbox...

and click on one of those posts to expand it and read the content:

The eagle-eyed readers among you will note ngrok URLs depicting our sordid workarounds for aforementioned tales of local development woe.

Now, if you're thinking "damn, they're going quick! this is great progress!" — I cannot stress enough how much this is an illusion. It's a good illusion, because we're lonely and hungry for more of your comments on this week's newsletter, but an illusion nonetheless.

You can think of this like the shell of a car, with no engine and also no seats.

From the outside it looks like a vehicular transportation device. When you push it forward (hard) it sort of rolls on wheels, and look(!) it's painted purple — but we're a very long way from hopping in and taking a road trip to New York.

How long? Despite software engineers having a generally spotless reputation for accurate time estimates, in this case it's somewhat difficult to predict. For now, think of it as "more than a month, but less than a year, probably".

Currently, a single restart of the app wipes the inbox totally clean each time. So for our next trick innovation — we will create persistent memory via a stunning new piece of technology called a database.

All this and more, still to come.

Thanks for following along! As you can tell by the emotionally unstable nature of this newsletter — we need all the support we can get.