Remove Cost Control background service

RESOLVED FIXED in B2G C3 (12dec-1jan)

Status

Firefox OS
Gaia::Cost Control
P1
normal
RESOLVED FIXED
6 years ago
5 years ago

People

(Reporter: salva, Assigned: salva)

Tracking

unspecified
B2G C3 (12dec-1jan)
x86_64
Linux
Dependency tree / graph

Firefox Tracking Flags

(blocking-basecamp:+)

Details

(Whiteboard: [target:12/21])

Attachments

(1 attachment)

Cost Control application includes a heavy background service that stays in background occupying memory and consuming resource due to several time-outs it uses to keep balance and data synchronization.

These time-outs are battery killers and should be handled via ALARM API in order to act on demand.

Support for background services will be removed in V1 so this service should disappear ASAP.
blocking-basecamp: ? → +
Priority: -- → P3
Depends on: 816416

Comment 1

5 years ago
Mass Modify: All un-milestoned, unresolved blocking-basecamp+ bugs are being moved into the C3 milestone. Note that the target milestone does not mean that these bugs can't be resolved prior to 12/10, rather C2 bugs should be prioritized ahead of C3 bugs.
Target Milestone: --- → B2G C3 (12dec-1jan)

Comment 2

5 years ago
Whats the status here?
I successfully decoupled the widget from the service and now I'm restoring Settings (it include a view of balance and data usage that need to be decoupled as well). I'm finishing that.

I hope to have the balance and telephony tabs finished for this week. By the next, I hope to restore FTE and that's all.
Moving as a P1. Performance of this app has been marked as P1 but I guess nothing is reliable until this work is finished.
Priority: P3 → P1
Whiteboard: [target:12/21]

Updated

5 years ago
Blocks: 813009
(In reply to Salvador de la Puente González [:salva] from comment #3)
> I successfully decoupled the widget from the service and now I'm restoring
> Settings (it include a view of balance and data usage that need to be
> decoupled as well). I'm finishing that.
> 
> I hope to have the balance and telephony tabs finished for this week. By the
> next, I hope to restore FTE and that's all.

Is there anything I can do on my side to help?
Nope, is almost done. Just reviewing for unexpected regressions or hidden bugs. I hope to have the review for today at night, maybe tomorrow.

Thanks Vivien.
(In reply to Salvador de la Puente González [:salva] from comment #6)
> Nope, is almost done. Just reviewing for unexpected regressions or hidden
> bugs. I hope to have the review for today at night, maybe tomorrow.

<3
Depends on: 822972
Created attachment 694390 [details]
Cost Control background service removed.

As soon as the main code lands I'll start to solve all remaining bugs.



All client-server architecture has been replaced by distributed one.
Several modules now share the responsibility of the former service.
Most important modules are:

config_manager.js is in charge of manage OEM configuration and settings

mindgap.js is in charge of keep the extension of Statistics API

costcontrol.js is a wrapper for a singletos in charge of attend all requests

app.js in addition to modules in js/views are in charge of control
the Cost Control application view. Settings are inside the application
as well.

widget.js is in charge of the widget view.

message_handler.js is in charge of receive SMS and alarms set by the
application. This file attends system message and closes itself with
no longer required minimizing the amount of time consuming resources.

common.js holds functionallity for several views.
Attachment #694390 - Flags: review?(21)
Blocks: 816110
No longer depends on: 816110
The main code seems broken on my device. This is hard to test the app there. Is there anything missing in the PR ?
(In reply to Vivien Nicolas (:vingtetun) from comment #9)
> The main code seems broken on my device. This is hard to test the app there.
> Is there anything missing in the PR ?

Ok. I can make it works by tweaking a little bit the source code. It seems like it does not like a fresh build without a sim card.
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Without SIM card, the behavior is undefined but we probably disable all the functionality and leave some text saying you can not access without SIM card. Vivien, you need a Vivo card to check all features. Our QA team is expecting the PR to make a deep testing. Probably my goal during th WW in Berlin will be to solve these problems.
Vivien, I'm a little bit concerned about the performance of the debug function (so many stringifies there), If you don't mind, I'm going to move to some kind of lazy evaluation and remove string concatenations as much as possible and push that.
Comment on attachment 694390 [details]
Cost Control background service removed.

We can do some followups but nothing should prevent this to land as if.

https://github.com/mozilla-b2g/gaia/commit/6c9dc5b25e0feea0d477243d896344b6e35e5f01
Attachment #694390 - Flags: review?(21) → review+
You need to log in before you can comment on or make changes to this bug.