[widgets] package updates @notify strawman

Hi All,
I think we should add an optional "oncomplete" or "notify" attribute
(or feel free to suggest a better name) to the Update Description
Document defined in the the automatic updates spec.

Use case for the attribute: to notify some URI, via POST, that an
update completed either successfully or failed for a particular
reason. Reasons could include: "invalid widget package", "out of
memory", "out of storage", "source unavailable" etc. Each state could
be assigned a status code (eg. "900 OK"). Such mechanism would, for
instance, make it easier for developers to get notified if their
widgets are getting installed correctly on devices or if any issues
are arising during the update.

Consequently, the (widely implemented?) OMA Download 1.0 spec [1] has
defined similar functionality. We could leverage certain aspects of
that specification (particularly the relevant status codes, which is
where "900 OK" above comes from in case you were wondering, and add a
few new ones that may be particular to Widgets).

For example, a Widget UA attempting to do an update receives:

<update xmlns="http:/www./w3.org/ns/widgets"
  id="http://a.com/myWidget"
  src="https://a.com/myWidget/v1.1b/awesome.wgt"
  notify="https://a.com/myWidget/updateMonitor.php"
  version="1.1 beta (awesome edition)"
  bytes="1024">
  <details href="http://a.com/myWidget/1.1/whatsnew">
    We fixed some bugs and improved performance!
  </details>
  <hash type="MD5">e56b8e..3a4b97</hash>
</update>

The UA attempts to download and install the update at
https://a.com/myWidget/v1.1b/awesome.wgt.
Upon successful installation, the UA POSTs the following to
https://a.com/myWidget/updateMonitor.php:

status=900 OK

(URL encoded, of course)

The developer now knows that the widget user agent considers the
widget to have installed correctly.

Thoughts, comments?

As an aside, I also want to rename the automatic updates spec "Remote
and Local Updates".

Kind regards,
Marcos
[1]  http://www.openmobilealliance.org/Technical/release_program/download_v10.aspx
-- 
Marcos Caceres
http://datadriven.com.au

Received on Thursday, 4 September 2008 20:07:50 UTC