368 points · by dave1010uk · 13y ago · 140 comments
Samsung seems to believe in having the best performing devices and components, so it's not that surprising that they want to be at the forefront of the heterogeneous computing movement.
They also probably see themselves as a competitor against Intel, with both the ARM ISA that they support and the foundry that they own. In the next few years there will be a battle between HSA and Intel's Phi co-processor idea, and I think Samsung is one of the many who wants HSA to succeed (using computing power from all sorts of processors vs using only CPU's for everything).
http://www.samsung.com/global/business/semiconductor/aboutus...
What Android has done has shown the component manufacturers some ways to expand their markets outside "known" players. Part of the challenge of making a phone is getting the chip vendors willing to sign off on giving you software to run their chips (weird I know).
At the time I visited, circa 2.5 years back, they had (usually physically disparate) skyscrapers within their HQ complex for at least three or four different mobile platforms (Bada, Android, Windows Mobile, and something else I can't recall). Right now I'd assume they have some resources on FirefoxOS and Ubuntu, plus Android, maybe some other systems.
So it's nice to see some non-mozilla involvement and momentum in Rust/Servo. Maybe that means that an investment in learning/using Rust is that much less risky :)
[1] http://www.mail-archive.com/dev-servo@lists.mozilla.org/msg0...
That said, having an ARM backend to Rust on Android phones means big things for the potential of mobile web performance. I'm hopeful!
1) There is no uniform agreement about the state of Servo. Some are more optimistic than others.
2) There is a number of unknown unknowns here; that's what makes it a research project and makes it hard to roadmap. For example doing parallel layout of CSS involving floats is an actual research topic people are currently publishing papers on...
I'd rather see DOM-updating (e.g. via Javascript) in parallel to the rendering. Although, that already leads to problems since rendering changes to DOM as well.
Good for Mozilla for attempting hard problems in innovative ways.
https://github.com/mozilla/servo/wiki/Design
The goal is extremely pervasive concurrency in aspects that no modern engine has yet begun to approach (and likely could not approach without enormous effort and/or a full-on rewrite).
Wow
It is really hard to take seriously any project that has this kind of nonsense in its introduction.
HTML is a massive spec even before you step in and implement the HTML5 javascript APIs.
Then you also have to make sure that your rendering engine behaves in a sane way, supports all the obscure CSS rules from the spec and from webkit...
There's a reason Opera stopped playing this game; it's hard work.
- There are two types of elements: block and inline. You can declare a name of an element with a particular type using perhaps XML namespaces, or just a JSON object.
- Inline elements can be floated left/right along other inline elements.
- Block elements may be positioned absolutely inside their parent elements or relatively to their current position. You cannot float them.
- Width/height may be specified as a pixel width, percentage width of parent, percentage of available space, or percentage of screen size. Additionally, you may specify the box model: whether to include borders, margins, padding, etc.
- CSS rules about typography, margins, borders, padding, etc. shall apply. This way, you can include your own basic rules and build on top of them.
I had the misfortune to do a bit of hacking with GTK+ and at first thought "what an archaic way to lay out elements?!" Then it came to me that HTML + CSS is not advanced, it is cluttered. There are many ways to position an element on the page, and they will conflict. Additionally, things like opacity affecting z-index, having a parent element have a size to give the child element a percentage size, etc. lead to a ton of hacks. It's time we have a better, cleaner tool than the browser if we are going to build serious apps on this platform.
KHTML is a bit older (14 years).
But WebKit development started in 2001, about 12 years ago.
Safari, using WebKit, was released in Jan 2003, over 10 years ago.
So no, WebKit doesn't count as a browser engine started within the last 10 years. ;)
I am surprised that Samsung decide to help. Which basically reads to me as relationship with Google is going pretty bad or they are simply hedging their bet.
It was only earlier today I posted that Yahoo should also have a few engineers helping Mozilla to develop Servo.
And i really really hope Servo is licensed like Rust, Dual MIT + Apache 2.0
Note it's not mentioned exactly which division of Samsung they're working with; they may want Servo for Tizen, their Smart TVs, to ensure it plays nice with Exynos, or none of the above.
[EDIT: the post explicitly mentions porting Rust and Servo to Android and ARM; which rather strongly suggests the mobile group. Interesting, as FirefoxOS and Tizen are more or less aimed at the same markets]
Firefox is that already, the UI is XUL (that's one of the reasons why things like Firebug could exist as a plugin, when Chrome and Safari plugins are essentially glorified greasemonkey scripts). But you still need the core engine to run that javascript (and a bunch of other stuff) somehow, and one of the ideas behind Servo is that you could do so with much more concurrency and reactivity than is currently done.
Some further details about Servo and Rust can be found here: http://www.mozilla.org/en-US/research/projects/
For myself, I'm skeptical. There's really nothing "wrong enough" with Gecko or WebKit that I can see another option really being that much better. Developers love to rewrite stuff (obviously both Gecko and WebKit are already effectively rewrites of pre-existing technologies), but the market has a long history of not being nearly as enthused. But I'm willing to be proven wrong.
Actually your examples nullify your argument.
Mozilla would be dead today without Gecko, ie with the old Netscape code piled.
KHTML would have gone nowhere much if it wasn't for the Webkit rewrite.
So in both cases, it was the rewrites that made those engines break out.
The whole idea behind firefox OS is the "open web", all "apps" are standards-compliant javascript. App portability shouldn't be much of a problem.
We need to have more safe alternatives for systems programming.
I'm frequently reminded of the spokesperson for the old US Army game pointing out that the 40 million dev cost was ~ one 30 second spot during the superbowl.
Probably says more about how long I've been around but I think I've read a mostly similar paragraph 5 to 6 times over the last decade.
Edit: Also the original Netscape.
[1] http://en.wikipedia.org/wiki/History_of_Internet_Explorer
Dom funcions could have been generic ala C++ STL style for iteration restrictions
Isn't it more likely that lessons learned in Servo will simply be back-ported to C++ in Firefox?
The parallelism shown is still fairly coarse grained and amenable to traditional techniques. [...] If the redesign was using C/C++, they'd likely get the same benefits, just with uglier code.
I should hope so, Rust's parallelism is nothing new after all! (Okay, I know, you probably mean by writing programs using explicit mutexes and all that.) I really want to talk about the second part of the quote: what exactly are those benefits? I think you've excluded safety for some reason.
If Servo offers competitive performance I think it's most likely the whole engine will simply replace Gecko. I mean why would you spend the time and money to go from the safer to the less-safe code when you can use what you've got?
The traditional response to these kind of language imperfections is "better tests, better practices". Otherwise as, Unit Tests solve all problems. For C++, someone would say to use some set of abstractions or static analysis tools that confers additional safety that isn't available in the out-of-the-box language.
Language level support tends to encourage more consistent usage of something than just depending on vigilance.
My metapoint though, is that large code bases are hard to displace, especially if the enduser benefits can be achieved through iteration. Rewriting Gecko from scratch in Rust is a tall order, considering how long it took Gecko and WebKit to get to where they are now. It seems much more likely that WebKit/Gecko can be refactored to get most of the benefits in a much shorter period of time than a rewrite.
The security vulnerabilities found in all browser engines stemming from things like use-after-free suggest otherwise.
"For C++, someone would say to use some set of abstractions or static analysis tools that confers additional safety that isn't available in the out-of-the-box language."
It's really, really hard. The language works against you at all levels. Type systems are much easier ways to achieve the same result.
But it's not right to think of Rust as a safe C++ in the small, particularly because of the ban on shared mutable state. IIRC, Rust is partly a product of the difficulty C++ had in this area.
I don't think they're rewriting Gecko. If the transitive property holds, the code in Servo is at least as different from the code in Gecko as Rust is from C++, and I think that's only amplified in the design. Servo aims to do things that are not realistic for Gecko, like parallelizing more of its operations. I don't think they'd be going this far with Servo at this point if it wasn't for that, I think Gecko would just see the necessary changes and that would be it.
Either way, Servo exists. We're told it started as research, but it is obviously at the point where its promise is more concrete. When the lessons have been learned from Servo, it will be a complete, embeddable (this is one goal Gecko gave up on) engine. There's no sense in backporting its innards to the C++ engine when you can just drop it in place.
Usually, with high-risk long-term research projects, its fairly likely that the main benefit will be providing knowledge that can be applied to more conservative projects or to later high-risk, long-term projects.
OTOH, those insights often come from getting out of conservative boxes and trying something radical and new, and C++ is as much as part of the "box" Servo is trying to get out of as is the existing code base of particular browser engines.
Not with memory safety. Adding memory safety to C++ is incredibly difficult without sacrificing performance—think iterator invalidation.
They have been providing their own proprietary redundant solutions that overlap Google's software territory on mobile, for their own devices. This is just another step. And it gives them the opportunity to integrate with Mozilla to perhaps have a phone using their OS instead of Android in the far future.