Skip Navigation

Understanding ActivityPub and Federation

Understanding ActivityPub and Federation

I have tried to understand how Federation works but I'm getting a feeling that there's some rather large gaps here. My first attempt was to find an API implementation in python, 3 wasted hours of my life later and I'm making requests.request() calls like it's 2007. And I still can't access the content as presented on the webinterfaces. There doesn't seem to be a way to access eg the communities tab via activitypub? Any Help?

@programming

15

You're viewing a single thread.

15 comments
  • I'm not an expert, but based on my understanding the Communities tab (as well as things like your user profile) are special to Lemmy, and stored on a given Lemmy instance. ActivityPub basically provides a shared language for how various services/clients can ask for and send each other data (posts, comments etc) in a totally agnostic format. Lemmy renders this data as posts and comments, but Mastodon renders them as toots and so forth. And that's an oversimplification, because there's no guarantee that two pieces of software (Lemmy and Mastodon in this example) will operate with the same ActivityPub types, so the way content is displayed is inconsistent or possibly entirely incompatible. If you want to create a generic Fediverse reader, you would need to keep an up-to-date representation of every type that every common ActivityPub software uses for its content, which could work but I imagine would be quite tedious and prone to breaking. That being said, I was imagining something like this existing myself, and I suspect over time as different types become common "building blocks" for different types of social networks this will be more solidified and straightforward.

    To your mention of content not being accessible from everywhere, it sounds like maybe you're expecting a centralized directory of information, but that's the big difference with true decentralization/federation. No single Lemmy instance know of every other Lemmy instance, they only know the ones they've talked to. All of the data is accessible if I know the hostname of a Lemmy instance, I just need to know the hostname first, and unless we build a centralized repository of every instance, we will never know of every single one. In the meantime, larger Lemmy instances have a large enough list of federated servers to get you most of the way there in terms of a directory, so maybe that's a reasonable stopgap.

15 comments