FEP 7888 serving up an OrderedCollection
-
@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 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 -
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 the backfill feature.