Aggregator reloading needs rethinking

Bug #1500467 reported by TenLeftFingers
46
This bug affects 10 people
Affects Status Importance Assigned to Milestone
Today Scope
Opinion
High
Unassigned
unity-scopes-api (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

The Today scope is basically a place-holder for 'sub scopes'. The today scope has three problems which cannot both be resolved under the current system. These are:

1) The scope is reloading at times I do not want it to
2) The scope has not got the latest data (eg sms message) when I want it
3) When the Today scope reloads, not only is it slow (BQ 4.5) but it also takes down the entire scope system with it for a few seconds.

The problem is that when the Today scope refreshes/reloads, it reloads all sub-scopes. However, Weather and Today do not need to be reloaded for 24 hours at a time (maybe weather is an exception here).

I think the Today scope should be a 'dumb placeholder' and the sub-scopes should be responsible for calling for refresh. The parent (Today scope) could then refresh an _individual_ sub-scope using ajax or similar. This would improve all three issues above but challenge some other fundamentals, eg:

4) Scopes should be stateless (according to current thinking)

I would challenge this also, as it would solve the issue where the My Music scope shows the user their music sorted by artist, even after they have changed it to album sorting.

The Today scope has come a long way since I got the phone in April and I now have it enable since the latest update a few weeks ago. But the issues I describe above are 'as expected' behaviour and I think this itself is the bug.

Revision history for this message
Kyle Nitzsche (knitzsche) wrote :

Hi TenLeftFingers,

Great that you are continuing to scrutinize Today scope and scopes in general!

As you noted, the Today scope behaves like any other aggregator scope according to the design principles of the scope framework, so this is not really bug against the Today scope but about the scope framework. Therefore, I am going to add a task so that team can see this.

In general it is the responsibility of child scopes to do the right thing, for example using cached data when appropriate to speed things up and reduce network usage.

A few comments:
1) You mentioned a possible issue with sms messages. If so, can you please file a bug against https://bugs.launchpad.net/texts-scope. Please note that the Today scope is only supposed to display a text message if it was received today.

2) Yes, the Day scope could and probably should cache its first result on each day and use that instead of making another web api call each time. I filed this bug to track this request: https://bugs.launchpad.net/day-scope/+bug/1500486

summary: - Today Scope reloading needs rethinking
+ Aggregator reloading needs rethinking
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in unity-scopes-api (Ubuntu):
status: New → Confirmed
Revision history for this message
TenLeftFingers (tenleftfingers) wrote :

Hi Kyle,

Thanks for your response and for correcting the assignment of the bug :) Regarding #1, I don't think there is an issue with the message app (at least from the users point of view). The issue is if I send you an sms now, it will not show on the Today scope until it has done a refresh. I only mention it to highlight that the refresh requirements of each child scope differ so much and that this dissonance suggests to me that the refresh activity should be left to the children.

Regarding #2, thanks for the link. I did go through the few reports for the Today scope before filing, but not the Day ones.

Congratulations to all involved for a lovely scope. It's now the 'landing' scope on my phone and allows me to use my phone much more efficiently than my previous iOS/Android phones.

Best,
Jarlath

Revision history for this message
Kyle Nitzsche (knitzsche) wrote :

Added info: Today scope uses ResultsTtlType=Large currently.

Balancing the rate of auto refresh of the today scope has proven interesting since we want it refreshed often enough that the Day info (and other info) is correct and sufficiently reliable, but also refreshed infrequently enough that users are not disrupted by too much auto-refreshing.

Changed in today-scope:
status: New → Opinion
Changed in today-scope:
importance: Undecided → High
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.