FEP 7888 serving up an OrderedCollection
-
@julian @pfefferle @jesseplusplus @harmonicarichard @trwnh
>yes, but they serve objects because we're radical implementors who don't do the whole activities thing
sorry in advance.
My server can retrieve both kinds of collections
I had concerns about diverging / conflicting implementations in the past, but the solution was found...
>We were testing against these URLs from @pfefferle@mastodon.social's personal blog
This context is working
>@jesseplusplus@mastodon.social had a test URL but NodeBB fell over because it encountered an Object in next instead of a URL
I have a problem with this one because the
first
page doesn't have anid
. I can adjust my code but the absence ofid
is unusual. For example, there is anext
page (currently 404), and if we navigate to it, howprev
would look like if the first page is anonymous?>All top level or mid-level objects should report a resolvable context
Do you mean replies made by the context owner specifically? I think remote mid-level replies should not be required to have
context
(that would prevent non-implementing servers from participating). -
@julian @pfefferle @jesseplusplus @harmonicarichard @trwnh
>yes, but they serve objects because we're radical implementors who don't do the whole activities thing
sorry in advance.
My server can retrieve both kinds of collections
I had concerns about diverging / conflicting implementations in the past, but the solution was found...
>We were testing against these URLs from @pfefferle@mastodon.social's personal blog
This context is working
>@jesseplusplus@mastodon.social had a test URL but NodeBB fell over because it encountered an Object in next instead of a URL
I have a problem with this one because the
first
page doesn't have anid
. I can adjust my code but the absence ofid
is unusual. For example, there is anext
page (currently 404), and if we navigate to it, howprev
would look like if the first page is anonymous?>All top level or mid-level objects should report a resolvable context
Do you mean replies made by the context owner specifically? I think remote mid-level replies should not be required to have
context
(that would prevent non-implementing servers from participating).@silverpill@mitra.social said in FEP 7888 serving up an OrderedCollection:
> Do you mean replies made by the context owner specifically?Correct, or more specifically, at least for all replies coming from the instance that the context owner belongs to... so other sibling replies by users on that instance should also report that same context.
-
@julian @pfefferle @jesseplusplus @harmonicarichard @trwnh
>yes, but they serve objects because we're radical implementors who don't do the whole activities thing
sorry in advance.
My server can retrieve both kinds of collections
I had concerns about diverging / conflicting implementations in the past, but the solution was found...
>We were testing against these URLs from @pfefferle@mastodon.social's personal blog
This context is working
>@jesseplusplus@mastodon.social had a test URL but NodeBB fell over because it encountered an Object in next instead of a URL
I have a problem with this one because the
first
page doesn't have anid
. I can adjust my code but the absence ofid
is unusual. For example, there is anext
page (currently 404), and if we navigate to it, howprev
would look like if the first page is anonymous?>All top level or mid-level objects should report a resolvable context
Do you mean replies made by the context owner specifically? I think remote mid-level replies should not be required to have
context
(that would prevent non-implementing servers from participating).@silverpill @julian @pfefferle @jesseplusplus @harmonicarichard the context SHOULD be copied if you want to participate in the same context, but the owner MAY Add whatever they want to an arbitrary Collection
context-unaware impls aren't prevented from participating but this will lead to a degraded experience if you're not careful. likely you would start with some graph source, filter for context, then optionally crawl replies for anything missing or otherwise optionally reverse query inReplyTo
-
@silverpill @julian @pfefferle @jesseplusplus @harmonicarichard the context SHOULD be copied if you want to participate in the same context, but the owner MAY Add whatever they want to an arbitrary Collection
context-unaware impls aren't prevented from participating but this will lead to a degraded experience if you're not careful. likely you would start with some graph source, filter for context, then optionally crawl replies for anything missing or otherwise optionally reverse query inReplyTo
@trwnh@mastodon.social @silverpill@mitra.social I'd argue that the broad baseline implementation is to allow anyone to participate in the same context... mostly because you can't guard against other implementors specifying your
context
value.However, there's nothing stopping a future FEP ("context ownership"/"reply controls") from recommending that implementors check against the context first before locally adding a received object that provides
context
. -
@julian @silverpill right, it's a bidirectional link that should be verified both ways ideally. so you have an object claiming to be included, but you also ideally have a reverse claim of inclusion
i think you can mostly get away with doing something like:
- if context is present and it has a canonical collection, you can browse it directly. ignore the original object
- if someone declares your context and you become aware of it somehow, you can optionally add it to the canonical collection -
@julian @silverpill @pfefferle Right now my fork’s implementation has just a Collection rather than an OrderedCollection, but I’m going to change that to an OrderedCollection based on today’s discussion
@jesseplusplus@mastodon.social @pfefferle@mastodon.social I fixed up NodeBB's janky handling of collections and now I am able to import an entire Frequency conversation via its
context
I think @silverpill@mitra.social is right though, your
context.first
needs anid
. I worked around it but it's better to have it so it can be referenced against by another page'sprev
. -
@julian @silverpill right, it's a bidirectional link that should be verified both ways ideally. so you have an object claiming to be included, but you also ideally have a reverse claim of inclusion
i think you can mostly get away with doing something like:
- if context is present and it has a canonical collection, you can browse it directly. ignore the original object
- if someone declares your context and you become aware of it somehow, you can optionally add it to the canonical collection@julian @silverpill the third point which is more contentious:
- deleting a context implies all objects included in it are now orphans and can be garbage-collected (deleted, updated, moved, whatever)
-
@julian @silverpill the third point which is more contentious:
- deleting a context implies all objects included in it are now orphans and can be garbage-collected (deleted, updated, moved, whatever)
> deleting a context implies...
@trwnh@mastodon.social that would be yet another FEP
-
@julian
yes, but they serve objects because we're radical implementors who don't do the whole activities thing
sorry in advance.
What if only the activity is signed (as is often the case) and the object is not fetchable due to let's say some network error? -
@julian
yes, but they serve objects because we're radical implementors who don't do the whole activities thing
sorry in advance.
What if only the activity is signed (as is often the case) and the object is not fetchable due to let's say some network error?@mario@hub.somaton.com at least per our working implementation, the context only deals with public objects which should be fetchable by an instance (either anonymously or via signed GET).
@silverpill@mitra.social's 171b does what you suggest, sending the full signed (via proofs) activities, which in that sense is more performant as fewer network requests are required (just the one, really), and more reliable as you don't need to fetch the individual objects. However, requiring object integrity proofs is a burden that seems quite difficult to clear at present.
WordPress, NodeBB, and Mastodon are not built in such a way that activities are saved direct-to-database. The activities are consumed and a local representation is saved, which makes going reverse quite difficult, especially when it comes to content from outside the local instance.
-
@silverpill@mitra.social said in FEP 7888 serving up an OrderedCollection:
> Do you mean replies made by the context owner specifically?Correct, or more specifically, at least for all replies coming from the instance that the context owner belongs to... so other sibling replies by users on that instance should also report that same context.
@silverpill@mitra.social you can also test against this instance, though I assume you already tried:
context
url: https://community.nodebb.org/topic/18632- Top level post: https://community.nodebb.org/post/103364
- Mid-level reply: https://community.nodebb.org/post/103377
-
-
@julian i see... In general i think in distributed systems it makes a lot of sense to keep the source intact while consuming the data you need. Other projects might need to consume a different set of fields and the overhead is minimal...
@silverpill -
We normally do full activities, but after some prodding, I've begun implemented the forth-coming FEP about context vs contextHistory. So now the default context is objects for Create|Update|Delete Note|Article and activities for everything else, and contextHistory is full activities for everything associated with the opening post-of the conversation; but what a nightmare...
We do not typically provide URLs as collection members, because you may need a signed activity to access and validate third-party objects which have source access control enabled. -
julian:
individual objects serve a
context
property thatcontext
property is a URL that resolvesOne of the concerns raised was related to the OrderedCollection of items served by the
context
. Specifically, if the items presented in the collection were not in chronological order, NodeBB failed at importing some of the items as theinReplyTo
referenced an object that did not exist.The solution to this was to ensure that the collection items were in chronological order from oldest to newest. Once fixed:
the context resolved to an OrderedCollection containing objects NodeBB was able to pull in the entire conversation
Just a note that I endorse @julian's suggested approach here, and this is how the Discourse plugin has implemented its backfill feature.
-
We normally do full activities, but after some prodding, I've begun implemented the forth-coming FEP about context vs contextHistory. So now the default context is objects for Create|Update|Delete Note|Article and activities for everything else, and contextHistory is full activities for everything associated with the opening post-of the conversation; but what a nightmare...
We do not typically provide URLs as collection members, because you may need a signed activity to access and validate third-party objects which have source access control enabled.>So now the default context is objects for Create|Update|Delete Note|Article and activities for everything else
Shouldn't Create|Update|Delete also have activities in
context
?
My understanding is that context collection is supposed to contain things that have collection ID as theircontext
property.If entity is an activity, its context is a collection of activities.
If entity is a post, its context is a collection of posts.@julian @pfefferle @jesseplusplus @trwnh @mario @harmonicarichard @reiver @aslakr @Fitik
-
We normally do full activities, but after some prodding, I've begun implemented the forth-coming FEP about context vs contextHistory. So now the default context is objects for Create|Update|Delete Note|Article and activities for everything else, and contextHistory is full activities for everything associated with the opening post-of the conversation; but what a nightmare...
We do not typically provide URLs as collection members, because you may need a signed activity to access and validate third-party objects which have source access control enabled.@mikedev I wonder, what do you think about having conversations represented by a specific Conversation object? Basically, saying a conversation *has* a collection of posts, rather than saying that a conversation *is* a collection of posts.
- Conversation.posts = Collection of Objects
- Conversation.outbox = Collection of Activities
- Post.context = Conversationwhere "Post" is loosely an Object that has content
-
@mikedev I wonder, what do you think about having conversations represented by a specific Conversation object? Basically, saying a conversation *has* a collection of posts, rather than saying that a conversation *is* a collection of posts.
- Conversation.posts = Collection of Objects
- Conversation.outbox = Collection of Activities
- Post.context = Conversationwhere "Post" is loosely an Object that has content
I think it's all insane. A collection of everything related to a thread is a collection is a collection. Distinguishing between those that can contain an implied Create and/or full activities and/or a URL and those who can't/shouldn't seems like a nightmare of unnecessary complexity.
An item in a collection can be a number of things (URLs, objects, activities), any of which you need to be able to accept and process to be considered ActivityPub/ActivityStreams compliant at a basic level.
I don't believe we really need one collection for the posts people and another for the conversation people containing different representations of the same content - but here we are. Perhaps we need yet another representation for the URL-only folks? If you think that's madness, then why isn't this madness? -
I think it's all insane. A collection of everything related to a thread is a collection is a collection. Distinguishing between those that can contain an implied Create and/or full activities and/or a URL and those who can't/shouldn't seems like a nightmare of unnecessary complexity.
An item in a collection can be a number of things (URLs, objects, activities), any of which you need to be able to accept and process to be considered ActivityPub/ActivityStreams compliant at a basic level.
I don't believe we really need one collection for the posts people and another for the conversation people containing different representations of the same content - but here we are. Perhaps we need yet another representation for the URL-only folks? If you think that's madness, then why isn't this madness?@mikedev i think this is all protocol stuff, and the real madness is claiming we have a single protocol called "activitypub" that everyone can implement the same way
rather, a protocol is the sum total of everything needed to communicate, negotiated between parties. fundamentally this question is about whether you store activities as resources, or just consume them as RPC. but ideally the conversation/thread should be agnostic to this, and it shouldn't be bound to any particular representation.
-
@mikedev i think this is all protocol stuff, and the real madness is claiming we have a single protocol called "activitypub" that everyone can implement the same way
rather, a protocol is the sum total of everything needed to communicate, negotiated between parties. fundamentally this question is about whether you store activities as resources, or just consume them as RPC. but ideally the conversation/thread should be agnostic to this, and it shouldn't be bound to any particular representation.
@mikedev more generally, there are a lot of conceptual issues with AS2 Collection in both data model and protocol. it seems especially problematic to say that a conversation/thread *is* a Collection, because a Collection can be anything -- someone's followers, a conversation, a photo album, an audience, a feed, a task list, and so on. imo this is a fundamental error in information modeling. a Collection ought to represent a set, not myriad other entities that might *have* a Collection.