GET /browser.exe
blog.ezyang.com
blog.ezyang.com
I'm not saying I completely agree with it, but the rationale behind the principle, and its incredible success, are compelling arguments against what the article proposes, that are not addressed whatsoever.
Also, a nitpick I don't see anyone else making: the author doesn't seem to know the difference between the Internet and the World Wide Web, which is acceptable for a mediocre Web developer, but pretty embarrassing for someone proposing a foundational change to the Web (one that, contrary to the provocative "new Internet" gospel in the first paragraph, doesn't affect the Internet Protocol Suite whatsoever).
(And of course, as pointed out by a plethora of other comments, the proposed foundational change is essentially the Java VM.)
http://ezyang.com/ezyang-resume.pdf
Looking at your GitHub your resume is nowhere near as illustrious. Maybe we can go back to the old days where we were just polite and gave our colleagues the benefit of the doubt instead of assuming that lazy terminology is a signal for incompetence?
> Looking at your GitHub your resume is nowhere near as illustrious.
Nota bene: I actually agree with you.
I also fully admit that as an undergraduate student, I am nowhere near as impressive as the Stanford PhD student (though you could have chosen a more fair comparison than between a copy-edited resume and a skimming of my "GitHub resume"). I do humbly submit that MathQuill is more substantive than any JavaScript project you or Edward Yang has ever created (or than your or his contributions to any JavaScript project).
The meaning was indeed unambiguous, what I intended to say was that your choice of words damaged your credibility a wee bit. Happens to me all the time, I can see now that you just wrote a quick blog post to promote a paper a friend wrote that you found thought-provoking. No judgement.
In replies to other comments, you seem to have quite clearly addressed the concern that the proposal is essentially the Java VM all over again, countering that this proposal has a better ABI that will make all the difference (is my understanding correct?). Nowhere have I seen you address my concern that this, not just violates, but completely and utterly rejects a core design principle of the current Web that is arguably partly responsible for its success (certainly Tim Berners-Lee, the creator and essentially BDFL of the Web, argues for it).
In fact, this concern occurred to you: "I can’t use Adblock or Greasemonkey anymore (that would involve injecting code into arbitrary executables), and it’s much harder for me to take websites and use them in ways their owners didn’t originally expect. (Would search engines exist in the same form in this new world order?)" However, it looks like you didn't really think that thought through, and had never heard of the Principle of Least Power.
Again, I don't claim to fully agree with it. However, I can't deny that the Web is incredibly successful, and if I were to assert the creator of such a successful technology was completely wrong about one of the fundamental design principles that they espouse was critical to their technologies' success, I'd have some damn good arguments why.
A charismatic professor of mine, Scott Shenker, has a quote by Don Norman he likes a lot: "Academics get paid for being clever, not for being right." This, Shenker says, is why a physicist invented the Web, not a computer scientist.
I don't know. But it's hard to argue with success.
People have been fighting against this since the Web first hit the mainstream circa fifteen years ago now. First it was tables and single-pixel transparent GIFs, then it was a whole lot of Flash and Java and a few sites done pretty much entirely as JPEGs, then those people got their hands on CSS and Javascript, which is pretty much where we are now.
That got us quirks mode, tag soup, and "This website is best viewed with". OTOH, the semantic web never caught on, either, and a lot of great proposals surrounding microformats died due to nobody caring about them.
It's almost a law, really: The Web is never, and will never be, precisely what you want it to be. However, it will likely be good enough.
Kay: I think you can... go to the article on Logo, can you write and execute Logo programs? Are there examples? No. The Wikipedia people didn't even imagine that, in spite of the fact that they're on a computer.... Go to a blog, go to any Wiki, and find one that's WYSIWYG like Microsoft Word is. Word was done in 1974. HyperCard was 1989. Find me Web pages that are even as good as HyperCard. The Web was done after that, but it was done by people who had no imagination. They were just trying to satisfy an immediate need.... what you definitely don't want in a Web browser is any features.
Binstock: "Any features?"
Kay: Yeah. You want to get those from the objects. You want it to be a mini-operating system, and the people who did the browser mistook it as an application. They flunked Operating Systems 101.... I mean, look at it: The job of an operating system is to run arbitrary code safely. It's not there to tell you what kind of code you can run."
The core point here is that the OS should be able to run foreign applications without an 'install' process, just like I don't need to install a webpage to use it. I assume the OP is not suggesting that we strip all of the useful APIs from the web as we know it.
Sarcasm aside, we're moving in that direction already.
We did used to download random binaries from the internet and run them. It took too much effort to get up and running and there were compatibility issues between systems, not to mention dependencies (java / c++ runtimes etc.), dll hell, having to support myriad different OSes and OS versions. When it broke, it broke badly and usually you had 0 chances of debugging, save sending a core dump back over the internet, if the user let you.
Meanwhile, standards came and improved, and finally we realized that we already had a UI toolkit that ran reasonably across all platforms, didn't require any dependency installations, ran "programs" instantly without any download and installation procedure. This alone is as large a marketing win as it is a tech win. Remind you of something? It's the web we know and love today. And you get logs when it breaks. And you can watch your users using it, page by page and get stats. And the limited nature of the abstraction layer means that if it breaks, it doesn't fail as catastrophically, there is less chance of a big fat ugly core dump message, there is more of a chance you almost instantly know. And the hard abstraction layer means that there is a clearer understanding of security implications. Web apps, generally speaking, can't access my files. Can Java applets or ActiveX components? A bit more hazy. Can executables? Yeah. Can this proposed system? Maybe?
The modern web (browser and standards together) is a universal VM and an SDK rolled into one. It's the only one we have that works reasonably well enough and strikes a decent balance between capability and ease of development.
The point of this person's system, which is the proposed freedom from browser restrictions and incompatibilities, is a complete fallacy. Is Microsoft going to recreate this new system for every system under the sun? No. People (and companies like Apple, Google) will have to create their own, and thus incompatibilities will prevail. Open standards are good. Established open standards are better.
Many people tried to create alternatives, and failed miserably. It works. Don't fuck with it.
Although you made some insightful points here, I swear I'm not kidding when I tell you that I've had people tell me almost the exact same thing about IBM's 3270 terminal protocol.
What is wrong with this picture? Really? Are you willing to trade all this away, merely to get rid of the vestigial API cruft, which is mostly already abstracted away by tons of nice tools (coffeescript? bootstrap? etc.)?
I honestly think that it's going to be hard to come up with a better platform since that's a moving target: The web is evolving all the time and is ahead the competition in many respects (see my parent post).
I want to cry when people want to toss this all away when we have it so good right now. I dealt with the web when it was a complete mess. I am thankful for what it is now and the direction it's rapidly moving in.
You're conflating a lot of issues in this post, many of which are orthogonal to Howell's idea, which is making it difficult for us to talk about the core technical idea (which is certainly not perfect, but you're focusing on the wrong things.)
Sadly, I have no links, only hearsay.
(These are a few of the things that, as a browser engineer, I expect could not be done in this model.)
Also as a Mac user, I expect this would result in many forms in web pages giving me controls that look and act like Windows.
Against these likely disadvantages, the advantages seem slim. We already have good ways to distribute sandboxed native apps. The Web doesn't need to become one of them.
"The only thing here that isn't a threat to our business model and/or Design Vision is password autofill. We'll get right on solving that." -- The MBA Voice in my head
Let's face it: the open web is a terrible environment to program in. It is messy and arcane and difficult. But some of this difficulty is not acidental complexity. Some of it is the price we pay for writing apps who's outputs and interfaces are themselves addressable, mutable, and usable.
If apps were to become big opaque blobs of binaries again, yes, they would be easier to program. But is that good for us, or good for the world? What is the long-term cost of making the web?
The promise of real, globally shared coding environments is only just starting to get some legs with tools like jsfiddle revolutionizing the way we solve programming problems together. I can't really share Java code of any complexity with people and be assured that they will be run in a suitable context. The path to creating an environment, compiling and executing Java is intense, and jsFiddle literally eliminates all of that work for the people I want to see my code. Learning the quirks of the open web is a small price to pay for that super-power.
And let me also say that there is still plenty of accidental complexity to eliminate! In particular, servers have been doing far too much for far too long, and once they start doing what they are good at and only what they are good at (which is partitioning the sum total of your information into discrete URL-addressable resources) we will all breath a huge sigh of relieve, and focus on the real problem. (Which is, of course, the monstrosity that is CSS).
And every device, from a smartphone to a 30" screen running on an octo-Xenon would have to be able to execute the same native code.
And each vendor of a browser kit would try to establish their own web standards to go with their home-grown engine.
I am pretty sure this is not the future of the web, and this seems like a great thing.
And it's not like this is a completely novel idea. None of the proprietary sandboxed browing environments of the past (Flash, Silverlight...) made anything really easier. They sometimes enabled us to do things that were impossible with HTML+JS, but they were all both a pain in the lower back for developers and users and had glaring security holes.
I like the text based internet! The fact that I can go to a website, right click and view source is the greatest part of the internet!
"What, and steal mah codez?! Damn you to hell!"
MBAs don't use precisely those words, but the spirit is the same.
This is the danger of writing a blog post before reading up on computer history.
If he wants to experience how it feels, he should just start build Flash based websites.
But you want to have OpenGL (with shader compiler security bugs you could drive a truck through!). You want to read from cameras and disks, and post notifications and go fullscreen and read/write audio samples and do all the other unsafe things that browsers are currently implementing.
The syscall interface that's explored in the paper doesn't do any of those things; software rendering only, etc.
The challenge in this work is exposing the advanced high-end functionality (GL, media, window system, etc) in a way that's secure and can't be abused. The challenge isn't in defining a syscall interface that lets you run all-software apps (NaCL has solved that problem, but so did the JVM and qemu...). I feel like this paper completely ignores the real issues, and focuses on problems that have been solved well enough or are already understood...
"...all you need is a native execution environment, a minimal interface for persistent state, an interface for external network communication and an interface for drawing pixels on the screen..."
Compared to a modern browser, you've lost the ability to upload and download files, the ability to open URLs in other apps (OAuth, anyone?), the ability to play sound, the ability to use hardware acceleration for video or 3D graphics....
He goes on to say: "This is an interface that is small enough that we would have a hope of making sure that it is bug free." I'm guessing that once you add all the extra stuff you need to reach feature-parity with current browsers, you're going to reach bug-parity with them too.
As a developer, it would be amazing if I could make every user run the browser I used to develop and test my website.
This suggestion is fundamentally no different than exposing a <canvas> element to a page, and saying "OK, implement your own rendering engine and draw whatever you want in this box." Let's say you wanted to implement a modern browser engine in the canvas, like WebKit. Well, you'd need a huge number of OS specific hooks to get things like the ones I listed above. Do you expose those via an OS API? Well, you just opened a huge number of vectors for an attack. Do you replicate these hooks in your own code? Well, you just created a crappy UX since you're never going to match the OS behavior 100%.
Cross-website communication is certainly tricky, check out section 4 of the technical report.
Why not just call it a sandboxed environment and delivery mechanism for untrusted native code?
Then a browser implementation demonstrates how great the security model is and how rich/capable the environment is.
Leaving other (e.g., security) issues aside, this plan would make things far worse. Would new processors be second-class citizens? Would WWW browsers have to (incompatibly) transform themselves into emulators/VMs for the different kinds of "native code" found on the Wild Wild Web?
Most importantly: Would this be the first step toward a closed/proprietary WWW? "View Source" is still useful in this regard, despite the amount of useless JavaScript obfuscation we're seeing today.
You're misunderstanding: the browsers are the native code living on the WWW.
A platform like this would enable people to create proprietary websites, much the same way people can implement systems like Steam as native applications.
Note that ARM never attempted to compete with x86 on performance, and indeed still can't. That doesn't mean that it wasn't useful for other purposes.
So yes, new processors are at a huge disadvantage unless they bring something to the table that none of the existing ones have. But the question is whether you want to prevent a processor that _does_ bring something new from being usable by making it impossible to use the web on it.
... and that is a __BadThing__.
Either you going to write native machine code, in which case you lose portability, or you going to be writing intermediary byte code. That approach has been done before and failed as a ubiquitous open web standard eg the JVM and the .net CLR.
Today's situation is messy, but it works. Every once in a while there is a crazy idea that is actually pretty decent,...'downloading /browser.exe' is not one of them.
well why doesn't he explain how we safely present a system API to arbitrary code?
the whole point of the browser is to provide a method for cross platform ui, abstracting the display of an application from the underlying OS. if you were to want to support more than one operating system you'd have to recompile your binaries against all the system APIs that you wanted to support, sysV, winnt, darwin, etc...
and if you were to present an abstraction which would transparently handle the system API difference then you're looking at a JVM, which has been painfully demonstrated to be extremely hard to prevent escalations for, time and time again.
But there are so many problems to solve. Skimming through the paper shows OP has thought of more problems than me, but there are so many more to solve(yet unforeseen) before this could become even a bit usable. But if you succeed, Microsoft should be worried (and kill your project).
Wait, what's this? http://research.microsoft.com/en-us/people/howell/
> microsoft.com
...oh.
MSR is a different beast from Microsoft itself.
So this hypothetical browser.exe with "only" network connectivity still needs just good a security model as today's browser. And how do know the new browser.exe I downloaded today doesn't have a poisoned security model that allows it to sniff and send my internet banking credentials to the bad guys?
How exactly is this supposed to work for clients on different platforms, like 32bit Windows, 64 bit OSX, linux, ARM, etc. etc.?? You
It could also be the next IE6, lying in wait for an unwary developer.
Have you ever actually tried to read JS code that's been through a minifier, or worse, the Closure Compiler? It's not impossible, but neither is reading disassembled machine code. Either way, you don't have anything close to the original source code.