Hey all,
Updating packaged apps is a reasonably well-understood problem, hosted
Apps on the other hand are a bit more complicated. Our story for
updating hosted apps has been as follows:
- The manifest includes an optional "version" field that is opaque to
the runtime, but can be used by the developer to denote a particular
version of the manifest.
- getSelf() can be used to retrieve this version at any point by the
application, and an update can be triggered via install() if the
application chooses to do so.
- Such as update will not trigger any UI *unless* the name or icon of an
app is changed and in those cases, the user is informed of the change
and must opt into the upgrade.
In addition to the above mechanism, AITC will update the manifest on a
periodic basis and silently upgrade the application unless the name or
icon changed.
Jonas identifies the following problems with the mechanism we have in
place now:
a) The onus is on the developer to ensure that updates to the OWA
manifest and AppCache manifest are in lock-step.
b) If a developer wants to change something like launch_path, the old
launch_path must be kept around for an indefinite period since it is not
possible to know when all clients have upgraded.
In order to mitigate (a), we can have the AppCache update code also
update the OWA manifest whenever a change in the AppCache manifest is
detected. There is no easy answer to (b), since it pretty much
impossible to ensure manifests at all clients have been updated, so any
solution will always break (hopefully a very small number of) clients.
I've filed https://www.bugzilla.mozilla.org/show_bug.cgi?id=781685 to
have AppCache perform an app upgrade if necessary. I also propose we add
the following pieces of functionality to better manage updates:
- Keep polling for manifest changes in Firefox, WebRT and/or a
background process, once a day. A HEAD request to the manifest URL
should suffice.
- If a change was found, a silent update can be performed if there were
no changes to the name of icon. If the name or icon is changed, the user
must be prompted (easy to do if the app is currently running, if not
prompt at the next time the app is launched).
Comments, suggestions and creative ideas welcome!
-Anant
_______________________________________________
dev-webapps mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-webapps