Skip to content
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

fedi wiki

  1. Home
  2. Technical Discussion
  3. Edge case when backfilling topics

Edge case when backfilling topics

Scheduled Pinned Locked Moved Technical Discussion
4 Posts 3 Posters 10 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • julian@activitypub.spaceJ This user is from outside of this forum
    julian@activitypub.spaceJ This user is from outside of this forum
    julian@activitypub.space
    wrote last edited by
    #1

    When it comes to backfilling topics, NodeBB utilises what is called "context collection backfill" instead of reply-chain traversal. In a nutshell, instead of crawling up and down the reply tree one-by-one — kind of like what Mastodon does currently — it checks for a canonical source-of-truth in the context property.

    NodeBB supports both strategies, since not all objects contain context.

    I found a fun little edge case where if I start a topic, a reply is received, and that reply points to my instance, it won't catch any replies made in between.

    In other words:

    localA starts topic → remoteB replies → remoteC replies to B only → remoteB replies to C and A
    

    In this scenario, because my instance A is left out of the third activity, I don't know about it. When the fourth activity appears, the context is checked, C's reply isn't in it, and I proceed without knowing about it. Oops!

    In this case, when incoming replies reference a context that is same-origin to your own instance, you should not use context collection backfill, because:

    1. You already have the entire context, so it's unnecessarily duplication of work
    2. You won't catch any replies made out-of-band unless you do reply-tree traversal

    Tagging @silverpill@mitra.social because this is related to FEP f228.

    1 Reply Last reply
    1
    • E This user is from outside of this forum
      E This user is from outside of this forum
      evan@activitypub.space
      wrote last edited by
      #2

      I see two reasons this could happen:

      1. C's server or client software doesn't know how to include the context
      2. C intentionally wanted to remove their reply to B from the context. It's a semi-private aside.

      I think you'd want to backfill in case 1 but not in case 2. But I don't think there's an easy way to tell which is which.

      1 Reply Last reply
      0
      • silverpill@mitra.socialS This user is from outside of this forum
        silverpill@mitra.socialS This user is from outside of this forum
        silverpill@mitra.social
        wrote last edited by
        #3

        When the fourth activity appears, the context is checked, C's reply isn't in it, and I proceed without knowing about it. Oops!

        I don't understand this part. Is C's reply being dropped?

        I think if you encounter an object where inReplyTo is not known to you, that unknown object should be fetched, regardless of context.

        this is related to FEP f228.

        FEP-f228 specifies a backfill algorithm that works from top-level post down the thread. But it would be nice to provide an algorithm that works for any post in a thread. I'll think about it.

        julian@activitypub.spaceJ 1 Reply Last reply
        0
        • silverpill@mitra.socialS silverpill@mitra.social

          When the fourth activity appears, the context is checked, C's reply isn't in it, and I proceed without knowing about it. Oops!

          I don't understand this part. Is C's reply being dropped?

          I think if you encounter an object where inReplyTo is not known to you, that unknown object should be fetched, regardless of context.

          this is related to FEP f228.

          FEP-f228 specifies a backfill algorithm that works from top-level post down the thread. But it would be nice to provide an algorithm that works for any post in a thread. I'll think about it.

          julian@activitypub.spaceJ This user is from outside of this forum
          julian@activitypub.spaceJ This user is from outside of this forum
          julian@activitypub.space
          wrote last edited by
          #4

          C's reply didn't get dropped, it simply didn't include A, the original server. The last reply did, but because the context was A, it never contained it, so it never pulled it. inReplyTo isn't checked when utilising context-backfill because it is supposed to replace having to do that.

          Except not in this edge case 🙂

          1 Reply Last reply
          0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          Powered by NodeBB Contributors
          • First post
            Last post