Re: [w3ctag/design-reviews] WebAssembly Response API / Web Embedding (#167)

> The proposed design also limits what is possible in terms of performance, limits the capability to schedule the download and compilation, limits the capability to cache the data along the pipeline.

> If a web browser wants to cache the compiled code resulting from a streaming compilation it helps a lot if it can describe the inputs without comparing their entire content, for example a URL and version.

Service workers allow a mechanism to intercede and rewrite streams as downloaded, while still keeping them URL bound. URLs streamed and rewritten by a service worker can be cached until either the URL changes or the service worker that did the rewriting. This seems nice in that it works the same for other resources too (imagine an image format converter).

> An interface to allow a procedural JS context to control the compilation can not solve the use cases as it just can not be given the information and control needed to work well for security and privacy reasons - it should be possible to draw that conclusion now. A build manifest resource is needed.

The foreign fetch proposal is one possible general path to provide rewriting that applies to other web resources as well (it allows a service worker attached to cross origin requests to get the chance to rewrite content).
https://developers.google.com/web/updates/2016/09/foreign-fetch
I'm not sure what you mean by a build manifest? If you mean some sort of list of alternate urls for wasm resources depending on what a browser implements, this might be useful, but also has the potential to be  insufficiently general to encompass future feature testing needs. It seems likely that as future features or format changes are added, that natural patterns to express detecting them will emerge. Predesigning them, we'd likely guess wrong about what degrees of freedom are needed.


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/design-reviews/issues/167#issuecomment-303253664

Received on Tuesday, 23 May 2017 00:11:15 UTC