alright, after like a year of halfheartedly trying on and off, #FetchAllReplies is pretty much finished - the problem of not being able to see all replies to a post is one of the largest complaints that people have with mastodon in particular but also ...
-
kouhai, Breaker of Cachesreplied to Emelia πΈπ» last edited by
@thisismissem @jonny yeah. alas! my efficient websocket push
-
@kouhai
@thisismissem
Thanks for thinking through all this complexity yall, you probably saved me several days of bafflement here. For curiosity's sake I still want to see what would be different from eg. The public feeds, where we need to do what seems like similar filtering for blocks, etc. But we can all subscribe to it, bur it sounds like polling will have to be the way.I think I'll have to make a separate worked after all to prevent a maliciously crafted infinitely expanding thread tree with global recursion limits anyway, so polling might be good there too so we can have a progress indicator rather than just popping posts in as they come
-
kouhai, Breaker of Cachesreplied to jonny (good kind) last edited by
@jonny @thisismissem fairness: should there be a per-user throttle so that we donβt have someone opening 100000 tabs and causing a bunch of work
(Iβd argue that this endpoint may need to be authgated for that reason, to make it easier to throttle)
-
Emelia πΈπ»replied to jonny (good kind) last edited by
@jonny @kouhai yeah, the UI side would certainly need to "buffer" new posts.
I think having the ability to subscribe to a thread in the streaming server would be good, but it has some complexities in the authorization layer which make it potentially difficult.
With https://github.com/mastodon/mastodon/pull/30965 we do lift some database interactions up outside of the message handling loop, and https://github.com/mastodon/mastodon/pull/30978 goes further here.
-
@kouhai
@thisismissem
Definitely yes, it's already only done for logged in users, and I assume there are already throttles for that? But if not yes definitely it should be one thread expansion per account at a time -
Emelia πΈπ»replied to Emelia πΈπ» last edited by
@jonny @kouhai Basically you look up the filters/blocks/mutes data on connect and refresh when rails notifies of changes, and then you're just looking up and comparing in-memory data.
For Threads, we'd need to look up the thread on connection and keep a mapping of thread -> author ID, which can then be tied into the blocks/mutes lookups as messages are processed.
We'd also need to have events for follower changes possibly.
-
-
Emelia πΈπ»replied to jonny (good kind) last edited by
-
kouhai, Breaker of Cachesreplied to Emelia πΈπ» last edited by
@thisismissem @jonny to clarify, are we talking about the polling approach, or the websocket?
-
Stefan Bohacekreplied to jonny (good kind) last edited by
@jonny Amazing, thank you for working on this!
-