There is already a total count of up- and downvotes, but please never add karma to Lemmy. We don’t want to deal with karma farmers and minimal karma requirements to post. I don’t care about the moderation issues because karma brought more harm than good. Please never add that bloody dreadful thing to Lemmy. I already saw a bunch of people supporting adding karma to Lemmy, which will turn Lemmy into a cheap Reddit clone and karma-farming hell. Please, never add karma to Lemmy. I beg you. No more karma hell.
Well the way it works is I can see the total score of everything my instance knows about. But I only get content created after someone on my instance subscribes to some community - I only get older content if someone interacts with it.
So my instance is about a month old. The Karma score I can see for users of other instances will be the total of everything they’ve done after about a month ago on communities that at least one person on my instance subscribes to. Possibly some older content that someone happens to have voted or replied to as well in the past month.
But for my own users I should see the full, true karma.
So your instance tracks karma for users on other instances by adding it up one visible post at a time, instead of querying their instances for the total directly?
Does it keep a permanent database with running totals for every user on every federated instance?
Yes essentially. The way federation works is when a user subscribed to a community, the community looks at the server the user is on. If it’s one that it hasn’t seen before it adds the server to it’s federation list.
Every interaction on on each instance is sent to the host instance, who then tells everyone on its federation list. The receiving instance basically only ever listens for updates, it rarely/never ASKS for updates. And karma totals aren’t something sent as part of these messages. So when someone votes on something it just increments the karma count at the same time.
Lemmy is built on a generic protocol not really designed to be a Reddit-alike, so some things are workarounds