Skip to content
This repository has been archived by the owner on Jan 21, 2022. It is now read-only.

Add streaming behaviour for buffers #164

Open
2 of 3 tasks
alexjgriffith opened this issue Mar 2, 2018 · 3 comments
Open
2 of 3 tasks

Add streaming behaviour for buffers #164

alexjgriffith opened this issue Mar 2, 2018 · 3 comments

Comments

@alexjgriffith
Copy link
Collaborator

alexjgriffith commented Mar 2, 2018

Get async streams working with synchronous mastodon-tl--timelines

  • Define mastodon-tl--buffer-spec such that new toots can be requested
  • Either get async working with synchronous requests, or write an async version of mastodon-http--get-json
  • Write toggle function to switch between streaming and requesting behaviour

Full implementation depends on #37 for rendering notifications

@alexjgriffith alexjgriffith added this to the 0.8.0 milestone Mar 2, 2018
@alexjgriffith alexjgriffith self-assigned this Mar 2, 2018
@alexjgriffith alexjgriffith changed the title Add buffer streams Add streaming behaviour for buffers Mar 2, 2018
@alexjgriffith
Copy link
Collaborator Author

Timeline streams are working and ready for integration into mainline mastodon.el. They now extend the capacity of mastodon-tl.el functions. A few decisions have to be made about integration.

  1. Will it replace the default timeline, i.e. will the user automatically get a streaming timeline, or is it something we want explicitly to turn on?
  2. When toggling back and forth from fixed to streaming should we load all missed toots, or leave a gap in the timeline?
  3. How many toots should we load before we start culling the end of the display buffer? 100, 1,000, 10,000? Note that since the changes are made far from the insertion point there may be a noticeable delay when culling if the buffer is to long or if the buffer is culled to frequently.

@hdurer
Copy link
Collaborator

hdurer commented Mar 21, 2018

I haven't made up my mind about 1) yet.

  1. is no different from what it is a the moment I believe. If you don't update for ages and then press 'u' it won't get all intermittent toot, I believe. I suspect that should be raised as a separate issue (add the ability for the user to on-demand fill these gaps?) but leave it as is for the streams (i.e. when you re-enable streams just load from that point on. As an added bonus we could do one automated update call to do any catch-up if needed before resuming the stream...

  2. should probably be a customizable value - but what default value? I'd vote for something around 1000...

@mooseyboots mooseyboots removed this from the 0.8.0 milestone Dec 21, 2021
@mooseyboots
Copy link
Owner

@alexjgriffith it's a wild long shot so long after the fact, but would you be willing to take a look at this again? i merged your work over at https://git.blast.noho.st/mouse/mastodon.el, but found it sometimes would go haywire so i didn't focus on making it accessible. trying to debug it almost broke my brain so i desisted. but when it works it's lovely, so would be a pity to jettison too.

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

No branches or pull requests

3 participants