Data storage questions

Thanks! This is really helpful.

Does masto have a users table that stores federated users (from other instances). If so, how does it populate these? When it receives, lets say a Create Note from an actor, does it then check its local DB to see if that actor exists in its own user table, and then populate it?

I’m having trouble with this part. Don’t I need to bring this data into my local data model, so that it can be queried and presented to my users?

Otherwise, I’d have to fetch the data on demand. This could mean my server having to do dozens of on-demand http fetches to get content.

And lets say its not even content that’s been posted to my users inboxes, its just their public feed. Does this mean it has to be fetched on demand?

I wish this documented a little better. Seems like every single follow activity would have to check for other users on that same inbox… and I have no idea where the sharedInbox fits in with followers collection.

Outside of the sharedInbox though, is the flow:

  1. A user on instance 1 creates a note, it gets posted to the inbox of all their followers.
  2. A following user on instance 2 receives an inbox post, and brings that data into their local data model for querying.