Using WebAssembly and Threads (Chrome Dev Summit 2018)

preview_player
Показать описание
WebAssembly enables new experiences that we’ve never been able to get on the Web before and now WebAssembly threads takes that even further. This talk shows some examples of what WebAssembly enables, highlighting a few real-world examples and demos.

You'll also learn about the tools and debugging capabilities available to help you take advantage of WebAssembly and threads in your web applications today.

event: Chrome Dev Summit 2018; re_ty: Publish; product: Chrome - General; fullname: Thomas Nattestad, Alex Danilo;
Рекомендации по теме
Комментарии
Автор

And how should I at compile-time know how many CPU cores will be available at runtime? It would be better if I could spawn as many threads as there are CPU cores on the actual machine running the wasm module and utilize them optimally. By forcing us to specify the number of threads at compile time will simply make our apps either too slow on modern desktop machines due to underuse of available CPU cores, and too heavy for mobile devices with only a single or two cores...

DoDoENT
Автор

Sounds great on paper, but if I launch a pthread from my wasm code, it crashes the main thread, even in a trivial code sample.
Also, it fails if I have dynamic linkin enabled, or if shared memory is disabled in the browser, which is disabled by default.

gnagyusa
Автор

btw I just (two weeks after this is uploaded) ran GoogleEarth in Firefox, and it asks me to download Chrome in order to start. Misleading presentation is misleading.

KingslayerSrb
Автор

is it can useful way to implement VR web application?

mdfeatherwx
Автор

It is not a language, rather a virtual machine supporting wasm binary files. Something like JVM and .NET. And that is why I guess Google love it, to replace the whole JVM with it and getting rid of Oracle problems. But the question is then what do you do when all people start to use web apps written in web assembly instead of installing native apps where Google get a piece of the money? There would be almost no difference in performance. Interesting to see how this develops.

KeyhanHadjari
Автор

It is almost as if someone is insisting that all web-based code MUST be subservient to JavaScript. I can't wait to someone releases a web browser that will run webassembly "natively, " in that the WASM code can be launched directly by the browser, WASM can access and modify the DOM directly, and threading and garbage collection are handled directly by the WASM VM that is a bit-in part of the browser. Then, move that WASM VM to the OS as WASI. FINALLY, build WASM/WASI coprocessors in hardware, just like GPUs.

GrantSR
Автор

"Liftoff", the "shuttle icon", and the "Turbofan" have so little in common, that it boggles my mind, why would anyone design a system around these 3 metaphors...

_general_error
Автор

A re-invention of Java Applets in a sense. A binary runtime standard that gets JITed at execution time. WebAssembly validates the maxim of the computer industry that technologies get re-invented every 20 years. The latest "inventors" are so proud of themselves for thinking what they have done is new and shiny to the industry.

TheSulross
Автор

Good for mainstream products and "intranet" products. Im expecting insecurity on closed source on small sites, just like ad abuse but worse like crypto mining, or other thirdy party sales of energy. A request to the user to use more processors must be good.

flaviokodama
Автор

Very useful this presentation in the manner of style programming. I start with javascript but ... anyway. If you want my opinion one great subject can be "what is bad into programming language". Starting with rules of ""bad syntax" and "why the new programming languages have many bugs". I used assembly, PHP, Java, Python, javascript, Golang, C# for little projects with Windows and Linux like freelancer.

catafest
Автор

No thanks. Just give me the native threads in wasm directly. Web Workers have too high overheads, require JS, and do not allow to use modern hardware features, like atomic operations, transactional semantic, etc. Sure, it is enough in some apps, but definitively not good enough for a lot of other stuff. I am fine with Web Workers as a temporary solution, or a better isolation (could help with some bugs, including some security related ones), but not the end goal.

movaxh
Автор

10:50 Why use a bleeding-edge tech while you have C++ that's been out there for decades? CMON. We don't need anything else.

TechnologyRules
Автор

why? why wasn't wasm designed to replace js? and all you guys present this as a great feature. we want js dead asap!

guai
Автор

Just replace js with webassembly and move on

Ozuqam
Автор

Websites are already too big and slow and janky. Large-scale use of web assembly will make it even worse.

naythaniel