10 ms·
People might not like it but i really think native apps are going to die once everyone figures out how to optimize this crazy web stack.
by stevemk14ebr 9y ago
People might not like it but i really think native apps are going to die once everyone figures out how to optimize this crazy web stack.
- ateesdalejr 9y agoI agree, once browser get a good grip on CPU parallelism things will probably be all downhill from there.
- mark-r 9y agoHow many threads do you think the browsers will allow on a single page?
- BatFastard 9y agoAs many as is needed. And as many processors as are needed. As someone who writes browser based 3D games, I need more power!
- meritt 9y agoOut of curiosity, what technologies are you leveraging to write browser-based 3D games? Lightweight WebGL libraries, something higher-level like Unity, or something else entirely?
- BatFastard 9y agoRolling my own graphics engine (ugh!) to create a voxel octree platform. Front end uses C++ to Webassembly for the engine core and Typescript for the UX. Backend uses Java with a MSOA. All using a reactive message system.
- solarkraft 9y agoA web page should probably not be allowed to use unlimited amounts of computing power without asking for permission first.
- elcritch 9y agoWe need this!
- 0xfeba 9y agoeg coinhive
- marcosdumay 9y agoI don't see why the foreground web page shouldn't have as much access to my desktop's CPU as any native program.
- ateesdalejr 9y agoI agree! Like 0xfeba pointed out, really annoying things like coinhive could eat all your CPU if no permission was required. Some sort of web API that tells the browser how many threads it can allocate for rendering and code execution. If the thread count exceeds a configured maximum the browser can ask the user for permission.
- badsectoracula 9y agoI don't think it'll go that way, i remember when web workers first came out i wrote a simple raytracer with some GI and optionally used web workers if available for multiple threads. It worked fine until some browser updates later that limited the amount of web workers pages could use (or the amount of time each worker got, i don't remember, it has been a few years) making the web worker version have pretty much the same speed as the regular version.
- BatFastard 9y agoThat is disappointing to hear, I am hoping webassembly will loosen that back up a bit.
- deleted 9y ago[deleted]
- fulafel 9y agoCurrently quite a lot, more than 10 with the current stable Firefox release, here's a test page: http://pmav.eu/stuff/javascript-webworkers/ http://pmav.eu/stuff/javascript-webworkers/ (Web workers are around since ca. 2010 so this is not very new)
- imtringued 9y agoDo they require you to serialise data to strings or is it possible to transmit typed arrays?
- fulafel 9y agoThere is support for efficiently passing data around. You can directly get binary typed arrays from XmlHttpRequest without intermediate processing, and you can pass them around without memory copies to WebWorkers using Transferables. More recently you have shared typed arrays that work like shared memory between threads (as of Safari 10.1 / Chrome 60, Firefox too)
- deleted 9y ago[deleted]
- sremani 9y agoIsn't WebAssembly a VM inside browser ? If so, I am skeptical especially with end of moore's law. Edit: I was a bit mis-informed, the design document is an interesting read.. https://github.com/WebAssembly/design/blob/master/Rationale.md#why-a-stack-machine https://github.com/WebAssembly/design/blob/master/Rationale....
- scriptproof 9y agoIt is a VM, stack-based like the JVM. It is called a "WebAssembly VM" in the document.
- int_19h 9y agoUnlike JVM, though, it has semantics that make it possible to compile to optimized native code easily, without having to do complicated analysis for more advanced optimizations.
- frozenport 9y agoI disagree. When people start using native languages like C++ for the Web, they will quickly realize they could have just used C++ to begin with.
- adventured 9y agoGetting people to download and install traditional software is a substantial point of friction. Average users hate managing software installations, updating, fixing broken installations, dealing with malware, et al. The problem spans from the enterprise down to normal consumers. Browsers as a better software platform, will significantly accelerate the rate at which software eats everything. Most software should ideally just work, no installs, period. The browser can act as that platform and it can go a lot further than it has so far. More to the point, there is no other future outcome than the browser becoming that vehicle, nothing can stop it from moving that direction at this point. You don't need something equivalent to maximum native performance to do what 99% of users want to do. The rare edge cases that need extreme performance will remain native.
- frozenport 9y agoWhat we really need is better web-store for applications. What actually runs in it is a different story that the end-user doesn't care about. MS really botched their attempt, by drastically restricting functionality of Windows Store apps, and insisting on verification. Indeed, MSVC could never be deployed on MS's own app store. When they sober up, we might have a better deployment environment.
- repsilat 9y agoReally this just points to a lack of vision on the part of operating systems people. There is no reason downloading, possibly "installing" (mostly caching?) and running "traditional software" couldn't be as frictionless as clicking on a link, but that's just not how the software and security model of Windows, OSX or Ubuntu (to name just the household names) are set up. Browsers probably will win, but mostly by accident and as a result of network effects rather than any inherent qualities. As a platform it's positively awful, though it is getting better in fits and starts. Ideally we'd have proper sandboxing, proper compilation, proper libraries, proper access to hardware. Alas, all of that good stuff is basically a historical footnote at this point.
- knowThySelfx 9y agoThe browser is gonna become like a front for a distributed OS.
- solarkraft 9y agoYep. We already have threads. What I find most painful about this development is that this new platform requires Javascript and wrapping everything inside an HTML document.
- knowThySelfx 9y agoI guess we will see some changes to this as well, if Webassembly really takes off. Which is what it looks like. Could be interesting to see the kind of security issues this brings.
- marcosdumay 9y agoWebAssebly is here to let one replace Javascript. Not to depend on it. (It's the other way around, if you want to keep using Javascript, the expectation is that you'll start to depend on WebAssemby in the future.)
- sp332 9y agoIt might go that way eventually, but right now, you still have to deal with JS at least to load up the wasm program and get a useful result out of it to present to the user.
- seibelj 9y agoNative apps are often written in web technologies via Electron. It all depends on what you need and what access you can get. Plus, someone has to maintain the browser and its packages, so there will always be need for systems developers.
- pasta1212 9y agoAn Electron app is not considered a native app
- SolarNet 9y agoSure, but they compete with native apps is the point the parent was making. They download, install, update, configure, and use features like a native app.
- colordrops 9y agoBut they often don't perform like native apps, both when it comes to size, speed, and look and feel.
- arbie 9y agoMost users are not so discerning. Once Windows ships with a native JS engine (perhaps Chakra), will streaming Electron-based apps without traditional "installation" be possible?
- icebraining 9y agoWindows already ships with a JS engine - it's a supported language for UWPs. I don't think you can stream them, though.
- pjmlp 9y agoWindows has supported "Electron" apps since Windows 95, when Active Desktop was introduced. Thankfully it has been largely ignored until web devs decided to start using Electron.
- meritt 9y agoIt's definitely possible but we went through all of this a decade ago with Adobe Air, Microsoft Silverlight, and JavaFX. Nearly a decade before that, in the early 2000s, we went through this with Macromedia Flash, Java Applets, and Microsoft ActiveX. Trying to replace native applications with runs-in-the-browser RIAs is nothing new, but we're at least finally agreeing on the language/implementation, so maybe this time will truly be different.
- mschuster91 9y ago> Trying to replace native applications with runs-in-the-browser RIAs is nothing new There is one thing that is new: the users do not need to install a separate piece of software, and it's kept up to date by the browser vendor - which means for enterprise users one less piece of software to certify/test for updates/compatibility, and for private users one software less which installed adware on each update (Java IIRC still does) and has that "risky" association like Flash does.
- badsectoracula 9y agoFlash Player had something like 97% penetration, so for all intents and purposes it was something that you could always consider as being "there" - and users didn't mind having to install it. I think a lot of techies underestimate people's willingness to install stuff on their PCs, especially when that stuff is needed to do tasks they really want and are a couple of clicks away.
- AnIdiotOnTheNet 9y agoPeople use the "average user" as a strawman. He is simultaneously too stupid not to install malware that claims to be a fax, and yet unwilling to exert even the slightest effort to install software he needs to get things done.
- mschuster91 9y ago> and yet unwilling to exert even the slightest effort to install software he needs to get things done. Enterprises often disabled (or heavily whitelisted) both Flash and Java in the browser due to malware concerns as they were (and still are) an effective vector for malware.
- snarfy 9y agoI don't think so, not when my native game needs 50GB of install space. There is no way I'm waiting for that progress bar to download in a webassembly version game. This is one area where native will always have an advantage. The network is no match for the local bus.
- gnur 9y agoDownloading it from steam takes just as mush time. But that 50GB is probably for more then 100 hours of playtime, which amounts to a persistent 145kb/s. With some caching up front, I think this could actually work. There literally is no need to have everything on disk before starting. Maybe a few hundred megs before starting, but even that is less then a few minutes on most connections, which is a lot faster then downloading the full game before starting.
- 0xfeba 9y agoYou need all the art and sound for the first few minutes. Probably a lot more than 300MB.
- sp332 9y agoPS4 has gone this way already. When downloading a game you might get two progress bars. You can start the game when the first one is done, and it will download the rest of the game while you're playing. Microsoft has had this tech for a long time, I know they use it for MS Office programs at least.
- mr_toad 9y agoBrowsers are pretty terrible at downloading more than a few hundred MB. They can't compare to native download managers like Steam or Blizzard's, or even wget.
- collinmanderson 9y agoBack in 2010 I considered native to be a fad and that we'd eventually go back to web (just like native desktop apps have gone to web.) However, 8 years later, things really don't seem to be moving in that direction. Native is always going to be one step ahead in terms of speed and ability. We would need to see native features start to stall so the web can catch up in ability, and websites need to do a lot of work to catch up in speed.
- mr_toad 9y agoFor every step towards browser-based apps there seems to be a step back again - e.g. React Native, Electron and Android Play on ChromeOS. Back when the first iPhones debuted without an app store, Apple claimed that everyone could just use web apps. That didn't last long.