Sort posts by their delivery-date in stream

I think the posts in the stream are ordered by their publishing-date. It may take a while for them to arrive at my pod via federation, so they are “inserted” in my stream below the top of the stream (because there are already newer posts locally).

When I watch my diaspora-stream, I mostly only look at the topmost post, reload and read all new posts until the last post I remembered.

When posts are delivered late, I won’t notice them because they appear below my “I have read this already”-mark I have on my mind. I don’t like that.

So what do you think of implementing a new stream view or changing the ordering of the posts, so posts will be ordered by their arrival date on the local pod?

(This would also make it possible to have a “streaming API” later, which will push newly received posts to the clients.)

Any thoughts?

Note: This discussion was imported from Loomio. Click here to view the original discussion.

Yup, for sure.

I’d imagine it’d be quite easy to add in a link at the top of the stream to change the display order as I guess it just needs to fire an “ORDER BY received_date” type query at the DB?

Agree on this.

How about a different approach: have a separate view for ‘unseen posts’ (posts received by the pod since last stream load). When you next load the stream, unseen posts are placed at the top; or, possibly, already viewed posts are hidden behind a ‘Show viewed posts’ link.

Thus, if a ‘new’ post that you hadn’t seen had an earlier published date than a post you had already seen, you would still see the unseen post at the top of your stream.

Hm… that would also work, but require much more work on server side, because you have to remember when a post was “seen” - that is like the “likes”: another table in the diaspora-database storing information per user per post.
(And I have heard from podmins that the “like” table is the part taking up the most space and performance)

You could store these information locally in the browser of the user, but then it would not be synchronized / available when the user logs in on a different machine or with another browser.

(posts received by the pod since last stream load)

That sounds a bit like my diasporaAutoUpdate userscript, that shows a “show new posts” button and periodically reloads the stream in the background to check for new posts.
But here is the problem I mentioned in the opening post: Since the posts will not necessarily appear on top of the stream, this script might not get all new posts and let you miss some posts.

Since the posts all have their timeago, I think a change like this can make sense. I mean, it isn’t realtime communication anyway, so having them slightly out of order probably won’t freak out anybody. And it would make it a more positive impression of decentralized networking; hey, these posts are unordered because of the way diaspora works instead of oops, things are popping into the stream, sort of buggy still. :slight_smile:

@ivangabrielmoren Exactly. :slight_smile: