- From: Aymeric Vitte <vitteaymeric@gmail.com>
- Date: Tue, 10 Sep 2013 10:15:01 +0200
- To: Ryan Sleevi <sleevi@google.com>
- CC: Richard Barnes <rbarnes@bbn.com>, Jim Schaad <ietf@augustcellars.com>, "public-webcrypto@w3.org" <public-webcrypto@w3.org>
- Message-ID: <522ED505.1030702@gmail.com>
The problem is that the WebCrypto API as it is now without progressive operations can look of very little use to any reader. While thinking about Streams/File delta data, I was wondering: am I allowed with WebCrypto to do crypto.sublte.encrypt(very_enormous_buffer)? I know three(four) Streams proposals, see the links in [1]. The first one (Mozilla) does mix promises and eventtarget for reasons I don't get, the second one (Microsoft) is quasi a copy/paste of the File API (with things like StreamBuilder that are probably outdated), the third (Google?) is not detailed enough, the fourth (Aymeric) is a big simplification of the first + the second + the third with pending points related to progress promises and data consumption for results that don't need to be incremented. Indeed Arun did promptly remove recently the wrong partial blob data definition in the File API, which anyway was not implemented by browsers, but the same should be corrected in XHR too taking care of backward compatibility. What I find wrong in most of the proposals is the fact that the Stream interface is supposed to fire events by itself or to get them from we don't know where by some magic, this is never the case in real life and for existing implementations/APIs, that's what I have tried to highlight in the above link (and previous answers to this thread [2], and code example [3] which would just work fine if delta data were available), streams are read from events from other interfaces and it's already async. So probably you will say: please continue posting your comments to WebApps but coming back to WebCrypto, even when a Stream interface will (hopefully) be final, there will not be enough magic in the interface to guess by itself if process or finish should be called, so WebCrypto will still need to handle process and finish, so you will need to reintroduce something like a CryptoOperation, then why removing it? Regards, Aymeric [1] http://lists.w3.org/Archives/Public/public-webapps/2013JulSep/0453.html [2] http://lists.w3.org/Archives/Public/public-webapps/2013JulSep/0353.html [3] http://lists.w3.org/Archives/Public/public-webcrypto/2013Sep/0003.html Le 10/09/2013 00:12, Ryan Sleevi a écrit : > Richard, Aymeric, > > The point is, as was discussed during the F2F, that progressive > operations are not done in this iteration. > > It's clear that there's a significant problem in API consistency > regarding progressive operations. You can see this in the myriad of > proposals, and, as Arun notes in the latest FileAPI edits, within the > FileAPI. > > Rather than include something in the spec that will either > a) Not be implemented [much like IDBSync] > b) Not be consistent > > It was removed from the spec until such a time as > WebApps/Public-Script-Coord can agree on an interface. There have > obviously been proposals from MSFT (re: Streams API), which was > discussed *very* early on in this WG. There likewise have been > similar-but-different proposals regarding ProgressPromises, such as > from Mozilla. > > This still allows for a number of use cases AND has a better support > story, longer term, for the API, rather than specifying known-bad > interfaces (both Events and Promises had a *number* of significant > issues related to progressive inputs) > > > On Mon, Sep 9, 2013 at 3:06 PM, Richard Barnes <rbarnes@bbn.com > <mailto:rbarnes@bbn.com>> wrote: > > I've been unplugged from this group for a while, and was likewise > surprised to see this development. > > The new API appears to allow progressive input via the sequence<T> > arguments. But it's not clear to me as a naïve reader of this and > the WebIDL spec how this would work. Is the idea that you would > somehow use generators / yield to create a dynamic sequence? > Maybe I don't understand generators that well, but that seems > counter to the clear statements in the WebIDL spec that sequences > are passed by value. > > In any case, I don't care about losing CryptoOperation, but the > spec should be a lot clearer about how progressive operations are > done. > > --Richard > > > > On Sep 7, 2013, at 10:27 PM, Ryan Sleevi <sleevi@google.com > <mailto:sleevi@google.com>> wrote: > > > This was covered on the call. The minutes from two meetings ago > (if I recall correctly) should have them. > > > > The broader discussion of partial output interfaces (such as the > File API) and Streams (MSE, Streams API, ProgressPromise, etc) is > happening in WebApps and you can follow there to understand the > broader arguments - and concerns - of such interfaces. > > > > The minutes should include the discussion as well, as they were > discussed on the call. However, I haven't checked. > > > > On Sep 7, 2013 7:23 PM, "Jim Schaad" <ietf@augustcellars.com > <mailto:ietf@augustcellars.com>> wrote: > > I was just going through the Editor’s draft dated 30 August 2013 > and was shocked to find that there is no longer a definition of > the CryptoOperation interface in the document. Instead a > sequence of CryptoOperationData objects are passed into the root call. > > > > > > > > I do however note that the excising was not complete as it is > still included in the verify method description. > > > > > > > > I completely missed the reasoning behind this. When was this > discussed either on the mailing list or in a telechat so I can go > back and find the justification/reasoning behind it. > > > > > > > > Jim > > > > > > > > -- jCore Email : avitte@jcore.fr Peersm : http://www.peersm.com iAnonym : http://www.ianonym.com node-Tor : https://www.github.com/Ayms/node-Tor GitHub : https://www.github.com/Ayms Web : www.jcore.fr Extract Widget Mobile : www.extractwidget.com BlimpMe! : www.blimpme.com
Received on Tuesday, 10 September 2013 08:15:33 UTC