Project

General

Profile

Actions

Feature proposal #5281

closed

Implement stream auto updating

Added by krileon almost 9 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
18 May 2015
Due date:
% Done:

100%

Estimated time:

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.

Actions #1

Updated by krileon almost 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.

Actions #2

Updated by krileon almost 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.

Actions #3

Updated by krileon almost 9 years ago

  • Target version changed from 4.0.0 to 754
Actions #4

Updated by krileon over 7 years ago

  • Target version changed from 754 to 4.0.0
Actions #5

Updated by krileon over 7 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.

Actions #6

Updated by krileon over 7 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).

Actions #7

Updated by krileon about 7 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.

Actions #8

Updated by krileon about 7 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF