RE: The reason PendingOp removed from Messaging API

Note that in Windows 8, Promises were the design of choice for the JavaScript projection of core windows services. For better or worse they are _everywhere_ there. I'm not proposing we use that pattern, but wanted everyone to simply be aware of that. If a spec is created (I'm _not_ volunteering here), then I'd hope it would be compatible with the Win8 promise design.

-----Original Message-----
From: Robin Berjon [mailto:robin@berjon.com] 
Sent: Monday, November 14, 2011 3:09 AM
To: Travis Leithead
Cc: kisubs.song@samsung.com; public-device-apis@w3.org
Subject: Re: The reason PendingOp removed from Messaging API

Hi all,

On Nov 11, 2011, at 22:44 , Travis Leithead wrote:
>> -----Original Message-----
>> From: Kisub Song [mailto:kisubs.song@samsung.com]
>> Sent: Thursday, November 10, 2011 10:05 PM I found that the PendingOp 
>> had existed on the previous version of Messaging API.
>> But it was removed from latest version.
>> 
>> Is there any reasons for this decision?
> 
> I was also curious, but when I checked the earlier spec, I noticed 
> that it was used without being defined. Was it ever defined? If not, 
> that's my guess at why it was removed :)

PendingOp was (very quickly) defined in "Core Device Interfaces":

    http://dev.w3.org/2009/dap/device/

That draft was never officially published. We removed PendingOp because we had feedback that in most cases in which it was used there were potential issues with cancelling operations (i.e. it might not be possible, and it might provide a false sense of security that something actually has been cancelled).

Is there any specific reason why this is resurfacing? We can always look at reinstating it if needed (though I'd rather avoid flip-flopping too much :).

Note that WebApps has on occasion discussed using Promises for async calls (e.g. http://lists.w3.org/Archives/Public/public-webapps/2010JanMar/0661.html), a topic which was also briefly mentioned during their TPAC f2f. Promises do more than PendingOp, but they're a natural tie-in (I think). Based on feedback to date it seems to be one of those ideas that has neither strong support nor strong opposition, so that nothing happens with regards to it. If there's interest in using Promises, the idea needs a champion. That would involve:

    1) talking to the people currently working on APIs that could use them (not necessarily all of them, but at least a decent cross-section) to see how amenable they are to the idea;
    2) probably writing some examples for those specs to show that it works, is elegant, etc.;
    3) ask developers for feedback about this (the ScriptLib CG would be the right place for this);
    4) draft a Promises API (which shouldn't be too much work - famous last words, I know).

--
Robin Berjon - http://berjon.com/ - @robinberjon

Received on Tuesday, 15 November 2011 06:44:21 UTC