from julian@community.nodebb.org to swicg-threadiverse-wg@community.nodebb.org on 16 May 2024 19:47
https://community.nodebb.org/post/99733
My post from a couple weeks back indicated that NodeBB started following part of FEP-7888: Demystifying the context property.
Our implementation is an endorsement of @trwnh@mastodon.social's proposal that the context
property be given additional formalization.
During the last ForumWG call, they intentionally (or perhaps unintentionally) summarized their desire that implementors should "just use collections", and that that would be a good starting point for future iteration.
With the current state of context
being "there is no coordinated usage of context
", this topic aims to provide a snapshot of implementors' use of that property (or lack thereof), and to stimulate further discussion on potential use cases.
Note that this is not the first time the question has been raised. trwnh's discussion topic contained one such summary of current implementations.
As per that topic:
- Mastodon — does not use
context
, but provides anostatus:conversation
property - Pleroma/Akkoma — uses
context
, but the url provided is unresolvable, likely used similarly to Mastodon - Streams (@mikedev@fediversity.site) — uses
context
, resolves to anOrderedCollection
containing all activities encontered (Creates, Updates, etc.)
My hope is that a provided context
resolving to a Collection (or subtype thereof) would allow for proactive topic backfill, instead of relying on reply chain traversal, which while workable, has some rather specific downsides.
As mentioned per the above linked announcement that NodeBB was following FEP-7888:
- We attach
context
to allNote
objects (NodeBB posts), and it resolves to anOrderedCollection
that contains the uris to the other objects in the context (the NodeBB topic).
threaded - newest
@julian I'm not using
context
, but I think FEP-7888 is great and I want to implement it in the future. Haven't decided yet on what exactly this collection should contain. Slightly in favor of collection of activities (as in Streams / Conversation Containers).@trwnh @mikedev
@silverpill@mitra.social @trwnh@socialhub.activitypub.rocks if the collection contains the entire activity log pertaining to the context, then it makes it harder to determine whether a given object is contained in the collection (as @jenniferplusplus@hachyderm.io mentioned in another thread). If you see a
Create(Note)
you can't be certain it doesn't getDelete(Note)
'd later on in the collection!I would expect that if there's a Delete/Note, the corresponding Create would instantly become a Tombstone, and cease to exist completely after some initial notification period.
I have created a spreadsheet with open editing permissions (for now) and invite implementors to add their implementations if applicable.
One thing I am noticing now (and should've expected) is that not every software has the concept of a discrete context, nor can you expect one from remote activities. In those scenarios, the fallback seems to be to point to the root-node Object and iterate via
replies
collection.For example:
context
as the root-node Object.context
is received, inherits it, but otherwise,context
becomes the root-node Object.@trwnh@mastodon.social does FEP-7888 account for this use-case?
@julian @mariusor @mikedev @trwnh At first I thought you were talking about the "@context", used for JSON-LD...
Hi, I've been working on something a little similar to FEP-7888 which uses the
context
field as a grouping of a subjective context but more for discovery purposes than anything. For example, followers of aService
(I called itTopic
in my doc, which I realize could be a little confusing now) used as the context field can use that to discover other instances that create content with the same context. Optionally, this can be decentralized by appending a nonauthoritative ID to the context, so the authoritative ID would be used for discovery only, and as a way to bootstrap federation.Having
context
be completely authoritative (and thus, forcing an authoritativeCollection
as its representation) could be useful too, but it'd be great to have solution that allows it to be more ephemeral as well.@Chris-Moser Thanks for sharing your implementation of
context
in Yuforium!That's definitely an interest use-case, although I am curious why you did not consider using the
as:tag
property instead, given that it seems to be a rough parallel to your Topics.In that scenario, then you could limit
context
to what you would call Communities, though depending on how it is used, maybeaudience
could be a better fit (as per FEP-1b12)@Julian yeah that's a good point - I think
tag
would work but I always got the impression that they were more of a micro-level part of a specific piece of content vs. macro-level (being the place they're being discussed in).context
would be set at the forum level (whatever the forum's owner specified) whereas tags might be decided by the user. So in that sense,context
would more about origination of a post.Example might be something like this -
Where a
POST
to that forum's outbox with aNote
would result in that note'scontext
defaulting to the one set to the forum. Posting with another context would result in an error. This makes things a little different than a tag which is what would be user specified. In that sense, context is more about where the post was created, vs. what it was created about. In a federated system, where could be an authoritative entity that encompasses multiple instances and is dereferenceable, or where could be defined as a UUID and be completely unauthoritative and ephemeral.Given that it's more about the origination of the post, I would agree that the term "Community" is better in this case to define what context relates (instead of "Topic") so in the example,
context
could be switched tohttps://another-instance.org/community/cars
.It's been a while since I wrote that up, and at the time I was considering using "Community" as the terminology for a context so I might update that soon (especially with "Topic" being a frequently used convention in forums meaning something totally different).
In the Activity Streams docs, the one part about context that got my attention was this - "An example could be all activities relating to a common project or event", meaning that context exists outside of the scope of what a thread would be, and is more indicative of a forum level or federation setting vs. the contents (objects, activities, etc.) of a single thread.
One context-related issue I've encountered which hasn't been canvased yet, is that
context
could be used to set the canonical url of a forum topic. When I say I've encountered this issue, it's some feedback we've received on the plugin. See furtherhttps://meta.discourse.org/t/activitypub-plugin/266794/213?u=angus
And the subsequent discussion.
What I'm currently thinking is the following:
context
context
resolves to a Collection.url
property of the Collection as the Discourse plugin already serializes the topic url as theurl
of Topic Collections.Interested in thoughts on any of the above.
re:
Angus, it's a little more complicated than that I think. Two concerns:
Add
'd and can confirm that all items are in that collection.cc @trwnh@mastodon.social
Also sorry for the delay, it turns out I introduced a regression that caused replies to not make it into NodeBB for the past 12 days. Yikes.
So until that second point is considered — maybe we should discuss at next ForumWG meeting... — I might just maintain my own set of known contexts local context, and send additional
<link rel="alternate" type="application/activity+json" href="//...">
insteadIn AP, I was considering sending an Array in
context
if applicable, with my context first, and all others afterwards.Happy to do it your way, but would need to resolve that 400e problem first.
julian:
I might have not phrased that clearly enough -- there is a soft assumption in 7888 that there is only one context set, especially when reading those bullet points. In other words, you would be overwriting the one context with another. This is the same as "starting a new thread" or "forking the topic".
At the same time, it should be possible for context collections to have multiple identifiers --
id
being "canonical" and aliases being present inalsoKnownAs
. I feel like having multiple collections for the same topic is not a good way forward; it's better to look at it as a state synchronization problem instead, with one collection at the origin being the source of truth. You maintain a local cache of that collection.@trwnh@socialhub.activitypub.rocks said in How do you use `context` (if at all)?:
That's a good point. I'm okay with that sort of assignment of context in theory, although I have concerns about how to handle that "local cache" situation where replies sent to a remote context aren't considered part of the context until an
Add
is received. Might be a sensible default to set the context for those items to the local context until confirmation is received...julian:
Yes, that is my understanding. For example, the canonical url of this topic would be
https://community.nodebb.org/topic/18050/how-do-you-use-context-if-at-all
julian:I'm not sure I quite agree here, albeit I may be misunderstanding your meaning. I don't think the "canonical" nature of the context should be dependent on the fidelity of the context's object (e.g. the context's collection) to all activities made with respect to it, or dependent on the context owner following a particular approach (beyond the necessities I've laid out below).
I feel like requiring activity fidelity makes the use of the context a bit too circumspect as there will always be a possibility that some actor interacting with it does not consider the context to have treated its activities appropriately.
Consider the following
Discourse and NodeBB both consider the context of this topic (i.e. the one we're in right now) to be the canonical context, as represented in the canonical url
https://community.nodebb.org/topic/18050/how-do-you-use-context-if-at-all
Another platform, let's call it "SEOmaster" has also published some activities in this
context
, however for whatever reason they are not winding up in the context's collection, and not appearing in the topic representations on nodebb and socialhub. There could be many reasons for this, ranging from an issue with their activity formatting, to connection issues, to an issue with the actor etc.NodeBB has implemented FEP 400e compatibility, in addition to 1b12 support, in some form.
SEOmaster, as its name implies, has amazing SEO. Because it doesn't consider its rejected activities to be treated appropriately. It feels justified in setting the canonical URL as a URL with its domain and points out that NodeBB is compatible with FEP 400e.
Now, the above could well happen anyway, without any justification, if SEOmaster were to ignore any convention we devise here. However I think the convention we set should be as robust as possible. Making it subject to the specific implementation of the
context
feels like a hostage to fortune to me.That said, I do think that, to be considered a "canonical" context for the purposes of a forum the following needs to be true:
context
is resolvable.Collection
.Collection
has a resolvableurl
.For a forum I think we need to at least require the context to be a
Collection
, otherwise it can't be a canonical context for a topic.@angus@socialhub.activitypub.rocks said in How do you use `context` (if at all)?:
Agreed on that. I think I am over-complicating things by thinking that individual objects in a forum topic could have different contexts when queried via ActivityPub.
However, what if after iterating through the resolved context, the top-level item identifies itself as having a
context
that differs from the one you queried? Do you start over with the new context (if resolvable? lol.)