Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backfilling threads #5283

Open
5 tasks done
silverpill opened this issue Dec 23, 2024 · 4 comments
Open
5 tasks done

Backfilling threads #5283

silverpill opened this issue Dec 23, 2024 · 4 comments
Labels
area: federation support federation via activitypub enhancement New feature or request

Comments

@silverpill
Copy link

Requirements

  • Is this a feature request? For questions or discussions use https://lemmy.ml/c/lemmy_support
  • Did you check to see if this issue already exists?
  • Is this only a feature request? Do not put multiple feature requests in one issue.
  • Is this a backend issue? Use the lemmy-ui repo for UI / frontend issues.
  • Do you agree to follow the rules in our Code of Conduct?

Is your proposal related to a problem?

It is not possible to backfill a thread after discovering a Page object (e.g. when fetching it by id).

Describe the solution you'd like.

Publish a collection containing all activities related to a thread: Create(Page), Create(Note), Like, Dislike and others. This collection of activities can be attached to a Page object using a property such as threadContext.

Describe alternatives you've considered.

Publish a collection containing all comments, which can be attached to a Page object using a different property (e.g. thread). This is probably easier to implement, but then it won't be possible to backfill upvotes / downvotes.

Additional context

Streams and Hubzilla already provide collections of conversation activities, although their implementation is slightly different from what I propose here (see FEP-171b).

#3448 is a similar issue but it seems to be focused on backfilling community content, which can be achieved by pulling from community outbox.

@silverpill silverpill added the enhancement New feature or request label Dec 23, 2024
@Nutomic Nutomic added the area: federation support federation via activitypub label Jan 3, 2025
@Nutomic
Copy link
Member

Nutomic commented Jan 3, 2025

Ive been talking with @julianlam about the same topic. His idea is an implementation based on FEP 7888, similar to the one provided by NodeBB. To make it simple:

  • Each post has a context field which points to a collection of Note IDs (not activities)
  • Comments also include the same context url as the parent post

A collection of activities is not really possible because Lemmy doesnt store that information. For example for a vote, only the username, post id and date are stored, but not the activity id or full activity json (it would be too much data).

Initially Lemmy would only provide this data to other platforms, but not use it to do any backfilling on its own. Doing that would be much more complicated as it would have to be done in background threads, and ensure not to overload the server. Maybe it should even be handled by external tools via API.

@julianlam
Copy link

julianlam commented Jan 3, 2025

A collection of activities is not really possible because Lemmy doesnt store that information.

This is an important distinction for some implementors. NodeBB also doesn't store full activity JSON. If we were to implement it, it would be a regeneration of an activity based on locally available data. That would be ok for an actor outbox, but not in situations like these where we'd need to also represent remote activities.

@silverpill
Copy link
Author

@Nutomic

A collection of activities is not really possible because Lemmy doesnt store that information. For example for a vote, only the username, post id and date are stored, but not the activity id or full activity json (it would be too much data).

Activity ID would be enough (activities don't need to be embedded in the collection).

Each post has a context field which points to a collection of Note IDs (not activities)

That's fine, and will complement collection of activities, if you decide to provide it. I'm slightly in favor of the name thread because it is more specific but context is okay too.

@Nutomic
Copy link
Member

Nutomic commented Jan 8, 2025

We also dont store the IDs of activities associated with particular actions, so thats not possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: federation support federation via activitypub enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants