Servo: building a parallel web browser

Video thumbnail (Frame 0) Video thumbnail (Frame 1802) Video thumbnail (Frame 7578) Video thumbnail (Frame 8139) Video thumbnail (Frame 18289) Video thumbnail (Frame 27990) Video thumbnail (Frame 37165)
Video in TIB AV-Portal: Servo: building a parallel web browser

Formal Metadata

Servo: building a parallel web browser
Title of Series
CC Attribution 2.0 Belgium:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor.
Release Date

Content Metadata

Subject Area
Servo is a brand new browser engine being written by Mozilla Research, Samsung, and members of the Mozilla community. It's built in Rust, a new programming language created by Mozilla, and designed to take full advantage of modern hardware and security practices. Come learn about what sets Servo apart from the competition, and how you can contribute!
Module (mathematics) Group action Internet forum Projective plane HTTP cookie System call
Serial port Code Multiplication sign Decision theory Plotter Computer programming Web 2.0 Inference Mathematics Semiconductor memory Single-precision floating-point format Core dump Damping Information security Scripting language Covering space Programming language Constraint (mathematics) Touchscreen Parallel port Bit Flow separation Sequence Parsing Process (computing) Volumenvisualisierung Geometry Web page Point (geometry) Server (computing) Web browser Computer Wave packet Element (mathematics) Product (business) Revision control Operator (mathematics) Computer hardware Focus (optics) Projective plane Content (media) Exploit (computer security) Word Loop (music) Software Network topology Rewriting Family Resolvent formalism
Thread (computing) Multiplication sign Source code Mereology Fraction (mathematics) Mathematics Different (Kate Ryan album) Cuboid Social class Scripting language Programming language Channel capacity Closed set Moment (mathematics) Shared memory Parallel port Bit Flow separation Message passing Process (computing) Befehlsprozessor Order (biology) Video game console Quicksort Figurate number Resultant Geometry Web page Server (computing) Link (knot theory) Virtual machine Web browser Coprocessor Theory Element (mathematics) Power (physics) Operator (mathematics) Green's function Energy level Mathematical optimization Condition number Task (computing) Addition Content (media) Frame problem Personal digital assistant Network topology Abstraction Window
Suite (music) Concurrency (computer science) Code Multiplication sign Source code 1 (number) Mereology Web 2.0 Wiki Mathematics Semiconductor memory Different (Kate Ryan album) Synchronization Software framework Endliche Modelltheorie Information security Error message Position operator Vulnerability (computing) Social class Physical system Scripting language Overlay-Netz Area Programming language Email Software developer Binary code Electronic mailing list Parallel port Flow separation Category of being Type theory Process (computing) Freeware Resultant Writing Web page 9K33 Osa Service (economics) Link (knot theory) Computer file Control flow Web browser Computer Element (mathematics) Number Program slicing Software testing Form (programming) Task (computing) Addition Multiplication Inheritance (object-oriented programming) Forcing (mathematics) Projective plane Planning Exploit (computer security) Pointer (computer programming) Loop (music) Computer animation Web-Designer Personal digital assistant Network topology Iteration Family
Web page Point (geometry) Slide rule Web crawler Server (computing) Service (economics) 9K33 Osa Run time (program lifecycle phase) Divisor Link (knot theory) Code ACID Web browser Mereology Product (business) Wiki Web 2.0 Coefficient of determination Bit rate Matrix (mathematics) Software testing Computing platform User interface Programming language Standard deviation Software developer Projective plane Sound effect Interface (computing) Maxima and minima Process (computing) Computer animation Einbettung <Mathematik> Table (information) Window Writing
Point (geometry) Projective plane
a huge project many of the aliki because there is a very nice guy to present you that projects so just let users a medicine and you know who is walking on the rocks really a lot have different things including private browsing several and contribute to our engagement he's also Mozilla module P of geolocation cookie and private browsing call and is the creator our of but is always but tool that tells you to do your 1st dij this is really an incredible tool so you modern invited to move to try it how Angelo's also and I can testify an exceIlent musician he is sinking Forum group plays skittled around Germanic and also the top when the isn't busy doing inducing else so please is a welcome judge can thank you and thank you all for coming so until you about servo about renewing that and what it is and why it is an answer all your questions of and also tell you how you can get involved
so the 1st 1 is 0 so servo is a brand new browser engine and so a browser engine is something like blink or or Deco and so is that the whole browser assess the bit that renders the website executes the script and in particular server 0 is written in a new programming language that Mozilla is pretty from scratch called rust and we've been working on that for several years now is nearing version 1 . 0 the so servo is a new engine which is designed to exploit modern hardware um and and is designed to really focus on performance and safety i'll explain more about those particularly on that also we're trying to make it so it's really easy to embed we're going to build it behind the Web can combating API so theoretically you could just take any current browser that users WebKit and slot of several under the covers no just work as for what it will be in the future is still the same because technically is really a research project and is being worked on by the muscle research team of but we suspect that a good target forward would be some kind of more well product in the future so when when I tell people about servo and how we're trained new engine from scratch their outlook Milliken loaded crazy because building rather hot it turns out I but there are 2 reasons for this basically all the brothers that you used to using word designed before the year 2000 and hardware that time was very different usually only have 1 core and plots these very different you have much less memory available to you and so things like uh multithreaded programming were built in from the start then the beans are bolted on after the fact so the problem with existing inference is that there giant and there are various architectural decisions which are built into them which is very difficult to modify turned out so it's really hard to run experiments to find out whether it be worth committing to doing and by being rewrites to take advantage of our hardware because that's a huge investment for something that may not actually work so and so the 3rd point I won't talk about is that security and performance are hard and so you might like me is able it is hard warrior starting from scratch again but the we know the hard and we know this because there are protected exploits in every single rather engine every single year and that doesn't change and performance or there's a constant race to get a little bit faster than the other engines and but often you're working against the architectural constraints are imposed on you by the existing code so we think that we can do better on both security and performance if we built from the ground up with the understanding of the problems that we have from user experience so here's the basic modern browser architecture if you to better page you hit the network and then that feeds into the additional parser which passes it into a DOM tree which then gets computed into geometry and that just means you take the elements the page and you lay them out according to where they should be and you take the resolve that and you feed that into a renderer painted on the screen and once that happens then you want start executing JavaScript the jobs that can and can modify the page content to can append elements to on 3 and so then you need to recompute the geometry and so there's little loop here just keeps going back and forth now modern engines will often be able to do things like I do the actual painting the screen in parallel and so then you just have a loop between computing and executing but even still there's a lot of serial on sequential operations here which we believe we can do better but now you have engines like blank
which do things like have a different process as a that's 1 way of exploiting parallelism because I wait tabs can operate independently but even still this is still is still serial lines execution within each tab and again this is somewhere where we believe that several can improve on the state-of-the-art the so
here's the server architecture basically if you have a tab or you you will appeal and we create something called consolation and that's just a box that has like something that allows server to talk to something we call pipelines the pipeline this case is is like the serial execution they saw before
so a pipeline encapsulates a script task of the layout task and render a task and think task because the rest is a programming language that is built around and and abstraction that has like threads called tasks but it's sort of like green threads that means anything to you it's the threads that can make a little bit better using processor sometimes so In task is isolated so there's no shared memory between them and all message passing and so in this case the these boxes mean that the around the world will be operating in parallel With this the task and the past we operating in parallel the layout task and so these are all isolated from each other and they all get to run at their own speed so if you have a single page was just as 1 to content on it in the pipeline and all these things can can happen in parallel this a little bit of surrealist sterilization because obviously you need to have something laid out before even render it but after that then the if you do something like resize the window the then the layer can happen independently of painting your existing content as you get a much smoother experience way now so a little bit different because we can also break this down into iframes on page and so in in a in July blink will have an I frame and the contents of the I frame will have to be computed before the rest the page can be computed whereas in several this can happen in parallel sometimes so if you have a patent several with my friend we have a separate isolated renderer for that I frame which will do its own painting into the place on the page or the frame In all have your own separated isolated Layout Task which we computing the geometry for the iframe contents on and then the the overarching page containing frame will then discuss get the results of that and be able to let everything around the box without having to wait on it now is missing a script task here because this special case for I frames if you have an I frame which shares of origin with the enclosing page that means they're actually able to interact with each other and so is not safe to have their both their piece of script running simultaneously because then you get race conditions so in this case they'd be running at the only 1 I frame would be running script at a time but everything else is happening in parallel that the other architectural vanishes servo is that if you have a cross origin I frame for example an advertisement were always he knows we can we take advantage of the fact that those are not allowed to interact with the closing pages done so that means it can have its own script task so suddenly you have an an ad I frame which might be doing something really bad might be using more CPU then you prefer and so in some theory Firefox or blank that be a problem because they'll be interfering with the execution of the enclosing page the several that doesn't have to happen and in addition if something goes wrong in source code and we fail assertion what we can do in this case with this isolation is within hair down that I frame and display little unhappy face and rest the page can continue operating normally this is something other relevant and can do at the moment and in addition we get coarse parallelism just like any other rather because all this can replicated in his own isolated fashion for each tab so is pretty exciting so several is also experimenting with other really interesting research problems and in particular parallel layout is something that we think we can get big wins so regular layouts in any modern browser engine proceeds sequentially to start at the top and you'll need to go to each child element and later on the page figure out where they exist because of other things at the same level of required that knowledge in order to lay themselves and so there is optimizations that browsers do where they'll reach all over the DOM tree and try to find where other things are and see whether they actually care whether those those elements have been laid out and and if not then they can they can do optimizations to skip parts layout and this is how we achieve optimizations in modern rather engines now with several we think we know better we can do is we can break it down and for certain classes of web pages we say we don't actually need to care about the other parts of the page we know that we can lay out certain parts the tree but independently and so those can be farmed out to other processes and other isolated tasks and and in particular we really have to do some trees we can just split out individual children and and and use techniques like work stealing to make sure that all of your processes are always fully engaged in laying out a page from without without having to resort to sequential operations or have problems based on like really like 1 like if the left tree was really deepen the right tree wasn't around with work ceiling we can get up Will processor usage and so this journal layout some people look at it and say well most the time layout is only a really small fraction of overall time well when rendering a page and so parallel will make a big deal but that's not from mobile below well were often a local resource-constrained and have much fewer processes and so often takes maybe 10 times as long as desktop machine and so parallel in this case to make a very big advantage of and we can also get power benefits because 1 processor working at full capacity will take on will consume a lot more power then several processors working in mass-produced affect efficiency but operating this amount time and so we think that we can get much better battery life improvements of a browser lexical that has these improvements so and so the there was a discussion on the blink male was recently about whether they could implement parallel and link and after about secession they decided that it would be so far too big a change from indeed and 1 that the resources for something that did necessarily
promise to yield but the problem gains and so was slices several ways that we can actually guarantee or so we put in the effort to gentleman parallel necessary which on last week and we're now seeing performance improvements and were doing better than what gets on on some micro-benchmarks so critical somewhere where validating the ideas we had but part of the problem as I said is that with modern browser engines other not doing layout often they're reaching all over the DOM tree and that breaks the guarantees the parallelism needs which requires certain forms of isolation and knowledge that you don't you will never be modifying like certain parents and things like that and and so with with the browser and principles plus often that can be challenging to to rework the intent to make those guarantees and to keep those guarantees over time but we found in rest with that we can actually enforce guarantees from the start and using the type system sold at compile error if we ever try to write code which would break these guarantees for parallel so another interesting problem we're working on is concurrent script and layout so as I said before and this that loop where you running script and then modify the page 92 compute layout many Cubans script and this is this link that happens but often that isn't necessary to be synchronous like that often web developers are learning that synchronous layout is a bad thing as synchronous layout is when you make a change to lay out by setting like the left property of some element based on the based on the computed value of overlay property of any other of another element so this case we'll be getting the you bounding plan wrecked of some other element on page and that force is a related to occur because we need to get the precise position of that element before we can continue executing script so that breaks Our tempted concurrency and there's less of this all over the web but when developers are also starting to learn that this is bad and this hurts the performance so the frameworks for sure work around this and so we believe that if we can look for those cases where can where synchronous layout is not necessary in wikis are running script at the same time as layout and get very big wins that way the on the technical details that are basically that instead of directly modifying the Don that the same gun that the layout has to be reading uh we were just the script already mutating like certain copies of it when necessary which would then be would replace the original values ones layer finished so the 3rd really interesting area they were looking at and is different performance which were the previous ones so as I said security is really big everyone is a browser and therefore browser exploits are really good targets for security vulnerabilities and governments love security love them these are things where if you discover a vulnerability that no 1 else has made public at you have a weapon that no 1 else has so the feeling is that listen gecko a lot of security problems coming from C + + is unsafe memory model as lot of those are use for free areas and the iterated knowledge in problems where you iterating over some collection but then you might modify collection somewhere that causes the pointers decided become invalid and suddenly iterators are unsafe so rest not to trust me that rests basically eliminates a source errors we have ways of tracking What is a valid reference to something and tools that would be a compile error if you try to use a pointer which would or which could be unsafe and you can learn more about that is if you read the let the rest manual is pretty exciting stuff so by eliminating whole classes of areas that's exciting In addition we have cast isolation which is a shared the shared nothing so you don't have data is the and then it is really really simple to terrorists into a process isolation model for using tasks without having to actually modify the code of the brother itself and that gives us a whole different class of protection and then thinking well why not going further why not take and C code which we need for a certain performance reasons and thus run that insight of like a sandbox Nadel process you get like multiple layers protection Sirotkin can be as express ever so this really cool stuff happening as a servo is being developed by a very small team of muscle research engineers about 5 of us but there are a number of Mozilla community volunteers were doing really cool things up plus there are a team of research engineers and were working on this as well so is a fairly small team were getting a lot done and getting really good results and we love more people help us out it's a great way to learn a new and exciting language as a great way to really push at the cutting edge the web so there are ways that help you can learn how to write restaurant and then contribute to several by writing rest because everything in several almost everything that the dominant the layout the rendering all this is written in code and so there's there's a link there to be a servo issue tracker on Github which we have we have a tag called easy which is a great way to get started if you will learn a whole new language you can write JavaScript and CSS code because we have a test suite and with a slowly growing and were working to integrate the existing that we've received suite so it's also something that can interoperate with other browsers you can get nice multiple projects of helping those there so you can also just the download the service source code and build it and you can try things and see what breaks and file but that's really useful to us we don't have any binaries yet but they'll be coming in the coming quarter probably and finally just wanna keep abreast of what's happening so you can you can look at the mailing lists and it's is muzzle-loaded and surveilled but for the Mozilla Mozilla mailing lists it's on the list but if you wanna know what is the no the then
if you wanted something is really helpful this'll basely require a writing rescued then we're slowly working toward fixing the problems really training for the assets to acid 3 tests a standard tests of men were working to integrate the matrices test as the harness so there sir features of work of several which are missing which we need for those this 1 if we're to favor Donaghy I learned Russell process that's great yes I think what a fairly easy process these days monophonic members CSS features layer things we can work with you on that to so and this despite the wrong venue for it but if you really like Windows it doesn't run right now it doesn't build will also help with that this eventually like this 1 was they were going have to do eventually so that's 0 I'm happy answering questions about it you can find the slides the links of the link there as soon as we yeah and that would be in only and I've got some rusticus up front here if you want so laughter language have and without so on yeah come talk to me thank you left the of the microphones 1 run run the 2 questions firstly you said you can build it behind the wicket API for embedding uh is the wiki API of that is is that causing you problems that is to say the API it's useful for this kind of thing where the things you wish with different and secondly um or do you yet have a kind of timeline for when someone might be able to use us to browse the web and not go on must be using rust because lots of things from the the 1st was the 1st question again right but KPI and we have that much work in which is 1 those things were thinking of for like an engine project or maybe Summer of pooled perhaps thinking about it in it doesn't seem like it's insurmountable this point for the 2nd question which escape me over its timeline and so we're hoping by the end of the year to have a server B is a relatively usable of dog food in kind of way which is ambitious so the more people help us the more likely that will be the case but for an actual like product kind of thing the table in the 2 here's minimum like the something the thing to keep in mind Kenny speedup by taking big chances get and wrapping up in any Seattle and gave this stuff that isn't cool and RTC you'll eat and stuff like that right certain parts of echo yes are already doing that for example reusing spider monkey from deco but totally reason when it was also the graphics code but this a large parts a gecko which are really tied up in the whole gecko x becomes well it's a fiasco but so it's hard to integrate with rest that way and it and there's a question yes I get back the commonly used Doctor well below the yellow are paralyzing they really are ringing the layouts differently I denote any putting any criteria to the bread of are Lorelei but sometimes we correctly I would like to know if there is any adverse effect of death by because sometimes 1 and either rate of there's it's hard to say because we haven't done to what experimenting with that of but we have a delivery have code which can might look at that page and say OK this will require sequential a of this this can benefit from parallel stuff and the 1 race tools that will be able to the wheels like runs a 1 page and and see like the servo factor 2 so like this pages below by this amount because of service perilous federally that's being right the the somebody else the to how would this perform on our architecture that is only 1 CPU be with there be some of some the performance issue because it will not follow parallel running volatile that is a good question I I'm not 1 of these are course developers with a really good understanding of the runtime that enables these things I believe that they take this into consideration when developing a but I don't have any so thank you thank you but so what was and that I think pretty cool right now I'm Firefox for example is that we can render the user interface basically with same rendered uh as we we ring array pages uh of course this would probably will never 1 to support school answerable but uh do you see some chance of getting something like that is 0 as well that we can render the user-interface across platforms of ways serve was well I was actually play with a thought experiment this morning about like embedding within several to make the browser interface and I think like with the embedding API is like it should be a possibility to something like that that is where we are focusing on the like browser part were focusing on the engine allowing someone else to on no
prejudice the last 1 the the last 1 you what was the question was are you planning to create in you just couldn't everyone always talks about it as something that we really cool to do and after team can select like why not but not feasible this point with how the people that we have working on it really focusing on like that a simple things and after engine is pretty poor performance so we're trying to build on the things which are really good right now then can be fun project is Yankees them into the thank you thank you