W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2008

[widgets] package updates @notify strawman

From: Marcos Caceres <marcosscaceres@gmail.com>
Date: Thu, 4 Sep 2008 21:07:01 +0100
Message-ID: <b21a10670809041307p4bc6a95eo212502d3794b92a1@mail.gmail.com>
To: public-webapps <public-webapps@w3.org>

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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:27 GMT