Skip to content

Instantly share code, notes, and snippets.

View glennblock's full-sized avatar

Glenn Block glennblock

View GitHub Profile
@jdarcy
jdarcy / activitypub.md
Created November 9, 2022 16:10
Some thoughts about ActivityPub

I've commented a few times about some issues I see with the scalability of ActivityPub - the protocol behind the Fediverse and its best-known implementation Mastodon. A couple of folks have asked for more elaboration, so ... here it is.

First, let me add some disclaimers and warnings. I haven't devoted a lot of time to looking at ActivityPub, so there might be some things I've misunderstood about it. On the other hand, I've brought bigger systems - similar node counts and orders of magnitude more activity per node - from broken to working well based on less study of the protocols involved. So if you want to correct particular misconceptions, that's great. Thank you in advance. If you want to turn this into an appeal to authority and say that I'm wrong only because I haven't developed a full ActivityPub implementation or worked on it for X years ... GTFO.

What

What is ActivityPub? It's an HTTP- and JSON-based protocol for exchanging information about "activities". An activity could be many things.

var mult1 =
from m in Enumerable.Range(1, 999)
where m % 3 == 0 || m % 5 == 0
select m;
Console.WriteLine(mult1.Sum());
Console.WriteLine((from m in Enumerable.Range(1, 999) where m % 3 == 0 || m % 5 == 0 select m).Sum());
var mult2 = Enumerable.Range(1, 999)
.Where(m => m % 3 == 0 || m % 5 == 0)