Actually, I take that back

Actually, I take that back

What to do when you wish you could undo

Happy Sunday! While you're enjoying a well-earned weekend, you might as well kick back and enjoy some more delightful tales of decentralized decadence from your favorite neighborhood pugs.

Last week, we delivered substantial performance improvements for ActivityPub in Ghost thanks to our long but necessary campaign to architect a solid database for all our Fediverse work. This week, we shipped a new feature! Dreams do come true.

What's new with ActivityPub?

Up until now it has been possible to publish new content into the Fediverse with Ghost, but.. um... it was sort of permanent. If you made a typo or just changed your mind about something, there was no way to delete.

This week, we fixed that! You can now delete posts via ActivityPub.

On the face of it, deleting a post sounds like a pretty unremarkable feature. If you can create a post, it follows that it should be straightforward to delete it – but distributed systems make things a little more interesting than centralized ones.

In a regular application when you create something (most of the time) you're just adding a row to a database. When you delete it, you delete that row from the database. There's really not much to talk about.

0:00
/0:13

In a decentralized network, though, the question is: Which database?

When you publish a post via ActivityPub it doesn't just get stored in 1 database, it gets sent out to every follower you have, and the server of every single one of your followers stores that post in their database, too. If you want to delete a post, it has to be deleted in all those different places, too — and that doesn't just happen automatically.

This is a relatively novel concept which hasn't been a significant feature of past decentralized protocols. If you send an email to 10,000 people, you can delete it from your email app's sent messages folder, but you can't delete it from anyone else's inbox. It's just... out there.

In ActivityPub, though, it is possible. When you publish a post, you send out a create activity that instructs the servers of all the people who follow you to create a new post. Then, if you change your mind, you can also send out a delete activity which instructs all those same servers to delete a particular post. That's outbound delete activity.

You also need to be able to handle an inbound delete activity, when someone else on another server sends a delete that they'd like you to process, to remove something you previously received from them.

As of this week, Ghost can now handle both inbound and outbound deletes, so that they work properly across the whole Fediverse.

0:00
/0:45

Once you wrap your head around the core idea that everything in ActivityPub is an activity which you send and receive, you begin to see how it's quite an elegant system for achieving a diverse set of functionality distributed across different applications.

It's a different way of thinking about building software. It makes things a little more complex than they might be in an isolated system, but it's quite remarkable when you consider the scale of a functional decentralized network comprised of thousands of different pieces of software and millions of users, 99% of whom have never met, spoken, coordinated or interacted with one another.

Just thinking about it makes my paws tingle.

Anyway, that's all for this week. Next week, if all goes well, we'll have a larger update about the public beta.