Closed Bug 1187156 Opened 9 years ago Closed 9 years ago

Figure out how web packaged app updating should work

Categories

(Core :: Networking, defect, P1)

defect

Tracking

()

RESOLVED DUPLICATE of bug 1187307

People

(Reporter: valentin, Unassigned)

References

Details

Following bug 1170837, packaged apps are updated just like any other internet resource - when it changes on the web, and the app makes a request for it, the package will be downloaded and from that point on all responses will be from the new version. However, it seems we might want to take a different approach, and make sure that an app can't change while it's running. What we need: - A way of querying the PackagedAppService to see when an update is available. - A way of determining if the app is still in use - Figure out WHEN we want to download the package, and how we can make the transition between the old and the new version
I'd be really interested if every time we update the app we could do so with a different appId. So if the running process has appId1 and is using version A, at the moment and update is available, we download it in the cache storage for appId2. appId1 will continue to use the same version as before, but when the app is killed and it starts again, it would use appId2. I'm not sure if this is possible, but it would make managing different versions of the package much easier. We could even apply newer permissions to the app when the appId switch is made. The point when we make the switch is still an open question though.
(In reply to Valentin Gosu [:valentin] from comment #1) > I'd be really interested if every time we update the app we could do so with > a different appId. > So if the running process has appId1 and is using version A, at the moment > and update is available, we download it in the cache storage for appId2. > appId1 will continue to use the same version as before, but when the app is > killed and it starts again, it would use appId2. I am assuming you will allocate a new appId when a new version of package is found available. So, it seems equivalent to adding 'version' to the lookup key for cookies/cache/etc and might just work in this case. Is it correct? > I'm not sure if this is possible, but it would make managing different > versions of the package much easier. We could even apply newer permissions > to the app when the appId switch is made. The point when we make the switch > is still an open question though. A fair (might not the best) point to make the switch is when a packaged content is not referenced at all (BF cache should be treated referenced or not?). I don't know the implementation difficulties but it seems acceptable to me.
Blocks: 1187307
This basically the same task as bug 1187307
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.