w3c / activitypub

http://w3c.github.io/activitypub/
Other
1.22k stars 78 forks source link

Clarify stream ordering requirements #54

Closed gobengo closed 8 years ago

gobengo commented 8 years ago

orig: https://hypothes.is/a/-5Zx1cDsRFCWxhIL_aC6MA

Streams are always presented in reverse chronological order

of... activity.published? or activity.updated?

cwebber commented 8 years ago

On published of the activity (or, potentially when received for an inbox).

tsyesika commented 8 years ago

I think this should remain undefined, lets leave it up to the implementations to define, they might want streams ordered a different way, it also depends on the database and potentially the type of social network.

akuckartz commented 8 years ago

If the spec mentions such a requirement then it should be defined.

cwebber commented 8 years ago

What's most important is that a collection be consistent in its ordering. Clients will be very surprised if ordering suddenly shifts. And paging certainly requires this.

However, there are multiple ways that feeds might be sorted. For example, "reverse chronological by published" is the most popular, but some feeds these days may be sorted by relevance, and this is increasingly popular on social networks. Unfortunately, some social networks might even shift things based on most recently commented and etc.

Because of this ambiguity, the method of ordering is left undefined, but we should require that implementers MUST remain consistent in whatever ordering choice they make, if they use an OrderedCollection. There is no promise if using just a Collection.

cwebber commented 8 years ago

Probably we should specify that the key streams in ActivityPub use OrderedCollection rather than Collection. I'll work on that change.

However, I'm unclear if all collections need to be an OrderedCollection. "inbox" and "outbox", certainly. I'm less sure that "followers" and "following" need to be ordered... I don't think they do (but it may be useful for them to be). Thoughts?

cwebber commented 8 years ago

I updated the streams section to clarify that streams are OrderedCollections. I think that's honestly good enough given existing ActivityStreams definitions.

However, I'm considering removing the "streams" section and simplifying things... I'll examine that in another ticket.