activitypub icon indicating copy to clipboard operation
activitypub copied to clipboard

Multiple inbox feeds with different sorting and filtering algorithms

Open evanp opened this issue 10 months ago • 5 comments

The use case is the ability to browse a home timeline with different, user-selected algorithms for sorting and filtering the activities there.

With the ActivityPub API, we have essentially one inbox feed (but see cardinality of properties). It's required to be in reverse chronological order by the AP spec.

I think it's reasonable for ActivityPub API clients to do sorting and filtering of that inbox feed. (Some siloed social networking platforms explicitly disallow this in their developer terms of use, for various reasons, but I don't know of one of those platforms that implements the ActivityPub API.) So, the client fetches the activities in reverse chronological order from the server, and then re-orders or filters them according to the user-defined algorithm.

Performance-wise, this is not a great solution. It would probably require a lot of pre-fetching happening in the background.

I think it would be out of scope to define how those clients would present the different sorting/filtering options to a user.

We don't have an easy way for an ActivityPub API server to provide multiple inbox-like feeds with different algorithms. We have the streams property, but it's really loosely defined, and it's not just restricted to Collection objects that represent something like an inbox or home timeline.

I see a few ways to implement multiple server-side "home feed" collections:

  • Use the inbox property with multiple values. This would probably break a lot of Fediverse software, which expects this property to be a single value, and usually a single URL.
  • Define a way to add multiple inboxes to the streams property, and maybe have a way to signify that they are essentially the inbox sorted or filtered in some way.
  • Define a new ActivityPub extension property to provide a list of available inboxes, like, I dunno, availableInboxes.

evanp avatar Jan 20 '25 04:01 evanp

This was initiated by Bob Wyman on the public-swicg mailing list.

evanp avatar Jan 24 '25 17:01 evanp

In terms of work to be done, I think there are a few items to discuss.

  • Adding a primer page on the topic. There doesn't seem to be one on the topic right now.
  • Add a FEP.

evanp avatar Jan 24 '25 17:01 evanp

This issue has been labelled as potentially needing a FEP, and contributors are welcome to submit a FEP on the topic. Note that issues may be closed without the FEP being created; that does not mean that the FEP is no longer needed.

github-actions[bot] avatar Jan 24 '25 17:01 github-actions[bot]

It's worth noting that in the linked data world, the go-to solution recommended for filtering and sorting datasets is to implement a SPARQL endpoint, however, I do believe we'd be well served by having some basic "views" or similar existing within ActivityPub.

These two FEPs may be relevant:

  • https://codeberg.org/fediverse/fep/src/branch/main/fep/1985/fep-1985.md
  • https://codeberg.org/fediverse/fep/src/branch/main/fep/5bf0/fep-5bf0.md

ThisIsMissEm avatar Jan 24 '25 17:01 ThisIsMissEm

This is, to my understanding, the intention of the streams property. I think it would be reasonably straightforward to give each streams ordered collection a name and display it in the user's clinet UI

nightpool avatar Jan 26 '25 08:01 nightpool