14 ms·
Servo: Inside Mozilla's mission to reinvent the web browser
- higherpurpose 13y ago> Mozilla on how its Servo engine will throw away the 20th-century baggage that holds back current browsers and harness the power of modern multi-core smartphones and tablets. Then I hope they don't intend on supporting any 32-bit platform. Make a clean start on 64-bit platforms. By the time Servo is out, there should be 64-bit ARM processors cheap enough even for their low-end phones, and on a desktop it should be a nobrainer.
- Zikes 13y agoWould it be that difficult to just queue up those threads on a single 32 bit processor instead of sending them off to separate cores? It wouldn't be optimal, but at least they wouldn't have to completely write off older or lower-powered devices.
- lttlrck 13y agoDistributing threads and processes across available cores is the job of the OS, not the application.
- Eiwatah4 13y agoIn Rust, (right now) you can choose between a 1:1 or a N:M mapping between OS threads and Rust tasks. With N:M threading, the runtime necessarily does (some of) that internally.
- pcwalton 13y agoIncidentally, Servo uses both: we use 1:1 for the parallel layout worker threads and M:N for the script and layout tasks.
- Ygg2 13y agoFrom what I remember from the Rust/Servo ML they intend to pursue 64 bit as default and 32 as a legacy option.
- sanxiyn 13y agoAs a matter of fact, Servo was broken in 32-bit for quite some time, although it isn't at the moment.
- lastontheboat 13y agoNo, it's definitely still broken on 32bit platforms. It does not even finish building right now.
- sanxiyn 13y agoDoesn't it build on Android, which is 32-bit?
- rat87 13y agoMaybe he meant x86 as opposed to ARM(32 bit)?
- lastontheboat 13y agoCorrect.
- lucian1900 13y agoThere's no particular reason to not support 32 bit, at least so far.
- leoc 13y agoIt's too soon surely. There are plenty of recent or current 64-bit-incapable platforms (PCs running 32-bit Windows, every Android phone to date ...) which you'd hope to at least be able to run an up-to-date web browser on for several years to come.
- auvrw 13y ago> Then I hope they don't intend on supporting any 32-bit platform. this type of thinking is so negative... why would you ever make not supporting/doing something to be a project's goal? the servo devs might make speed of development or maintainability a goal, and that might lead to the decision not to support 32-bit (it's not clear to me why it would create that much overhead on either front, but then i don't know rust). sorry if that's tangential, but reasoning/explanations of the form, "here's the goal: let's not accomplish __," is broken, and i just needed to vent.
- pdknsk 13y agoReads like the original Chromium manifesto (comic), plus goals for Blink. https://chromium.googlecode.com/files/chromecomicJPGS.zip https://chromium.googlecode.com/files/chromecomicJPGS.zip http://www.chromium.org/blink http://www.chromium.org/blink
- kendalk 13y agoI am hoping Servo is going to increase the use of Rust. There aren't many resources for it at the moment even though it is at version 0.9. I would think that a language nearing "1.0" would have a wider community by now. Here's hoping!
- jfaucett 13y agoI think this has a lot to do with the complete instability of the rust API, and I think a lot of others (myself included), are waiting for the 1.0 release before actually trying to build something in the language. Having software built in rust should be great for the community though, I'm exited about it.
- hansjorg 13y agoFor such a young and not yet completely stable language, I think there's actually quite a lot of active projects, especially pertaining to gamedev. Here are some: http://rust-ci.org/projects/ http://rust-ci.org/projects/
- masklinn 13y ago> There aren't many resources for it at the moment even though it is at version 0.9. I would think that a language nearing "1.0" FWIW the language is only nearning 1.0 in that 0.9 > 0.8. 0.9 is by no means the final pre-1.0 release.
- kendalk 13y agoAh, good point! And this is Mozilla. They are used to putting out releases often. Firefox Nightly is at version 30.0 :)
- smnrchrds 13y agoThis conversation resurfaces every time a project gets to x.10 version number, e.g. KDE SC 4.10. Considering even HN audience which are mostly programmers find this versioning scheme confusing, I wish we have had settled on another identifier to separate minor and major version numbers. Something that didn't have a mathematical meaning. I personally like : and ::
- rebelidealist 13y agoAnother day and another ambitious project by Mozilla. However, when will Mozilla see these projects thru and give them the proper marketing so they have a chance to thrive?
- rdtsc 13y agoBut what if they don't turn out as good as hoped, why should they be marketed then? This is true in general. If they had crystal ball and saw that technology X is going to be popular at time Y, they they work on it until then and release. However things change, market changes, by the time X is 3/4 done maybe there is no more demand for X, or X just turns out not to work as well as hoped. Going full steam ahead with it just because of sunk costs might not be best use of resources. So they try something else. > them the proper marketing so they have a chance to thrive? For mediocre products to thrive just marketing is not enough. Marketing is a good accelerator for already great products. If they are not great, marketing is working against the flow. Sure one can show people the cool Windows 8 tablet commercial with people dancing in it 100 more times and maybe they'll get a few more sales, but that alone is not going to be enough to make it a success.
- kbrosnan 13y agoIt is open source. We don't get to have it both ways. Reporters see a slide deck from FOSDEM [1] and decide to report on it. [1] http://video.fosdem.org/2014/UD2218A/Saturday/Servo_building_a_parallel_web_browser.webm http://video.fosdem.org/2014/UD2218A/Saturday/Servo_building...
- batmansbelt 13y agoI wonder if mozilla plans to merge this back into b2g eventually, and how easy that will be. They have several very exciting projects on the go, but some seem to be heading in different directions.
- zeckalpha 13y agoIt likely would be boot2servo!
- fabrice_d 13y agoYep, I started to hack around b2g and servo build systems to make that happen. Stay tuned.
- lastontheboat 13y agoYou're the best.
- haberman 13y agoThis is so cool, and I love that Rust is being so heavily driven by the pragmatic needs of an ambitious project like this. As a systems guy, Rust is the most excited I've been about a new language in years.
- shmerl 13y agoYes, Rust is very promising especially if you look for better alternatives for C++. I wish it would stabilize and someone could write an in depth and well structured book on it. I have easier time learning languages that way, when ideas are explained and well presented, rather than deducing it all from very lacking documentation. In case of Rust it's even more difficult since it's packed with new ideas.
- steveklabnik 13y ago> I wish it would stabilize Should be later this year. > and someone could write an in depth and well structured book on it. Give me some time. ;)
- cgh 13y agoLet me first say I really loved your Rust intro and I'll be buying any new book you produce. Question: are there any moderate-sized codebases (ie not Servo, not Rust itself) that can be used to show idiomatic Rust? In my own experimentation (a simple image utility to resize images and convert to b&w), I ended up writing it a lot like I would C, which I know isn't correct based on snippets I've seen. Or rather, it's correct in that it works, but it's not particularly idiomatic and the Rust elite would sneer at me. It's like the early days of C++ when people were writing it as "C with classes", complete with pointers everywhere, malloc, etc. A lot of that could have been mitigated with some easily digestible source that clearly demonstrates the idioms. Maybe a small game, a simple text editor, etc.? Does anyone know of anything like this? Or is it too soon for this?
- lastontheboat 13y ago
- deleted 13y ago[deleted]
- pcwalton 13y agoServo inherits asm.js support from SpiderMonkey.
- whyme 13y agoI would have thought ditching HTML, the box model, CSS and JavaScript to be a more important objective that should come sooner than this. Or another way to put this would be: Wouldn't development efficiency/simplicity be more important than running the current junk in parallel?
- steveklabnik 13y ago"rebuilding the entire world wide web" is one of the few projects that I'd imagine is _more_ difficult than "write a new web browser from scratch."
- whyme 13y agoWell the sooner we start the better. ;)
- angersock 13y agoWhy? What's the pain point here, beyond just wanting to reinvent a round-enough wheel?
- whyme 13y agoIt's not a case of the wheel needing to be round enough. The wheel is old and has not been able to keep pace. We have many people walking aside the wagon repairing the wheel at every turn. Those people are the current browsers. The wagon is the current technology and the people going along for the ride can see just how painful this is. Anyone who has attempted to implement trivial things, like thematic scrollbars or cross-browser capable code, or dealt with dom thrashing via JavaScript, knows the amount of effort going in (or knowledge required) to do trivial things is ridiculous; considering how long we've been travelling down this road. Why are we still using a wagon? And why do we want to build more of them running in parallel?
- coldtea 13y ago>Anyone who has attempted to implement trivial things, like thematic scrollbars or cross-browser capable code, or dealt with dom thrashing via JavaScript, knows the amount of effort going in (or knowledge required) to do trivial things is ridiculous That's true, but that's maybe for the better? In the sense that it leaves a place for desktop and native apps to thrive too. I would worry if the browsers was a great execution environment, that could even run Photoshop or Valve or Pro Tools, and every company went that route. It would mean total loss of data freedom (they would push you to have them in the "cloud"), and a rent-model for software purchases, with software being able to completely change under your feet (like Gmail did for example).
- revelation 13y agoMozilla seems like a post-capitalist non-profit for the benefit of bored programmers everywhere, sponsoring such useful work as "lets rewrite the browser". It's not yet another HTTP, HTML, CSS .. implementation that is needed, it's making these standards sane and fit for 2014.
- pcwalton 13y ago> Mozilla seems like a post-capitalist non-profit for the benefit of bored programmers everywhere, sponsoring such useful work as "lets rewrite the browser". Judging by the number of people who complain that their browsers are slow, it absolutely seems like useful work to me. > It's not yet another HTTP, HTML, CSS .. implementation that is needed, it's making these standards sane and fit for 2014. A quick search turns up dozens of standards that Mozilla is working on: https://www.google.com/search?q=w3+module+mozilla+corporation https://www.google.com/search?q=w3+module+mozilla+corporatio...
- checker659 13y agoAs far as I know (and people don't seem to talk about it all that much), the core of the browser is borrowed from a browser project called NetSurf (yes, there are others besides webkit / blink). So, technically, they're not really reimplementing HTML/CSS/HTTP/What-have-you.
- pcwalton 13y agoWe jettisoned most of the netsurf code a while ago. It was purely a stopgap measure. Only the HTML parser is still netsurf's and we're planning to rewrite it.
- checker659 13y agoMy bad. Sorry.
- lastontheboat 13y agoNope. I mean, the parser's from there, but we're replacing it. We wrote a CSS parser to replace the NetSurf one we used for a bit, and all the layout code is from scratch. There's a Rust library called rust-http providing us with networking.
- piyush_soni 13y agoI hope when they are rewriting the browser with modern architecture, they keep in mind the problems which kept this bug alive for more than 12 years now (while all other major browsers fixed it one by one), citing 'foundation' or architectural problems: https://bugzilla.mozilla.org/show_bug.cgi?id=78414 https://bugzilla.mozilla.org/show_bug.cgi?id=78414
- pcwalton 13y agoThere are currently no plans to support plugins, so that bug is not relevant to Servo.
- piyush_soni 13y agoYou mean that will again be an 'after thought'?
- fabrice_d 13y agoNo, we won't support plugins at all.
- yxhuvud 13y agoWill you support add ons?
- pcwalton 13y agoYes, we're thinking about how best to do it. This is the kind of thing where ideas are quite welcome :)
- piyush_soni 13y agoI hope there will be no concept of "not restartless" add-ons. ... Thanks :)
- pcwalton 13y ago
- jessedhillon 13y agoI cannot help but think of Joel Spolsky's article about reasons not to do a complete rewrite of your project -- a lesson he learned after finally shipping the long delayed rewrite of Netscape Navigator (progenitor to Mozilla) http://www.joelonsoftware.com/articles/fog0000000069.html http://www.joelonsoftware.com/articles/fog0000000069.html
- Ygg2 13y agoWhich is why this is a small project by few people and the community. Even IF it fails it's still a benefit as a data point. Rust people are reusing a lot of Mozilla software stack and plan to do auto conversion of C++ to Rust (where benefits are greatest).
- lastontheboat 13y ago>plan to do auto conversion of C++ to Rust This... is news to me? I'm pretty sure we have no such plans at all.
- Ygg2 13y agohttps://github.com/mozilla/servo/issues/1289 https://github.com/mozilla/servo/issues/1289 I think it was this issue that talked about porting using Java -> Rust and C++ -> Rust translator.
- lastontheboat 13y agoOh right, that's a special case. The Gecko HTML5 parser is already generated by a specially-targetted Java -> C++ translator. We want to use the same code and make it go Java -> Rust, that's all.
- Ygg2 13y agoThanks, didn't know that.
- 13y ago
- taeric 13y agoI can't help but question whether this will actually realize any improvements. What pages will actually be faster? By how much?
- pcwalton 13y agoWe have significant signs that this will improve performance on many pages. It would be too early to quote numbers, but you can run tests yourself if you're interested. See "Fast and Parallel Webpage Layout" for some early work by Leo Meyerovich at UC Berkeley: http://www.eecs.berkeley.edu/~lmeyerov/projects/pbrowser/pubfiles/playout.pdf http://www.eecs.berkeley.edu/~lmeyerov/projects/pbrowser/pub...
- taeric 13y agoThanks for the link! For running the tests, are you just saying to do this on servo? Is there a preferred "getting started" page out there?
- taeric 13y agoSo, the preferred "getting started" of just reading the README on the repo seems to be working out quite well, actually. Looking forward to having fun with this.
- TheZenPsycho 13y agoWhy are so many people here on HN so eager to throw away html/css/js, just because they're a little icky and you don't like to use them? Do you not realise that means throwing away the entire web, and its history going back to the early 1990's? Backwards compatibility and platform stability are GOOD THINGS that we need more, not less of. Lest we perpetually build content for doomed platforms, and leave no mark, no history on the world. the better course is evolution, not revolution. Mozilla has been through every revolution, first hand. They know what they're doing. edit: I'm flattered but please vote up the comments relevant to the actual post.
- protonfish 13y agoIn my opinion HTML/CSS/JavaScript is the best interface design technology ever invented. I believe it gets a lot of hate because: 1) Amateurs can use it easily and poorly 2) It is not taught in computer science class 3) HTML/CSS is not programming 4) HTML docs attempt to be responsive/liquid as opposed to traditional screen painters. These are actually good things (and #2 can be fixed) but they represent a significant philosophical shift that most traditional developers don't want to accept.
- goggles99 13y agoIf XAML some open source project made by some hippie group of developers, HTML/JAVASCRIPT/CSS would be in the toilet today. It is miles ahead of the barely moving technologies held back by the standards committees.
- mercurial 13y agoI'm not sure where you are going with that, but if you think you're going to convince millions of people to rewrite their websites because $NEW_TECH is now on the market, think again.
- CmonDev 13y agoHe is politely giving an example of a superior mark-up language. Just because developers are effectively forced to eat shit we shouldn't pretend it's a piece of a nice cake. Things like angu-bootstrap-whatever are just a thin layer of icing on the top of a big pile of manure.
- owenversteeg 13y agoI love how they capitalize iframe as iFrame :)
- smartistone 13y agoor maybe instead of re-inventing the web browser you include the most obvious, mundane features that other browsers already have like zoom-in/zoom-out dropdown menus. Firefox still has terrible usability
- gdiocarez 13y agoVery nostalgic!
- friendzis 13y ago> "It usually only had one core, clock speeds were lower and you had much less memory available to you," Yeah, right. Modern browsers already eat up several GIGS of memory, while super-advenced-zomg tablets boast of 2G. Most have 1G 80% of which is eaten by the system (and widgets, and other persistent stuff). But not caring about memory is hype. Because its future, technology, and, you know, Moore's law
- fulafel 13y agoIt doesn't mean that Servo would use more memory. Current browsers are doing things like multi-process to trade off memory for security and getting less safety in return than a memory-safe language would provide.