Feature proposal #5281
closedImplement stream auto updating
Description
Implement ajax updating of stream display by loading in the newest entries. Ensure the interval is reasonable and/or configurable. This should be disabled by default. It should also have a cutoff so it doesn't auto update forever.
Updated by krileon over 9 years ago
Maybe instead of auto updating have a button to refresh the stream to load in new entries. This would avoid pop in and avoid unnecessary hits to the server.
Updated by krileon over 9 years ago
If auto updating is implemented possibly implement a pause state for a stream. This should pause the updating if an entry is active or you are typing a new entry. This prevents your place from being lost.
Updated by krileon almost 8 years ago
This should poll for new activity using a date range of the latest activity against the current timestamp. This removes chance of duplicates and limits the parsing as minimal as possible. Interval that it polls should be configurable. It should give up after so many failed polls (no results) or a time period (or both?). The give up should also be configurable.
Comments could use this as well, but if you've 30 comment streams rendered it'd be 30 HTTP requests. Instead it needs to batch those HTTP requests into a single call. That could be tricky so comment auto updating maybe disabled initially.
Updated by krileon almost 8 years ago
The requests can be batched by the jQuery. A new endpoint will be needed, but that's easy enough. It'll need to send 2 arrays (1 for activity streams and 1 for comment streams) with the stream id as the key and the most recent entry timestamp as the value. This means 1 HTTP request can be done to handle updating all streams on the page. It'll be easy to keep track of this just using a global array in the CB Activity jQuery namespace (like instances already does).
Updated by krileon almost 8 years ago
- Status changed from Assigned to Resolved
- % Done changed from 0 to 100
This will check for new activity every minute for 30 minutes and give up if it finds no new activity. It'll reset its give up timer IF new activity is found. It sends the most recent activity timestamp to help adjust the query to only grab a minimal amount of entries. It will not grab more than the paging limit in a single update.