Skip to content

Subjective comment threading

thedod edited this page Nov 29, 2014 · 10 revisions

The problem

At mainstream silos, the system has record of everything said. There may be things a specific user isn't allowed to view (e.g. "private" messages between others), but the system knows everything and has no problem displaying full conversation threads. If it only shows a partial one — it's out of choice (e.g. according to "privacy" settings of authors) and not necessity.

It's different at IndieWebcamp site, where conversations span several sites by definition.

Consider this thread (for simplicity, assume all authors own IndieWebCamp sites and no silos are involved):

  1. Alice: I've got a dog without a nose

    a. Bob: How does it smell?

    1. Carol: Through the ears

      a. Alice liked this

    2. Eve: BUY VIAGRA!!!1 (Bob didn't delete this because he's a noob, but Alice doesn't want this on her site)

    3. Alice: Terrible

    4. WitchHunter: Alice has a dog, proof that she's a Satan worshiper. Stone her.

      a. Bob: If you buy the weed, I'll see what I can do.

      1. Alice: I'm not taking drugs from fanatics. I have principles.

Threading has longevity issues

When Bob goes down, the joke is lost

1, 1.a.iii, 1.a.i.a, and 1.a.iv.a.a are all items on Alice's Redwind (or other indiewebcamp compatible) site, yet none of them shows the whole picture (Twitter used to be like this in the beginning):

  • 1 shows 1.a
  • 1.a.iii is in reply to 1.a, but no mention of 1 (to get that information, you should hope Bob's site is still online and that the noob didn't delete anything by mistake and didn't get arrested for not deleting something 👅 ). When Bob goes down, the joke is lost (although Alice has all the data, it's no longer funny).
  • 1.a.i.a has a similar problem. What exactly did alice like?
  • 1.a.iv.a.a would even require a hop via the site of some weird fanatic in order to see the entire picture 😉

Alice wants 1 to show all stuff that she wrote herself (1.a.iii), as well as stuff that she has interacted with (she liked 1.a.i, for example), but not automatically (e.g. 1.a.ii). She wouldn't normally want to show 1.a.iv, but since she mentions it indirectly at 1.a.iv.a.a, it serves as context.

The straightforward way would be, to display mentions as a recursive tree, where

  • Each mention loops over all items in reply to it
  • Each such item renders its subtree of mentions

This would display 1.a.iii, but what about 1.a.i and 1.a.iv? We need them in order to show 1.a.i.a and 1.a.iv.a.a by Alice, and they're on other servers. A query wouldn't fetch them.

The "light" approach

Add an auxiliary indirectly in reply to field. It doesn't have to be published anywhere, it just helps our queries. Whenever Alice interacts with an item (say 1.a.iv), we

  • See if target's in reply to is one of Alice's items (or even mentions already stored on the db). If it is, we're done.
  • Otherwise, Follow all target's in reply to links (with reasonable breadth and depth limits, to avoid "topological DoS attacks"). If we find reference to any items (or even mentions) on the db, we store them (could be more than one) as an indirectly in reply to array on Alice's source item (e.g. 1.a.i.a and 1.a.iv.a.a).

When we display the mention tree of an interaction (generic name for "local item or mention")

  • loop over all interactions (mentions and items) that are either in reply to or indirectly in reply to it. Sort the whole bunch together (by date probably). Don't "segregate".
  • In case of a "direct in reply to", render it (including its subtree)
  • if it's an indirect in reply to, we create a "pseudo interaction" containing a view more in the conversation link to a page showing the missing interactions.

In our case, the subjective threading tree we'll see on Alice's item would be

  1. Alice: I've got a dog without a nose

    a. Bob: How does it smell?

    1. [click to see more]

      a. Alice liked this

    2. Alice: Terrible

    3. [click to see more]

      a. Alice: I'm not taking drugs from fanatics. I have principles.

If you click, for example, on 1.a.iii, you'll see:

  1. Alice: I've got a dog without a nose

  2. Bob: How does it smell?

  3. WitchHunter: Alice has a dog, proof that she's a Satan worshiper. Stone her.

  4. Bob: If you buy the weed, I'll see what I can do.

  5. Alice: I'm not taking drugs from fanatics. I have principles.

This page is based on the indirectly in reply to field of 5 (that contains 2). By following the in reply to links of 4 and 3 in real time (assuming that Bob's and WitchHunter's servers are up), we can reconstruct the conversation. If something goes wrong, the partial tree is not too shabby.

The "heavy" approach

When we first do the discovery of indirectly in reply to URLs, we can actually store "external placehoders" for the items we refer to. It doesn't have to be the whole item, only enough metadata to display it in a mention tree. It doesn't need a permalink (it has one on another site 😉).

This approach may seem more wasteful, but maybe it's simpler to maintain.

Comments?

You can also reply here and here.