Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standardize outbox seeking method (way to retrieve posts published between other posts) #378

Open
saschanaz opened this issue Jul 2, 2023 · 9 comments
Assignees

Comments

@saschanaz
Copy link
Member

From mastodon/mastodon#34 (comment):

Per my understanding Mastodon supports outbox paging (which is required to fill the gap described in #34 (comment)), but AFAICT this is not a standard and implementations use their own parameter names for this. (Mastodon uses min/max_id while Misskey uses since/until_id.) Some implementations may not support such parameters at all, as seemingly Lemmy doesn't support either of such options. In other words, we don't have infra for this and we need to solve it first.

@nightpool
Copy link
Collaborator

nightpool commented Jul 2, 2023 via email

@saschanaz
Copy link
Member Author

saschanaz commented Jul 2, 2023

How would you fill the gap with next/prev/first/last? Calling next again and again until you retrieve the target range is not ideal. (And can easily trigger an infinite loop if the remote server generates infinite pages)

@nightpool
Copy link
Collaborator

nightpool commented Jul 2, 2023 via email

@saschanaz
Copy link
Member Author

I don't think that works at all for anything, since any post can be deleted anytime. And it's not fundamentally impossible, the parameters are already implemented in Mastodon and Misskey in incompatible ways, we just need to somehow standardize it.

@nightpool
Copy link
Collaborator

nightpool commented Jul 2, 2023

I don't understand how or when servers would know to request those IDs, if there's no way to know a post is missing. Additionally, it would require all servers to use and expose lexically sortable IDs, which would be a huge breaking change for servers using e.g. slugs, UUIDs, etc

@saschanaz
Copy link
Member Author

I don't understand how or when servers would know to request those IDs, if there's no way to know a post is missing.

Clients e.g. for Twitter had their ways to detect gaps, theoretically servers can have that too.

Additionally, it would require all servers to use and expose lexically sortable IDs, which would be a huge breaking change for servers using e.g. slugs, UUIDs, etc

Using time for that could be more compatible.

@saschanaz saschanaz changed the title Standardize outbox paging method (way to retrieve posts published between other posts) Standardize outbox seeking method (way to retrieve posts published between other posts) Jul 15, 2023
@saschanaz
Copy link
Member Author

Random idea: add outboxAfter/outboxBefore properties on objects? No need to care about IDs in that case as servers can send whatever URL that fits their implementation.

@evanp
Copy link
Collaborator

evanp commented Oct 4, 2023

There is a FEP (federation enhancement protocol) specifically for sorting and filtering collections like the outbox. It may make sense to move this conversation to that FEP in order guide its further development.

https://codeberg.org/fediverse/fep/src/branch/main/fep/5bf0/fep-5bf0.md

@evanp evanp self-assigned this Oct 4, 2023
@tesaguri
Copy link

tesaguri commented Oct 5, 2023

It seems to me that FEP-5bf0 is about a mechanism for servers to provide a set of views into collections predetermined by the server itself and describe the filter condition to clients, and not for clients (or remote servers) to request a view filtered by a condition dynamically specified by the client. The latter use case is explicitly mentioned as out of the scope of the proposal in the Security section

But yes, we could certainly borrow some concepts from the proposal. Maybe the cursored collection pages could be CollectionViews, for example?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants