<?xml version="1.0" encoding="utf-8"?>
<data>
<r t="9.85">so i i'm martin robinson and i mean a gully and they work and what</r>
<r t="15.18">can</r>
<r t="16.11">and i</r>
<r t="18.04">so they wanna talk was it about the work we've been doing with like a</r>
<r t="21.42">G D K and especially i'm gonna focus on some practical things for people who</r>
<r t="28.5">in bed but okay</r>
<r t="30.52">some changes you'll have to make if you for your application directly to</r>
<r t="35.14">i just wanna say like to preface this talk by saying that for us to</r>
<r t="40.44">make a G T K this</r>
<r t="43.35">this table really celebrity was really a revolutionary step in the development of the library</r>
<r t="48.74">rather than on an evolutionary step really changed</r>
<r t="53.49">one of the characteristics of the library so</r>
<r t="56.43">we're actually really excited about it</r>
<r t="60.25">so i suppose there with a quick review for those of you who aren't</r>
<r t="64.92">intimately familiar with like it talk little bit about</r>
<r t="69.22">what is what it is for so</r>
<r t="72.5">what it is</r>
<r t="74.83">is what's referred to as a web content engine which basically means if you have</r>
<r t="78.87">a web browser everything inside</r>
<r t="81.73">inside the chrome in that little box</r>
<r t="84.2">is rented web content and that's what the libraries responsible for</r>
<r t="90.13">as well as some ways in which that content touches the outside world</r>
<r t="96.36">so right it processes in renders web content and processing includes both parsing the H</r>
<r t="102.58">T M L and the C S in rendering it as well as running the</r>
<r t="106.55">java script</r>
<r t="108.69">so</r>
<r t="110.22">it was started as a for kick H T M L and for a little</r>
<r t="114.18">while it was closed source but eventually with open source and two thousand five and</r>
<r t="120.56">on the page one of the goals of the project is actually that it's open</r>
<r t="124.56">source that it's</r>
<r t="126.43">this is usable and visible to everyone</r>
<r t="130.92">as well as these to sort of companion goals compatibility in compliance compatibility meaning that</r>
<r t="138.94">there's a lot of content on the web and that the engine should be able</r>
<r t="144.99">to render that content</r>
<r t="146.73">it shouldn't break websites that exist</r>
<r t="150.49">the actually the their criteria for breaking websites</r>
<r t="155.47">it has to be something very important and websites have to be a very small</r>
<r t="160.38">percentage of other sites on the internet for instance on the blink mailing list recently</r>
<r t="165.19">they were talking about removing the feature and the feature was use on something like</r>
<r t="169.31">point</r>
<r t="170.84">a percent of websites and some was like that's a lot</r>
<r t="174.88">and it is a lot when you have millions and millions of pages that's a</r>
<r t="178.86">lot of pages</r>
<r t="180.02">so the other part of this is compliance which means that the engine should be</r>
<r t="185.6">should be</r>
<r t="187.51">compliant with the specs</r>
<r t="190.34">and is a kind of a competing goals away because sometimes to be compatible with</r>
<r t="196.58">pages you need to not be compliant with the spec so it's always this kind</r>
<r t="202.25">of back and forth conversation we have</r>
<r t="205.66">obviously stability performance are important because the web browser should be fast and it shouldn't</r>
<r t="212.18">crash</r>
<r t="213.51">also security which all talk a little bit about more about the security issue is</r>
<r t="218.83">very important portability it should be written in a way that's that makes it useful</r>
<r t="223.81">a lot of systems not just a mac not just intel computer usability in package</r>
<r t="230.41">that would be and hack ability is really a statement about the quality of the</r>
<r t="234.75">code the code to be written in a way that's easily readable easily changeable</r>
<r t="240.41">it should be abstracted away and in the right amount not too much not to</r>
<r t="244.74">will just enough to make it easily hack able</r>
<r t="249.17">you never wanted to be a pain to have to go change the code to</r>
<r t="253.01">fix about</r>
<r t="254.72">any time there's a barrier in the way that means less bugs will be fixed</r>
<r t="258.93">and then they also stay on the website some non goals which is in some</r>
<r t="263.52">sense equally important because sometimes you shouldn't be turning this wiring tool for web browser</r>
<r t="272.99">it's not meant to be able web browser it's meant to be a component it's</r>
<r t="276.11">reusable inside webbrowsers</r>
<r t="278.78">so they need to be a dividing line between what features go in the library</r>
<r t="282.3">what features belong in the embedding application recline</r>
<r t="288.85">it's also not a science project it should be which means that it should be</r>
<r t="293.19">relevant to what exists in the world today it's made to render web content that</r>
<r t="297.49">exists it shouldn't necessarily be place to experiment with things the</r>
<r t="303.04">people will never user are important right now those things can be worked out in</r>
<r t="309.05">what you can meet them halfway</r>
<r t="312.55">the third thing here is it's not meant to be split into a bunch of</r>
<r t="318.35">reusable components which is kind of and sometimes in contrast work with going on because</r>
<r t="323.48">a lot of times in get home when we see that there's a piece of</r>
<r t="327.2">going on that's useful for a lot of other tools suisse you know split into</r>
<r t="330.32">a library and web get the fourth is a little different you know</r>
<r t="334.33">every time you split a something out to library there's some overhead and maintaining that</r>
<r t="338.4">you have more consumers</r>
<r t="339.99">so it's a little it's a little bit more</r>
<r t="343.16">i guess like of a hermit community you know where together working on this thing</r>
<r t="347.41">and</r>
<r t="348.77">you don't always wanna likes but also means we can</r>
<r t="353.72">right so another the interesting about what is it split into things called ports</r>
<r t="359.92">and</r>
<r t="361.6">you can kind of see what is going there's a T K pork important you</r>
<r t="364.6">know for a mac and windows for tutors on safari import so</r>
<r t="370.77">are essentially</r>
<r t="373.55">the common web get code which is most of the code is common</r>
<r t="377.55">in some layer at the bottom which abstracts away the platform</r>
<r t="382.44">for instance networking or how to draw to a campus</r>
<r t="387.37">how to talk to system</r>
<r t="390.45">and then that's at the bottom and then at the top is the api there</r>
<r t="394.65">the egg i layer is what the embedding application uses</r>
<r t="398.54">and way web "'cause" is design is the every and there is a little different</r>
<r t="402.25">so for instance for the wreckage indicate for</r>
<r t="405.87">in the problem later we use once you for networking use cover restoration opengl for</r>
<r t="410.81">making the scene raffles will talk more about later web gel injuries you refer media</r>
<r t="416.71">and what gets made in such a way that these components</r>
<r t="422.46">in most of the web get code are totally abstracted away</r>
<r t="425.69">into a wrapper classes that had the same semantics whether you're writing on a mac</r>
<r t="430.8">or on for G T K and anytime the semantics differs it's kind of like</r>
<r t="434.76">a little bug that needs to be fixed usually</r>
<r t="438.16">there's always a little tricky bits of getting the semantics of different platforms of to</r>
<r t="443.69">match up</r>
<r t="444.77">because a C G canvas core graphics isn't necessarily the same as a cover canvas</r>
<r t="449.54">for instance in cairo used or the path on the canvas but it's a little</r>
<r t="454.18">different in some other platforms</r>
<r t="457.36">so</r>
<r t="458.92">and then at the top of like a G D K there is the A</r>
<r t="462.76">P I later which is essentially a single a G T K widget the website</r>
<r t="467.43">web you that would you that is the browser went the window into the web</r>
<r t="472.42">content and some G I D K P Is around that</r>
<r t="478.12">and some of the consumers of repeated a game betters are epiphany but or you</r>
<r t="482.48">know that so maybe you're familiar with these is applications</r>
<r t="488.8">okay so here's an example of what i was talking about so this is a</r>
<r t="493.34">so simple by</r>
<r t="495.9">architecture diagram of what can and at the bottom there's this thing called the media</r>
<r t="503">which is essentially a little bit like booze</r>
<r t="506.2">it's like a</r>
<r t="509.27">i it wraps it makes it was a little nicer to use include some collections</r>
<r t="514.27">some platform abstractions abstracts away like threads</r>
<r t="518.13">and javascript for</r>
<r t="521.14">which is the javascript engine and these days another blankets for jobs to for is</r>
<r t="526.95">the only just in general it</r>
<r t="529.92">and sitting on top of that is</r>
<r t="532.67">so what for which includes a platform layer and the rest of web for and</r>
<r t="537.88">i'm separating those because again the platform layer are our classes that rap</r>
<r t="543.38">cairo for instance where is the rest of web for are</r>
<r t="550.62">is functionality that's common to all platforms</r>
<r t="554.26">like the functionality that takes</r>
<r t="556.39">a stream of data and parses out C S rules</r>
<r t="560.33">sitting on top of that is web kit</r>
<r t="563.98">which is</r>
<r t="567.36">how do i describe that a web get is sort of like</r>
<r t="570.8">the glue between web for</r>
<r t="574.61">and the browser</r>
<r t="576.66">so this includes the api layer but also includes some code for like</r>
<r t="583.44">handling different situations and sort of translating that into a pi concepts</r>
<r t="588.86">that's a little fuzzy but</r>
<r t="591.84">on top of that's it's the application</r>
<r t="596.14">and</r>
<r t="597.73">noticed it right now in this diagram again this is what get one these are</r>
<r t="601.3">all on the same process this is just a normal library</r>
<r t="608.98">so</r>
<r t="610.14">before i start talking about web get to i just wanna talk a little bit</r>
<r t="614.34">of a little bit about the motivation for what get to so some minor philosophical</r>
<r t="620.01">point</r>
<r t="621.56">which i think is what</r>
<r t="625.87">the thinking that drove the creation of chromium and draw the creation but get to</r>
<r t="633.39">and i</r>
<r t="635.18">means that this is the future of the way</r>
<r t="637.7">so</r>
<r t="639.37">code has about this they crash the program</r>
<r t="643.26">or just bucks</r>
<r t="644.68">all got has boats</r>
<r t="646.87">and colours bugs that allow arbitrary code execution</r>
<r t="651.5">which</r>
<r t="653.25">especially if</r>
<r t="654.98">that code includes</r>
<r t="658.77">a java script engine that's</r>
<r t="661.89">writing machine code into memory</r>
<r t="666.22">and not only just what happens cut has dependencies that have bugs</r>
<r t="670.95">so maybe you've written perfect code but you're using library like phone configure higher that</r>
<r t="679.35">has a bug</r>
<r t="681.07">one of these buttons</r>
<r t="683.67">and four point is even if everything was looking good live the your code the</r>
<r t="690.27">dependencies</r>
<r t="692.14">you're gonna be processing</r>
<r t="695.44">things from though from the world that you don't trust their like little programs france</r>
<r t="701.34">and images S V G images and these are all like small set of instructions</r>
<r t="707.66">that mean that the scope of the data your processing is why and in the</r>
<r t="713.98">the chance of writing a</r>
<r t="717.26">a font they can we can crash your browser actually i mean it's</r>
<r t="723.38">it's very hard to eliminate these problems</r>
<r t="726.52">so</r>
<r t="727.54">well it was a pragmatic response this</r>
<r t="729.94">i mean maybe you can say that</r>
<r t="733.18">that we're gonna work are gonna fix all the buttons in our browser so that</r>
<r t="737.22">it doesn't crash we're gonna eliminate these security issues</r>
<r t="740.46">but you also have them at the security issues in your dependencies you also have</r>
<r t="744.43">to work with sanitise in your input data which is very hard</r>
<r t="748.91">and</r>
<r t="750.44">instead we say yes that's keep working on fixing the crashes my browser but let's</r>
<r t="755.4">also say that if something goes wrong let's make sure that it doesn't</r>
<r t="760.64">we've our users vulnerable to attack</r>
<r t="763.78">so</r>
<r t="764.91">for instance when we talk about arbitrary code execution one thing to keep in mind</r>
<r t="770.33">is that</r>
<r t="772.71">is it these days web applications</r>
<r t="776.22">are our applications they're like</r>
<r t="780.28">they're like just up applications now and not only other like that stuff publications like</r>
<r t="784.76">you might be running you know angry birds in your browser and like i want</r>
<r t="787.76">side it is your banking information and maybe anger birds you know can reach over</r>
<r t="792.89">and touch your bank account</r>
<r t="794.63">and this isn't like a hypothetical situation this is this is things that actually happen</r>
<r t="799.48">so the web is huge remember</r>
<r t="804.91">so this is what we can do</r>
<r t="809.44">we can</r>
<r t="810.57">we can acknowledge at the web platform is huge in everyday it's getting bigger it's</r>
<r t="815.12">adding more functionality each and you add functionality add more chances for vulnerabilities for crashes</r>
<r t="823.21">and we can we can think of a way to make the crashes less</r>
<r t="826.91">inconvenient for users</r>
<r t="828.98">maybe instead of</r>
<r t="831.74">when the web rendering crashes it doesn't crash the browser we just crashes that's have</r>
<r t="837.36">or just crashes</r>
<r t="838.75">the web rendering part</r>
<r t="840.94">and we can prevent crashes from exposing</r>
<r t="844.95">crashes and screen doors from exposing data from outside the scope of the current page</r>
<r t="852.18">and the way we can get as we can put that data maybe</r>
<r t="855.59">in another address space words harder to get to put some more separation between the</r>
<r t="861.8">data of the different applications</r>
<r t="866.35">and we can also prevent bugs and crashes from damaging the system</r>
<r t="871.02">or executing arbitrary cut</r>
<r t="874.42">that's another name for sandbox</r>
<r t="877.48">so even if even if some paid crashes the browser you can try to that</r>
<r t="883.09">hard this</r>
<r t="884.81">because that process can try to the heart</r>
<r t="889.21">and finally even if we're not talking about a much just page are just talking</r>
<r t="893.18">about it a page that has a really heavy while</r>
<r t="897.12">it shouldn't prevent you from using other pages or clicking a menu it shouldn't prevent</r>
<r t="901.64">you from closing the browser to get away</r>
<r t="905.17">so this is a this is thinking that drives this because</r>
<r t="909.56">to be honest</r>
<r t="910.76">well get to and from in these are like very complicated architectures and</r>
<r t="916.94">and they deserve a good reason</r>
<r t="922.93">so this is the end result</r>
<r t="926.9">we can</r>
<r t="928.65">we can put each web rendering part into it's own process and have some pair</r>
<r t="933.53">process</r>
<r t="934.65">and we could to we call</r>
<r t="937.03">the web rendering process</r>
<r t="939.18">the web process we compare process they why process</r>
<r t="942.57">because the actual from of the browser is in this you are process</r>
<r t="949.65">and we can sandbox the web rendering</r>
<r t="952.54">because you know once you separate out the web are it's it doesn't need to</r>
<r t="956.37">write to the hard disk or even read from the hard disk</r>
<r t="959.85">and i'll talk a little bit more about</r>
<r t="964.14">how to make sam boxing easier later</r>
<r t="967.46">so this is sort of</r>
<r t="970.3">the first web could to architecture diagram a on the left you can see the</r>
<r t="974.62">older architecture diagram a little bit different but you see the api boundary was between</r>
<r t="980.48">the application with kit and here we have now two processes</r>
<r t="985.12">and the A P I is in the U I process but underneath that api</r>
<r t="990.66">it's talking the I P C the inter process communication to another process which has</r>
<r t="996.75">the rest of the library</r>
<r t="999.15">so even if this web trust what web process crashes it's not gonna be able</r>
<r t="1003.23">to crash the browser</r>
<r t="1006.26">or indeed read arbitrary information from the address space</r>
<r t="1011.49">of the U I process</r>
<r t="1014.78">and the foregoing are there any questions about this particular "'cause"</r>
<r t="1020.53">okay reasonable is it a pretty old concept of this point since programs around for</r>
<r t="1026.51">a few years</r>
<r t="1028.11">so to teach you details about what's inside which i think i put this here</r>
<r t="1033.96">to make it easier to understand the practical bits</r>
<r t="1038.06">but</r>
<r t="1040.55">essentially we have to process is now they need some way to communicate</r>
<r t="1046.53">and i said is what those ways into three distinct</r>
<r t="1051.88">one of the first is messaging so say D web process reads the browser title</r>
<r t="1059.8">and then it needs to tell you i process that i've read the title you</r>
<r t="1063.6">know change</r>
<r t="1064.9">the title bar to reflect that sends a message with some arguments the arguments in</r>
<r t="1069.94">the message or serialise into a chunk of data it sent across socket to the</r>
<r t="1074.97">other side</r>
<r t="1076.37">and then de serialise</r>
<r t="1078.99">interpreted</r>
<r t="1080.82">and there's also a shared memory which is used for sending big chunks of data</r>
<r t="1085.38">like the what processes finish rendering the page to an image and sends that it's</r>
<r t="1090.71">too big for this socket</r>
<r t="1093.35">it sounds that as a target sure and memory you are process we avoid making</r>
<r t="1098.84">unnecessary companies</r>
<r t="1101.11">and the third is a shared services which are different the czech memory because is</r>
<r t="1106.94">typically are on the gpu</r>
<r t="1109.7">the what processes put something on a gpu you know what's the send it to</r>
<r t="1112.92">the U I process without downloading the data from the gpu again</r>
<r t="1117.63">putting in shared memory in the real putting it</r>
<r t="1120.17">so for instance in</r>
<r t="1123.53">in the X eleven version of repeated okay we use X composite and next damage</r>
<r t="1127.96">sort of like we make a little window manager and we send these gpu services</r>
<r t="1136.08">to the you i process to run</r>
<r t="1144.23">and why do we have to do that that's because</r>
<r t="1149.4">web pages these days more are just asking graphs like colour sing graphs</r>
<r t="1157.33">for three main reasons the first is that we wanna prevent wanna prevent unnecessary redraw</r>
<r t="1163.02">say like some D of is moving animating on top of the rest of web</r>
<r t="1166.57">content only this dave is changing and maybe just only in the position so instead</r>
<r t="1171.34">of constant reread redrawing entire page what if we just stored all the different layers</r>
<r t="1176.12">of the page in the textures and just we can positive those textures on the</r>
<r t="1180.96">gpu again and you use actually really good a composite it turns out so</r>
<r t="1185.97">it it's quite fast you do of really and second thing is three C S</r>
<r t="1190.43">transforms the way those work usually is that they're done on the gpu with a</r>
<r t="1195.86">opengl and in so once you once you start doing work on the gpu it's</r>
<r t="1202.17">really expensive just stop in bring it back into main memory</r>
<r t="1206.97">only to re uploaded again so you can display it that's actually enough to kill</r>
<r t="1210.59">your frame right so</r>
<r t="1212.87">so it sort of a non starter to do that and the same with what</r>
<r t="1216.35">you know web G obviously is opengl which is on a gpu downloading and again</r>
<r t="1221.07">downing andrea pointing again will bring the frame rate below the</r>
<r t="1226.73">the limits of the human eye so</r>
<r t="1231.1">right so the way it works is that the scene graph is built in process</r>
<r t="1235.03">in the web process and web process</r>
<r t="1238.11">and what's the scene graph is there and all the rendering is there</r>
<r t="1243.03">you the composing there you need some way to send those results to do i</r>
<r t="1246.75">process and that's where X composite next damage comes and sort of like the way</r>
<r t="1251.87">a application does all the rendering insensitive the window manager</r>
<r t="1256.02">in the way this will work and lemon is probably that will use a</r>
<r t="1262.73">and embedded women composite</r>
<r t="1268.5">so working that</r>
<r t="1270.86">alright so that sort of</r>
<r t="1274.34">the high level overview of web get to and</r>
<r t="1280.16">in you know we end up inventing work in a few places so some if</r>
<r t="1285.54">you may be asking</r>
<r t="1288">should i pour my application to web get to if you use what could U</r>
<r t="1291.53">K or even any other port of work that and</r>
<r t="1294.61">the answer is yes</r>
<r t="1296.89">you should fortification with get to in fact</r>
<r t="1300.65">even if you don't think it'll be useful</r>
<r t="1303.94">the reason is</r>
<r t="1305.92">okay G K is moving in the maintenance moon</r>
<r t="1310.09">so</r>
<r t="1311.28">it turns out that it takes a lot of work to maintain a web chip</r>
<r t="1314.66">or so</r>
<r t="1316.22">when your team has to maintain to it's a bit harder</r>
<r t="1321.92">in addition</r>
<r t="1324.24">what did you think it work it won't be deprecated at some point because once</r>
<r t="1327.58">you start maintaining work it then you start wearing about security vulnerabilities and fixing bugs</r>
<r t="1335.07">so</r>
<r t="1337.06">the good thing about this is that web get to is a better api it's</r>
<r t="1341.53">richer it exposes more functionality it's more in line with other web to web reports</r>
<r t="1347.08">it just all around a better right guy because it's the second time around we</r>
<r t="1350.8">made an A P I so we got a lot better at it</r>
<r t="1355.75">and top of all that if you put your navigation web get to</r>
<r t="1359.69">without doing anything other importing it will be faster more responsive</r>
<r t="1364">when some random might kind then crashes</r>
<r t="1366.67">but it won't crash or application you can just we started it's very nice</r>
<r t="1373.69">alright</r>
<r t="1375.2">but it's not necessarily easy</r>
<r t="1379.45">for all use cases</r>
<r t="1382.78">some of the problems are that there's not yet up or to porting guide which</r>
<r t="1386.79">is the better shame</r>
<r t="1389.62">because we've and promising it for a while and we don't we have it yet</r>
<r t="1393.62">but</r>
<r t="1395.44">but there is really good A P I documentation</r>
<r t="1398.79">and the differences between the two basically boiled down to the second point which is</r>
<r t="1404.11">that before</r>
<r t="1406.96">before it made sense to do things synchronously so when you wanted to save the</r>
<r t="1411.27">page images away into the save is done</r>
<r t="1415.11">but in my pocket to that makes a little less sense because now you're</r>
<r t="1419.76">you're sending a message to the web process which again you don't necessarily trust anymore</r>
<r t="1426.03">you know we're starting to just trust things across a process boundary and instead of</r>
<r t="1431.65">waiting for maybe it's better to just</r>
<r t="1433.96">just send the request you know save the page and when you're done with that</r>
<r t="1438.49">let me know</r>
<r t="1439.92">and</r>
<r t="1441.23">what this means is a lot of it guys very synchronous now and they look</r>
<r t="1444.83">a little bit harder use you have to pass a callback</r>
<r t="1448.15">and use sort of G I O style</r>
<r t="1451.55">J O style is intrinsically i</r>
<r t="1456.98">so the really tricky bit is that if you were doing some sign a some</r>
<r t="1461.41">kind of deep integration with the web content you were interacting with the page changing</r>
<r t="1466.85">in real time then it becomes actually quite a bit trickier because before you could</r>
<r t="1473.79">actually reach down into the library and modify the actual down in memory</r>
<r t="1480.28">but now it's not in memory more it's and some other process</r>
<r t="1484.39">so some of the process you notice that we trust</r>
<r t="1488.22">so what you have to do is used one of these for techniques jetted script</r>
<r t="1494.88">source custom protocols you have to die down bindings are page axes</r>
<r t="1499.34">we the jesse api</r>
<r t="1503.5">so injected script source is a is essentially a and it and the web you</r>
<r t="1509.89">would you give it a string of javascript source</r>
<r t="1513.66">and you send that to the web process to be executed in the page content</r>
<r t="1517.29">in the page context</r>
<r t="1518.76">and the resulting javascript return value will be serialised and sent back to you</r>
<r t="1526.63">so you can imagine writing a small javascript program to walk</r>
<r t="1531.6">the elements of the page and do some processing maybe find</r>
<r t="1536.93">say the password field the kind of the pasture field in getting back a string</r>
<r t="1542.47">from we process</r>
<r t="1547.6">and that looks a bit like this</r>
<r t="1552.02">you call what but you run javascript</r>
<r t="1554.83">with the web you and then the string here is actually the</r>
<r t="1559.71">the script you're right</r>
<r t="1561.86">and then you get a callback pretty simple</r>
<r t="1565.45">and then the callback you call</r>
<r t="1567.77">but it would you run javascript finish like T I O again</r>
<r t="1571.95">and you get this</r>
<r t="1573.61">serialise return value and everything below that is getting the actual javascript core values from</r>
<r t="1582.22">the return value this is funky a J S A P I is are the</r>
<r t="1587.32">javascript for api this is like the A P I for touching the javascript engine</r>
<r t="1593.09">itself</r>
<r t="1597.13">but you can see that we're just converting this value into a string and then</r>
<r t="1600.46">converting that string into a C string it's a little bit of a of the</r>
<r t="1605.89">paying a bit verbose but</r>
<r t="1609.54">but really like other than this callback it's similar to what you would do before</r>
<r t="1617.65">so before talk about</r>
<r t="1620.45">a custom protocols so</r>
<r t="1623.9">maybe views are chromium before maybe and you type about</r>
<r t="1629.59">and you get a web page</r>
<r t="1631.88">and it's almost like instead of H diffusing this about protocol</r>
<r t="1636.65">and that's</r>
<r t="1637.81">exactly what custom particles are</r>
<r t="1641.59">it's that you're gonna grading with the networking library to add a new protocol</r>
<r t="1647.15">to the to the web engine</r>
<r t="1651.94">and not only can you can access pages by unloading them you can actually use</r>
<r t="1657.61">ajax</r>
<r t="1659.16">to interact with the with the U I process for instance you can</r>
<r t="1664.07">for instance we have a innovation we have a page about plug ins</r>
<r t="1668.8">and it's not there yet but eventually they'll be a button that says disable</r>
<r t="1673.07">and what that could do is you could send an ajax request</r>
<r t="1677.38">_2d protocol and when it gets that request it process it as if it was</r>
<r t="1681.32">a web server</r>
<r t="1682.63">again to disable the plug in without reloading the page</r>
<r t="1689.73">the big issue with this is that it's a web browser and it subject to</r>
<r t="1693.94">same origin security restrictions which essentially means that if you doing ajax promoting resources there</r>
<r t="1700.76">are restrictions for accessing resources in another</r>
<r t="1705.44">another</r>
<r t="1706.87">scheme postport triplet which means that if you try to access the cost this your</r>
<r t="1713.06">custom protocol</r>
<r t="1715.64">from a web page on a she's ep then it's not gonna work it's gonna</r>
<r t="1719.26">be a security but quite a security restrictions</r>
<r t="1724.42">don't disables</r>
<r t="1726.8">so this what this looks like now</r>
<r t="1730.78">again we're just sort of</r>
<r t="1733.42">registering this about protocol and again with just a callback</r>
<r t="1737.91">what happens here is that</r>
<r t="1740.66">is that we get the request and we can read the different properties of the</r>
<r t="1744.26">question the path</r>
<r t="1747.88">in here i'm just use in the past the printout a response i'm sending the</r>
<r t="1751.14">response back to the browser</r>
<r t="1754.6">as if i was a web server</r>
<r t="1766.29">so before talk about the other ones i wanna talk about web extensions</r>
<r t="1773.55">so what makes engines are essentially the way</r>
<r t="1777.56">that we've exposed some of the more common techniques of interacting with the page</r>
<r t="1783.54">in this multiprocessor environment</r>
<r t="1786.25">essentially it's the shared object that the web process finds it loads it it's own</r>
<r t="1790.62">address space</r>
<r t="1792.64">so</r>
<r t="1794.26">you don't have to do in the I P C really</r>
<r t="1797.15">if you just working inside the confines of the web extension</r>
<r t="1800.92">it's a bit like a plug and the loads in the web process</r>
<r t="1805.83">and so you can do things synchronously like walk through the dom and it won't</r>
<r t="1810.63">block the U I process at all we're not you are processed maybe doesn't even</r>
<r t="1814.42">know</r>
<r t="1816.86">and you have to worry about i the overhead of I P C or</r>
<r t="1821.92">or not</r>
<r t="1823.06">in is great because you have actual direct access to the dom objects just like</r>
<r t="1827.15">you did before</r>
<r t="1829.41">answer and on top of this</r>
<r t="1832.04">the sort of common idea of it injected bundle you something that web get to</r>
<r t="1836.53">exposes and all ports</r>
<r t="1841.82">sometimes it inside a web extension you want to communicate with the U I process</r>
<r t="1845.65">in which case you can just use D bus or whatever you went back</r>
<r t="1854.15">typically we use device</r>
<r t="1859.31">and this is that what that looks like so occur is a source file with</r>
<r t="1864.66">this web kit web extension initialize which is sort of like that you for the</r>
<r t="1869.67">name of the entry point to the to a shared object and what happens is</r>
<r t="1875.32">once we compile this new we shared object and set the extensions directory you'll find</r>
<r t="1880.71">the shared out we can load it and all this call this</r>
<r t="1883.94">this function</r>
<r t="1887.86">and</r>
<r t="1890.55">you can print but also you can</r>
<r t="1893.09">used G object on bindings</r>
<r t="1895.46">which</r>
<r t="1897">i guess i should probably explain is a little bit too if you're not familiar</r>
<r t="1900.36">with those</r>
<r t="1901.33">so essentially</r>
<r t="1903.29">there's the doll</r>
<r t="1905.02">and if you're familiar with web development you use the dom and javascript</r>
<r t="1911.37">to access the internal structure of the page so you can say like page give</r>
<r t="1916.58">me your</r>
<r t="1918.18">your dave's and you can look at all the did you can see their contents</r>
<r t="1921.37">you can see other properties or C S properties whatever</r>
<r t="1926.19">and that's</r>
<r t="1927.35">that's the javascript down bindings</r>
<r t="1930.82">what that means is that it exposes these you there's inside or see possible subjects</r>
<r t="1935.3">it exposes them to javascript</r>
<r t="1938.55">and likewise you've written G a breakdown bindings which means that you can walk the</r>
<r t="1942.55">dom with do you object</r>
<r t="1946.6">and that means you can walk the don't see or any other language it supports</r>
<r t="1950.87">geography introduction</r>
<r t="1952.84">which is quite nice</r>
<r t="1956.49">and unfortunately not of the dom is in another process we can just do that</r>
<r t="1960.71">from the from the you i process anymore we have to do it in the</r>
<r t="1964.56">web extension</r>
<r t="1966.76">and again we see the</r>
<r t="1970.01">web kit web extension initialize function which</r>
<r t="1975.09">in which we connect</r>
<r t="1976.69">to the page created signal of this extension object so page created is like</r>
<r t="1982.98">you open the browser to</r>
<r t="1985.98">and now we have a new browser time</r>
<r t="1988.59">here in the callback for page created we attach to the document what it signal</r>
<r t="1996.47">which</r>
<r t="1999.39">so what obviously fires when the document is finishes loading</r>
<r t="2003.7">and that point maybe we need a title using the exact same down binding it</r>
<r t="2011.86">pi so we had a market one</r>
<r t="2015.3">so if you more steps and we kind of get to feature parity with work</r>
<r t="2019.41">at one</r>
<r t="2021.15">so</r>
<r t="2022.94">so at this point we're waiting</r>
<r t="2025.07">the value of all those things i mentioned before</r>
<r t="2028.37">security stability not exposing users banking information to fishers and scammers versus like a couple</r>
<r t="2036.84">function calls and compound sure object</r>
<r t="2047.47">so finally the most flexible approach which will be unveiled global be and upcoming work</r>
<r t="2055.95">htk release</r>
<r t="2058.96">is that we can</r>
<r t="2061.58">we can use directly the javascript core api to interact with the page</r>
<r t="2066.31">and what this means is that not only can we walk the dom</r>
<r t="2070.42">but we can make a new javascript objects that are backed by native code say</r>
<r t="2075.05">like you make a new object in the page can actually interact with that object</r>
<r t="2079.2">for instance maybe you want to expose some system functionality</r>
<r t="2084.84">to the page</r>
<r t="2086.65">if you're making a hybrid application for instance and you want it to be able</r>
<r t="2090.45">to like put the screen to sleep</r>
<r t="2093.12">or maybe prevent the screen from sleeping if you want your video player application to</r>
<r t="2099.18">not a</r>
<r t="2100.76">some like at a simple it's</r>
<r t="2103.85">what's playing what video</r>
<r t="2105.97">what you can do is you can use this A P I to expose new</r>
<r t="2109.37">objects into the world of the page and have the page javascript interact with it</r>
<r t="2115.81">interact with the application</r>
<r t="2119.65">and as well is that you can just execute arbitrary javascript and the web process</r>
<r t="2127.85">for this you need to know the jobs to cory pi which isn't actually</r>
<r t="2132.91">so complicated but at some point we really like to be able to</r>
<r t="2138.01">just exposed you objects directly with see that that's a ways off</r>
<r t="2142.64">but</r>
<r t="2143.93">this is the most flexible approach and it's really like it if you really need</r>
<r t="2148.27">the interaction with the page you'll have to do this</r>
<r t="2155.02">our so that was a practical section i hope that it was useful for some</r>
<r t="2160.23">betters to sort of see what's involve important work it to and how about convince</r>
<r t="2165.56">use that it's worth it</r>
<r t="2169.32">and keep in mind that like this is not just what can stick at the</r>
<r t="2172.87">whole web this is beginning to look like this multiple processes</r>
<r t="2177.81">and it it's a</r>
<r t="2179">it's beginning to look like this because the web is beginning to look like an</r>
<r t="2182.19">operating system the web platforms getting to look like the application platform</r>
<r t="2188.02">and we already user browsers like this</r>
<r t="2190.95">i mean many of you probably keep</r>
<r t="2192.94">a web browser open all the time with one application running</r>
<r t="2196.37">i mean that's not different in keeping an application running in your window manager i</r>
<r t="2200.42">mean the distinction between web applications and applications is</r>
<r t="2204.3">is almost gone</r>
<r t="2206.82">i keep saying it but it's like a thirty happened</r>
<r t="2209.43">so</r>
<r t="2211.49">so what's gonna happen with get to in the future</r>
<r t="2215.67">given us the architecture diagram gets a little bit more complicated we have more processes</r>
<r t="2221.9">because we did it once in a work so when i keep doing it</r>
<r t="2225.56">and so we run out of</r>
<r t="2227.91">process handles</r>
<r t="2229.59">so</r>
<r t="2232.41">so what we have here is the not only do we have web processes we</r>
<r t="2235.93">have no word process worker process stored process</r>
<r t="2240.87">it seems first it seems like a little bit superfluous to be also is also</r>
<r t="2245.66">something like why so many different processes</r>
<r t="2247.98">but really it makes good sense</r>
<r t="2251.66">in fact</r>
<r t="2253.57">because</r>
<r t="2255.06">when you think about it</r>
<r t="2258.42">we really wanted to send box the web process</r>
<r t="2261.24">we didn't want it to be able to read the disk or</r>
<r t="2266.96">even access the network you know maybe</r>
<r t="2271.81">maybe it's dangerous to allow arbitrary code execution to talk to that work</r>
<r t="2279.15">and one interesting thing is that</r>
<r t="2281.83">the way make it to works now is when the web process crashes all your</r>
<r t="2286">times crash</r>
<r t="2287.65">and really it would be nice if it was like from in where when</r>
<r t="2291.68">attack crashed with just that time</r>
<r t="2294.26">so that means we need multiple web processes running</r>
<r t="2297.54">which means that they're all trying to talk to network which should be fine they</r>
<r t="2302.09">could do that separately but once they talk to the now to take all their</r>
<r t="2305.33">data and they try to put into the cash they try to the cookie store</r>
<r t="2311.76">and maybe that cookie store shared among different processes</r>
<r t="2315.91">which means that we start having like contention issues and we have to worry about</r>
<r t="2319.84">multiple writers multiple readers</r>
<r t="2322.17">so instead of handling all that we just split are all the networking all the</r>
<r t="2326.34">cookie storage into it on process and we have all these different processes talk to</r>
<r t="2330.82">this one or process</r>
<r t="2333.4">likewise</r>
<r t="2335.23">there are a pi is in the web platform</r>
<r t="2338.37">what if you actually that write to the disk</r>
<r t="2342.72">and if we sandbox the web process to laurie range of the desk and those</r>
<r t="2346.61">if you guys won't work</r>
<r t="2348.54">so instead of having that</r>
<r t="2351.52">capabilities write to the disk there with this possibly militias java script code we split</r>
<r t="2358.68">out</r>
<r t="2359.63">the disk access use worker process or starts is stored process</r>
<r t="2366.51">and the way that we want to think about like these process communications again is</r>
<r t="2370.08">that we just trust the process on the other side</r>
<r t="2373.72">we will have to cover is if</r>
<r t="2375.94">as if that process has already been compromise is it sending us the most people</r>
<r t="2379.72">message as possible</r>
<r t="2384.23">but that's a lot easier</r>
<r t="2387.04">then if there was no single point of communication between the processes there wasn't just</r>
<r t="2392.84">if we had to make a decision all the time like overseas just we're doing</r>
<r t="2396.21">I P C handle</r>
<r t="2400.42">a similar was talking about snow</r>
<r t="2404.53">we isolate applications from each other as well as really why</r>
<r t="2409.46">our and the</r>
<r t="2411.37">the web process regression all the taps just crash you know that one page</r>
<r t="2421.55">makes a marketing lot easier</r>
<r t="2425.02">the nice thing about this storage process is that this access is really slow so</r>
<r t="2431.12">there's always some walking going on if we if we always do that is increasing</r>
<r t="2435.8">in another process there's no issue with that</r>
<r t="2440.09">it could be a threat but then we couldn't it sandbox</r>
<r t="2444.6">and</r>
<r t="2446.94">that's a feature vector to and that was my talk so is there any questions</r>
<r t="2453.34">i can answer them now</r>
<r t="2463.57">probably</r>
</data>
