I’m a newbie to ActivityPub so please be patient with me.

All intros into ActivityPub speak about how a user of a server A subscribes to a specific community from server B, and then server A will be informed about changes in that community.

But on lemmy it’s possible to look at the posts of all communities. For a single concrete community it would be relatively easy: server A gets the request to serve the top post of a community on server B, so A simple asks B for the posts.

But there is also the “posts from all communities” tab on the lemmy front page. This opens questions:

Does each lemmy instance has a full copy of all posts of all communities? If this is true: How are new Instances discovered? Is each Instance distributing all updates to all other Instances?

If each lemmy instance has only a partial dataset (this theory is backed by [1] “Only if a least one user on your instance subscribes to the remote community, will the community send updates to your instance.”) then how is the “all posts” view composed? is it in reality not “all” but only “all posts that at least one user of this instance is subscribed to”?

If this is the case: what happens if a bad actor subscribes to all communities of all servers? Is there a maximum number of subscriptions per user?

The source of those questions is, that I’m looking for a way to subscribe to all events of all lemmy instances, to be able to build statistics about upvotes, new posts, comments etc. There seems to be a similar API endpoint for mastadon [2] but nothing for lemmy?!

  • ericjmorey@programming.dev
    link
    fedilink
    arrow-up
    4
    ·
    edit-2
    1 hour ago

    If each lemmy instance has only a partial dataset

    You can stop saying if. It is nearly certain that any instance only has a partial dataset in the same way that a search engine only indexes a partial dataset of every web page.

    If this is the case: what happens if a bad actor subscribes to all communities of all servers?

    There are bots that were built to do exactly that. I wouldn’t call them bad actors unless the instance owner prohibited such actions.

    • 7EP6vuIOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      23 minutes ago

      so the instances only save the metadata/title of federated posts, but when a user wants to see the comments or content, then the other instances are queried for more details?

      what are the bots good for?