Skip to content

Instantly share code, notes, and snippets.

@codl
Last active April 12, 2017 18:47
Show Gist options
  • Select an option

  • Save codl/71f05eedca2bdc6e797a65c11c664e18 to your computer and use it in GitHub Desktop.

Select an option

Save codl/71f05eedca2bdc6e797a65c11c664e18 to your computer and use it in GitHub Desktop.

Federation 101, or Why The Federated Timeline Isn't The Same Everywhere

You've probably noticed that the fediverse is made up of hundreds of loosely connected instances. These instances don't share every single message to every other instance, that would be unsustainable and each one would end up with a copy of the whole network. (bitcoin joke here) Each instance only needs to know about some users, and some posts.

Let's set up a scenario, you run an instance A, with a user: u1. There are other instances and users, we'll think about them soon. So, which messages does your instance know about?

  • First, messages from your users, unsurprisingly, are known to your instance
  • Second, if a user, say u1@A, follows someone on another server, say u2@B, A will ask B to notify it whenever u2 posts. Any posts from u2 from that point forward will be known to A. Note how this isn't retroactive, your server won't go and download their old posts!
  • Third, if a remote user, say u3@C mentions one of your users: "@u1@A hey u1, isn't it weird how all of our handles are just u and a number" then C will push that message to A. This is why you can talk to anyone on the fediverse and your messages don't just get stuck on your server
  • Fourth, let's take u1@A, u2@B and u3@C. u1 follows u2, and u2 follows u3. If u3 posts, we've already established that their post will be sent to B so u2@B can see it, and it won't be sent to A, because no-one there cares to see it. If u2 boosts the post however, then it will be sent to whoever follows u2, so it will be sent to A so u1 can see it.
  • And finally, fifth, you can force a server to fetch a remote post by pasting its URL into the search bar. Useful if you want to fav or boost it but it's not on any of your timelines.

Messages will not travel between instances under any other circumstances.

So, what does this mean?

Well, the federated timeline is composed of every post that your server knows of, that is also public, so to show up on the federated tl a public post needs to hit one of the five conditions above. It will mostly be posts or boosts by people who your users follow, and the occasional mention from someone else, kind of like a combination of every one of your users' home timelines, but filtered to only show public posts. Your users not only write your local tl but, by following people they find interesting, they curate your federated tl!

This also means remote profiles can sometimes look like barren wastelands, simply because few or none of their posts ever were propagated to your instance. You can usually click on a user's profile pic to go to their public profile on their instance to get a better idea.

This is too long

@codl

codl commented Apr 12, 2017

Copy link
Copy Markdown
Author

why did github turn u3@C into a mailto link but none of the others

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment