E.g. If I were to share an image of a doggo on lemmy.world and then people from sh.itjust.works upvote it, will it count those upvotes? The answer to this one seems pretty easy to reason that it would be yes.

But what about if i’m on lemmy.world and am subscribed to !awesomecommunity@sh.itjustworks and I see it in my “subscribed” feed? Does this reflect total points across the lemmiverse or will this just show upvotes from lemmy.world?

  • Yote.zip
    link
    fedilink
    arrow-up
    83
    ·
    1 year ago

    In theory upvotes are counted from every server. In practice, there’s been some small synchronization issues in the past where servers fail to send upvotes sometimes. It should be better now.

  • Limeey@lemmy.world
    link
    fedilink
    arrow-up
    29
    ·
    1 year ago

    Due to how federation works, the federated instance needs to accept and process the activity. Each application can define its own “optional” activity properties, but the activitypub specs define mandatory properties and some optional properties for coherence across the fediverse.

    The way lemmy implements this is to use the activitypub-federation-rust library that the lemmy devs built. Through this, activities in Lemmy are sent using HTTP and have a failure retry:

    It is possible that delivery fails because the target instance is temporarily unreachable. In this case the task is scheduled for retry after a certain waiting time. For each task delivery is retried up to 3 times after the initial attempt. The retry intervals are as follows:

    one minute, in case of service restart
    one hour, in case of instance maintenance
    2.5 days, in case of major incident with rebuild from backup

    In the case of votes, the activity is a “like” - some other federated applications understand this and will accept it, but others won’t. For example, peertube does not have a like activity, and I don’t believe they would handle it.

    However votes are shared across instances. When a user “likes” something from another instance, Lemmy will notify that actor (the page) that the activity (a like) was emitted by another actor (you).

    Hope that clarifies things. I’m still learning all this myself so if anyone can contribute or improve my answer, please do!

    • cerevant@lemmy.world
      link
      fedilink
      arrow-up
      9
      ·
      1 year ago

      I think an important take-away from this is that Lemmy pushes changes between instances, it does not synchronize. Instances get out of sync when changes get lost (as you describe) and I don’t think there is a mechanism for the destination to know it it out of sync with its peers.

  • eating3645@lemmy.world
    link
    fedilink
    arrow-up
    14
    ·
    1 year ago

    I don’t actually know how it works so I’ll just assert my understanding and if I’m wrong hopefully someone knowledgeable shows up and teaches us both something.

    From what I understand, in your described setup, only sh.itjustworks keeps track of the votes on “awesomecommunity”. Other instances, e.g. lemmy.world, get the count from the community’s home server. Other instances send their votes and comments to the home server, which is responsible for keeping track of everything.

    I’m confident at least 20% of that is accurate, give or take 25%.

    • r00ty@kbin.life
      link
      fedilink
      arrow-up
      7
      ·
      1 year ago

      It’s pretty much this. So the instance the group is on, is the controller of the group. Posts from that instance or others are sent there and that instance distributes the posts and comments to other instances with users subscribed.

      Likes work just the same, you click a like, your instance sends that like to the controller instance and that then sends those likes out to subscribed instances.

      It doesn’t always happen in real time though.

  • Th4tGuyII@kbin.social
    link
    fedilink
    arrow-up
    4
    ·
    1 year ago

    All instances in the Fediverse work based upon the “ActivityPub” protocol. This is true for all Lemmy instances, all Kbin instances, Beehaw, and even Mastodon. If it’s in the Fediverse, it’s runs on ActivityPub under the hood.

    As such, any “activity” that any user from any instance does (I.e. likes/upvotes, dislikes/downvotes, boosts, etc.) Will sync with all other instances provided they are federated, syncing properly, and support the activity in question (not all instances support all activities or process them the same way).

    Ergo, in theory, the likes you see on a post will be from all instances that support likes, likewise for dislikes.

  • Xanthrax@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    1 year ago

    They’re always counted in fedirated servers, but the server chooses if their shown. They can also defedirate and reduce outside intervention, like beehaw, but now they’re isolated.

    All that being said, if the user account you’re using is stored on a popular server, you may just be struggling with the recent stress of the reddit moving to centralized, general servers (which lemmy is not built for).

  • Teppic@kbin.social
    link
    fedilink
    arrow-up
    2
    ·
    1 year ago

    Yes upvotes are federated. Kbin factors in boosts too, these are also federated within and outside kbin - but not really used on Lemmy. Downvotes, a bit less clear - I think they are federated within/between Lemmy(?) but not with or between kbin instances.