<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Servicification on mariospr.org</title><link>https://mariospr.org/category/servicification/</link><description>Recent content in Servicification on mariospr.org</description><generator>Hugo</generator><language>en</language><lastBuildDate>Mon, 23 Dec 2019 23:13:01 +0000</lastBuildDate><atom:link href="https://mariospr.org/category/servicification/index.xml" rel="self" type="application/rss+xml"/><item><title>End of the year Update: 2019 edition</title><link>https://mariospr.org/2019/12/23/end-of-the-year-update-2019-edition/</link><pubDate>Mon, 23 Dec 2019 23:13:01 +0000</pubDate><guid isPermaLink="false">https://mariospr.org/?p=2770</guid><description>&lt;p&gt;It&amp;rsquo;s the end of December and it seems that yet another year has gone by, so I figured that I&amp;rsquo;d write an EOY update to summarize my main work at &lt;a href="https://www.igalia.com"&gt;Igalia&lt;/a&gt; as part of our &lt;a href="https://www.igalia.com/project/chromium"&gt;Chromium team&lt;/a&gt;, as my humble attempt to make up for the lack of posts in this blog during this year.&lt;/p&gt;
&lt;p&gt;I did quit a few things this year, but for the purpose of this blog post I&amp;rsquo;ll focus on what I consider the most relevant ones: work on the &lt;a href="https://www.chromium.org/servicification"&gt;Servicification&lt;/a&gt; and the &lt;a href="https://docs.google.com/document/d/13XsbaBz7A2H0PZIdFcytHf5-fVOlAfkLlIUKhxKzs44"&gt;Blink Onion Soup&lt;/a&gt; projects, the &lt;a href="https://docs.google.com/document/d/1Jwfbzbe8ozaoilhqj5mAPYbYGpgZCen_XAAAdwmyP1E"&gt;migration to the new Mojo APIs&lt;/a&gt; and the &lt;a href="https://docs.google.com/document/d/1e0qqv3ZGQYskE4XhtuGrYJeThjYXu8xozl7zIlwjSD0"&gt;BrowserInterfaceBroker&lt;/a&gt;, as well as a summary of the conferences I attended, both as a regular attendee and a speaker.&lt;/p&gt;</description><content:encoded><![CDATA[<p>It&rsquo;s the end of December and it seems that yet another year has gone by, so I figured that I&rsquo;d write an EOY update to summarize my main work at <a href="https://www.igalia.com">Igalia</a> as part of our <a href="https://www.igalia.com/project/chromium">Chromium team</a>, as my humble attempt to make up for the lack of posts in this blog during this year.</p>
<p>I did quit a few things this year, but for the purpose of this blog post I&rsquo;ll focus on what I consider the most relevant ones: work on the <a href="https://www.chromium.org/servicification">Servicification</a> and the <a href="https://docs.google.com/document/d/13XsbaBz7A2H0PZIdFcytHf5-fVOlAfkLlIUKhxKzs44">Blink Onion Soup</a> projects, the <a href="https://docs.google.com/document/d/1Jwfbzbe8ozaoilhqj5mAPYbYGpgZCen_XAAAdwmyP1E">migration to the new Mojo APIs</a> and the <a href="https://docs.google.com/document/d/1e0qqv3ZGQYskE4XhtuGrYJeThjYXu8xozl7zIlwjSD0">BrowserInterfaceBroker</a>, as well as a summary of the conferences I attended, both as a regular attendee and a speaker.</p>
<p>But enough of an introduction, let&rsquo;s dive now into the gory details&hellip;</p>
<h2>Servicification: migration to the Identity service</h2>
<a href="/wp-content/uploads/2019/01/chromium-s13n-layers-1.png"><img style="margin: 6px;" src="/wp-content/uploads/2019/12/chromium-s13n-layers_small-1.png" align="right" /></a>As explained in my <a href="/2019/01/29/working-on-the-chromium-servicification-project/">previous post from January</a>, I've started this year working on the <strong><a href="https://www.chromium.org/servicification">Chromium Servicification (s13n) Project</a></strong>. More specifically, I joined my team mates in helping with the migration to the <a href="https://chromium.googlesource.com/chromium/src/+/master/services/identity">Identity service</a> by updating consumers of several classes from the <a href="https://chromium.googlesource.com/chromium/src/+/master/components/signin">sign-in component</a> to ensure they now use the new <a href="https://source.chromium.org/chromium/chromium/src/+/master:components/signin/public/identity_manager/identity_manager.h">IdentityManager</a> API instead of directly accessing those other lower level APIs.
<p>This was important because at some point the <a href="https://chromium.googlesource.com/chromium/src/+/master/services/identity">Identity Service</a> will run in a separate process, and a precondition for that to happen is that all access to sign-in related functionality would have to go through the <a href="https://source.chromium.org/chromium/chromium/src/+/master:components/signin/public/identity_manager/identity_manager.h">IdentityManager</a>, so that other process can communicate with it directly via <a href="https://source.chromium.org/chromium/chromium/src/+/master:services/identity/public/mojom">Mojo interfaces exposed by the Identity service</a>.</p>
<p>I&rsquo;ve already talked long enough in my <a href="/2019/01/29/working-on-the-chromium-servicification-project/">previous post</a>, so please take a look in there if you want to know more details on what that work was exactly about.</p>
<h2>The Blink Onion Soup project</h2>
Interestingly enough, a bit after finishing up working on the <a href="https://chromium.googlesource.com/chromium/src/+/master/services/identity">Identity service</a>, our team dived deep into helping with another <a href="https://www.chromium.org/">Chromium project</a> that shared at least one of the goals of the s13n project: to improve the health of <a href="https://source.chromium.org/chromium/chromium/src">Chromium's massive codebase</a>. The project is code-named <strong>Blink Onion Soup</strong> and its main goal is, as described in the <a href="https://docs.google.com/document/d/13XsbaBz7A2H0PZIdFcytHf5-fVOlAfkLlIUKhxKzs44">original design document from 2015</a>, to <i>“simplify the codebase, empower developers to implement features that run faster, and remove hurdles for developers interfacing with the rest of the Chromium”</i>. There's also a <a href="https://docs.google.com/presentation/d/1Dpj4tpueCdne4MoRh6UOHrFTq3fdfz_yH5QGQInFCl4">nice slide deck from 2016's BlinkOn 6</a> that explains the idea in a more visual way, if you're interested.
<p style="text-align: center;"><a href="https://www.flickr.com/photos/29233640@N07/9585503388"><img src="/wp-content/uploads/2019/12/onionlayers_small.jpg" />
</a><small><a href="https://www.flickr.com/photos/29233640@N07/9585503388"><em>"Layers", by Robert Couse-Baker (CC BY 2.0)</em></a></small></p>
In a nutshell, the <strong>main idea</strong> is to <strong>simplify the codebase by removing/reducing the several layers of located between Chromium and Blink</strong> that were necessary back in the day, before Blink was forked out of WebKit, to support different embedders with their particular needs (e.g. Epiphany, Chromium, Safari...). Those layers made sense back then but these days Blink's only embedder is <a href="https://chromium.googlesource.com/chromium/src/+/HEAD/content/README.md">Chromium's content module</a>, which is the module that Chrome and other Chromium-based browsers embed to leverage Chromium's implementation of the <a href="https://webplatform.github.io/">Web Platform</a>, and also where the <a href="https://www.chromium.org/developers/design-documents/multi-process-architecture">multi-process</a> and <a href="https://www.chromium.org/developers/design-documents/process-models#TOC-Sandboxes-and-plug-ins">sandboxing</a> architecture is implemented.
<p>And in order to implement the <a href="https://www.chromium.org/developers/design-documents/multi-process-architecture">multi-process</a> model, the <a href="https://chromium.googlesource.com/chromium/src/+/HEAD/content/README.md">content module</a> is split in two main parts running in separate processes, which communicate among each other over IPC mechanisms: <a href="https://source.chromium.org/chromium/chromium/src/+/master:content/browser"><code>//content/browser</code></a>, which represents the &ldquo;browser process&rdquo; that you embed in your application via the <a href="https://chromium.googlesource.com/chromium/src/+/HEAD/content/public/README.md">Content API</a>, and <a href="https://source.chromium.org/chromium/chromium/src/+/master:content/renderer"><code>//content/renderer</code></a>, which represents the &ldquo;renderer process&rdquo; that internally runs the web engine&rsquo;s logic, that is, <a href="https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/">Blink</a>.</p>
<p>With this in mind, the <strong>initial version</strong> of the <strong>Blink Onion Soup</strong> project (aka <em><a href="https://docs.google.com/document/d/13XsbaBz7A2H0PZIdFcytHf5-fVOlAfkLlIUKhxKzs44">&ldquo;Onion Soup 1.0&rdquo;</a></em>) project was born about 4 years ago and the folks spearheading this proposal started working on a 3-way plan to implement their vision, which can be summarized as follows:</p>
<ol>
 	<li><strong>Migrate usage of <a href="https://www.chromium.org/developers/design-documents/inter-process-communication">Chromium's legacy IPC</a> to the new IPC</strong> mechanism called <strong><a href="https://chromium.googlesource.com/chromium/src/+/master/mojo/README.md">Mojo</a></strong>.</li>
 	<li><strong>Move</strong> as much <strong>functionality</strong> as possible <strong>from <a href="https://source.chromium.org/chromium/chromium/src/+/master:content/renderer"><code>//content/renderer</code></a></strong> down <strong>into <a href="https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink">Blink</a></strong> itself.</li>
 	<li><strong>Slim down <a href="https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/public/">Blink's public APIs</a> </strong>by removing classes/enums unused outside of <a href="https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink">Blink</a>.</li>
</ol>
Three clear steps, but definitely not easy ones as you can imagine. First of all, if we were to remove levels of indirection between <a href="https://source.chromium.org/chromium/chromium/src/+/master:content/renderer"><code>//content/renderer</code></a> and <a href="https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink">Blink</a> as well as to slim down <a href="https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/public/">Blink's public APIs</a> as much as possible, a precondition for that would be to allow direct communication between the browser process and <a href="https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink">Blink</a> itself, right?
<p>In other words, if you need your browser process to communicate with <a href="https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink">Blink</a> for some specific purpose (e.g. reacting in a visual way to a <a href="https://developers.google.com/web/fundamentals/push-notifications">Push Notification</a>), it would certainly be sub-optimal to have something like this:</p>
<p style="text-align: center;"><a href="/wp-content/uploads/2019/12/blogpost-legacyipc-1.png"><img src="/wp-content/uploads/2019/12/blogpost-legacyipc_small.png" /></a></p>
...and yet that is what would happen if we kept using <a href="https://www.chromium.org/developers/design-documents/inter-process-communication">Chromium's legacy IPC</a> which, unlike <a href="https://chromium.googlesource.com/chromium/src/+/master/mojo/README.md">Mojo</a>, doesn't allow us to communicate with Blink directly from <code><a href="https://source.chromium.org/chromium/chromium/src/+/master:content/browser">//content/browser</a></code>, meaning that we'd need to go first through <code><a href="https://source.chromium.org/chromium/chromium/src/+/master:content/renderer">//content/renderer</a></code> and then navigate through different layers to move between there and Blink itself.
<p>In contrast, using <a href="https://chromium.googlesource.com/chromium/src/+/master/mojo/README.md">Mojo</a> would allow us to have Blink implement those remote services internally and then <a href="https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/public/mojom">publicly declare the relevant Mojo interfaces</a> so that other processes can interact with them without going through extra layers. Thus, doing that <a href="https://chromium.googlesource.com/chromium/src.git/+/master/docs/mojo_ipc_conversion.md">kind of migration</a> would ultimately allow us to end up with something like this:</p>
<p style="text-align: center;"><a href="/wp-content/uploads/2019/12/blogpost-mojoipc.png"><img src="/wp-content/uploads/2019/12/blogpost-mojoipc_small.png" /></a></p>
...which looks nicer indeed, since now it is possible to communicate directly with Blink, where the remote service would be implemented (either in its core or in a module). Besides, it would no longer be necessary to consume Blink's public API from <a href="https://source.chromium.org/chromium/chromium/src/+/master:content/renderer"><code>//content/renderer</code></a>, nor the other way around, enabling us to remove some code.
<p>However, we can&rsquo;t simply ignore some stuff that lives in <a href="https://source.chromium.org/chromium/chromium/src/+/master:content/renderer"><code>//content/renderer</code></a> implementing part of the original logic so, before we can get to the lovely simplification shown above, we would likely need to move some logic from <a href="https://source.chromium.org/chromium/chromium/src/+/master:content/renderer"><code>//content/renderer</code></a> right into <a href="https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink">Blink</a>, which is what the second bullet point of the list above is about. Unfortunately, this is not always possible but, whenever it is an option, the job here would be to figure out what of that logic in <a href="https://source.chromium.org/chromium/chromium/src/+/master:content/renderer"><code>//content/renderer</code></a> is really needed and then figure out how to move it into Blink, likely removing some code along the way.</p>
<p>This particular step is what we commonly call <em>&ldquo;Onion Soup&rsquo;ing <code>//content/renderer/&lt;feature&gt;</code>&rdquo; </em>(not entirely sure &ldquo;Onion Soup&rdquo; is a verb in English, though&hellip;) and this is for instance how things looked before (left) and after (right) Onion Souping a feature I worked on myself: Chromium&rsquo;s implementation of the <a href="https://www.w3.org/TR/push-api/">Push API</a>:</p>
<p style="text-align: center;"><a href="/wp-content/uploads/2019/12/OS-PushMessaging.png"><img src="/wp-content/uploads/2019/12/OS-PushMessaging_small.png" /></a>
<small><em>Onion Soup'ing //content/renderer/push_messaging</em></small></p>
Note how the whole design got quite simplified moving from the left to the right side? Well, that's because some abstract classes declared in Blink's public API and implemented in <a href="https://source.chromium.org/chromium/chromium/src/+/master:content/renderer"><code>//content/renderer</code></a> (e.g. WebPushProvider, WebPushMessagingClient) are no longer needed now that those implementations got moved into Blink (i.e. PushProvider and PushMessagingClient), meaning that we can now finally remove them.
<p>Of course, there were also cases where we found some public APIs in Blink that were not used anywhere, as well as cases where they were only being used inside of Blink itself, perhaps because nobody noticed when that happened at some point in the past due to some other refactoring. In those cases the task was easier, as we would just remove them from the public API, if completely unused, or move them into Blink if still needed there, so that they are no longer exposed to a content module that no longer cares about that.</p>
<p>Now, trying to provide a <strong>high-level overview of what our team <em>&ldquo;Onion Soup&rsquo;ed&rdquo;</em> this year</strong>, I think I can say with confidence that we <strong>migrated</strong> (or helped migrate)<strong> more than 10 different modules</strong> like the one I mentioned above, such as <code>android/</code>, <code>appcache/</code>, <code>media/stream/</code>, <code>media/webrtc</code>, <code>push_messaging/</code> and <code>webdatabase/</code>, among others. You can see the full list with all the modules migrated during the lifetime of this project in the <a href="https://docs.google.com/spreadsheets/d/1VIINt17Dg2cJjPpoJ_HY3HI0uLpidql-1u8pBJtpbGk">spreadsheet tracking the Onion Soup efforts</a>.</p>
<p>In my particular case, I <em>&ldquo;Onion Soup&rsquo;ed&rdquo;</em> the <a href="https://bugs.chromium.org/p/chromium/issues/detail?id=939943">PushMessaging</a>,  <a href="https://bugs.chromium.org/p/chromium/issues/detail?id=933873">WebDatabase</a> and <a href="https://bugs.chromium.org/p/chromium/issues/detail?id=980151">SurroundingText</a> features, which was a fairly complete exercise as it involved working on all the 3 bullet points: <a href="https://chromium.googlesource.com/chromium/src.git/+/master/docs/mojo_ipc_conversion.md">migrating to Mojo</a>, moving logic from <a href="https://source.chromium.org/chromium/chromium/src/+/master:content/renderer"><code>//content/renderer</code></a> to Blink and removing unused classes from Blink&rsquo;s public API.</p>
<p>And <strong>as for slimming down Blink&rsquo;s public API</strong>, I can tell that we helped get to a point where <strong>more than 125 classes/enums were removed</strong> from that <a href="https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/public/">Blink&rsquo;s public APIs</a>, simplifying and reducing the Chromium code- base along the way, as you can check in <a href="https://docs.google.com/spreadsheets/d/1TBzERV4BAd9peJJrxvrVn1tZb-WrPb7iMFiRUqJ6crE">this other spreadsheet that tracked that particular piece of work</a>.</p>
<p>But we&rsquo;re not done yet! While <strong>overall progress for the Onion Soup 1.0 project</strong> is <strong>around 90%</strong> right now, there are still a few more modules that require <em>&ldquo;Onion Soup&rsquo;ing&rdquo;</em>, among which we&rsquo;ll be tackling <a href="https://source.chromium.org/chromium/chromium/src/+/master:content/renderer/media"><code>media/</code></a> (already WIP) and <a href="https://source.chromium.org/chromium/chromium/src/+/master:content/renderer/accessibility"><code>accessibility/</code></a> (starting in 2020), so there&rsquo;s quite some more work to be done on that regard.</p>
<p>Also, there is a newer design document for the so-called <a href="https://docs.google.com/document/d/1lzGeXN4nwnANdFSpVxmJ1TUgb3QBPFCjVxLsFVBlKdE"><strong>Onion Soup 2.0</strong></a> project that contains some tasks that we have been already working on for a while, such as &ldquo;Finish Onion Soup 1.0&rdquo;, &ldquo;Slim down Blink public APIs&rdquo;, &ldquo;Switch Mojo to new syntax&rdquo; and &ldquo;Convert legacy IPC in //content to Mojo&rdquo;, so definitely not done yet. Good news here, though: some of those tasks are already quite advanced already, and in the particular case of the migration to the new Mojo syntax it&rsquo;s nearly done by now, which is precisely what I&rsquo;m talking about next&hellip;</p>
<h2>Migration to the new Mojo APIs and the BrowserInterfaceBroker</h2>
Along with working on <em>"Onion Soup'ing"</em> some features, a big chunk of my time this year went also into this other task from the <a href="https://docs.google.com/document/d/1lzGeXN4nwnANdFSpVxmJ1TUgb3QBPFCjVxLsFVBlKdE"><strong>Onion Soup 2.0</strong></a> project, where I was lucky enough again not to be alone, but accompanied by several of my team mates from <a href="https://www.igalia.com">Igalia</a>'s Chromium team.
<p>This was a massive task where we worked hard to migrate <strong>all of Chromium&rsquo;s codebase</strong> to the new Mojo APIs that were introduced a few months back, with the idea of getting Blink updated first and then having everything else migrated by the end of the year.</p>
<p style="text-align: center;"><a href="/wp-content/uploads/2019/12/MojoMigrationsStats2019.png"><img src="/wp-content/uploads/2019/12/MojoMigrationsStats2019_small.png" /></a>
<small><em>Progress of migrations to the new Mojo syntax: June 1st - Dec 23rd, 2019</em></small></p>
But first things first: you might be wondering what was wrong with the "old" Mojo APIs since, after all, Mojo is the new thing we were migrating to from <a href="https://www.chromium.org/developers/design-documents/inter-process-communication">Chromium's legacy API</a>, right?
<p>Well, as it turns out, the previous APIs had a few problems that were causing some confusion due to not providing the most intuitive type names (e.g. what is an <a href="https://source.chromium.org/chromium/chromium/src/+/master:mojo/public/cpp/bindings/interface_ptr_info.h"><code>InterfacePtrInfo</code></a> anyway?), as well as being quite error-prone since the old types were not as strict as the new ones enforcing certain conditions that should not happen (e.g. trying to bind an already-bound endpoint shouldn&rsquo;t be allowed). In the <a href="https://docs.google.com/document/d/1Jwfbzbe8ozaoilhqj5mAPYbYGpgZCen_XAAAdwmyP1E">Mojo Bindings Conversion Cheatsheet</a> you can find an exhaustive list of cases that needed to be considered, in case you want to know more details about these type of migrations.</p>
<p>Now, as a consequence of this additional complexity, the task wouldn&rsquo;t be as simple as a &ldquo;search &amp; replace&rdquo; operation because, while moving from old to new code, it would often be necessary to fix situations where the old code was working fine just because it was relying on some constraints not being checked. And if you top that up with the fact that there were, literally, <strong>thousands of lines</strong> in the Chromium codebase using the old types, then you&rsquo;ll see why this was a massive task to take on.</p>
<p>Fortunately, after a few months of hard work done by our <a href="https://www.igalia.com/project/chromium">Chromium team</a>, we can proudly say that we have <strong>nearly finished this task</strong>, which involved<strong> more than 1100 patches landed upstream</strong> after combining the patches that migrated the types inside Blink (see <a href="https://bugs.chromium.org/p/chromium/issues/detail?id=978694">bug 978694</a>) with those that tackled the rest of the Chromium repository (see <a href="https://bugs.chromium.org/p/chromium/issues/detail?id=955171">bug 955171</a>).</p>
<p>And by &ldquo;nearly finished&rdquo; I mean an <strong>overall progress of 99.21%</strong> according to the <a href="https://docs.google.com/spreadsheets/d/1khYVrfnN74RSDqqXgCFlG9fI89IKWA9J32Ln_2ZcTaU">Migration to new mojo types spreadsheet</a> where we track this effort, where <strong style="font-size: 1rem;">Blink and //content have been fully migrated</strong>, and <strong>all the other directories</strong>, aggregated together, are at <strong>98.64%</strong>, not bad!</p>
<p>On this regard, I&rsquo;ve been also sending a bi-weekly status report mail to the <a href="https://groups.google.com/a/chromium.org/forum/#!forum/chromium-mojo">chromium-mojo</a> and <a href="https://groups.google.com/a/chromium.org/forum/#!forum/platform-architecture-dev">platform-architecture-dev</a> mailing lists for a while (see the <a href="https://groups.google.com/a/chromium.org/d/msg/chromium-mojo/kSVBn0Y6vQA/CiPtFMqEAgAJ">latest report here</a>), so make sure to subscribe there if you&rsquo;re interested, even though those reports might not last much longer!</p>
<p>Now, back with our feet on the ground, the main roadblock at the moment preventing us from reaching 100% is <a href="https://source.chromium.org/chromium/chromium/src/+/master:components/arc"><code>//components/arc</code></a>, whose migration needs to be agreed with the folks maintaining a copy of <a href="https://source.chromium.org/chromium/chromium/src/+/master:components/arc/mojom">Chromium&rsquo;s ARC mojo files</a> for Android and ChromeOS. This is currently under discussion (<a href="https://groups.google.com/a/chromium.org/d/msg/chromium-mojo/BRK0Xeu7bgQ/LWL2ELAOAwAJ">see chromium-mojo ML</a> and <a href="https://bugs.chromium.org/p/chromium/issues/detail?id=1035484">bug 1035484</a>) and so I&rsquo;m confident it will be something we&rsquo;ll hopefully be able to achieve early next year.</p>
<p>Finally, and still related to this Mojo migrations, my colleague <a href="https://blogs.igalia.com/mshin/">Shin</a> and I took a &ldquo;little detour&rdquo; while working on this migration and focused for a while in the more specific task of <strong><a href="https://docs.google.com/document/d/1e0qqv3ZGQYskE4XhtuGrYJeThjYXu8xozl7zIlwjSD0">migrating uses of Chromium&rsquo;s InterfaceProvider to the new BrowserInterfaceBroker class</a></strong>. And while this was not a task as massive as the other migration, it was also very important because, besides fixing some problems inherent to the old <a href="https://source.chromium.org/chromium/chromium/src/+/master:services/service_manager/public/cpp/interface_provider.h"><code>InterfaceProvider</code></a> API, it also blocked the migration to the new mojo types as <a href="https://source.chromium.org/chromium/chromium/src/+/master:services/service_manager/public/cpp/interface_provider.h"><code>InterfaceProvider</code></a> did usually rely on the old types!</p>
<p style="text-align: center;"><a href="https://docs.google.com/document/d/1e0qqv3ZGQYskE4XhtuGrYJeThjYXu8xozl7zIlwjSD0"><img src="/wp-content/uploads/2019/12/BrowserInterfaceBroker_small.png" /></a>
<a href="https://docs.google.com/document/d/1e0qqv3ZGQYskE4XhtuGrYJeThjYXu8xozl7zIlwjSD0"><small><em>Architecture of the BrowserInterfaceBroker</em></small></a></p>
Good news here as well, though: after having the two of us working on this task for a few weeks, we can proudly say that, today, <strong>we have finished all the 132 migrations</strong> that were needed and are now in the process of doing some after-the-job cleanup operations that will remove even more code from the repository! \o/
<h2>Attendance to conferences</h2>
This year was particularly busy for me in terms of conferences, as I did travel to a few events both as an attendee and a speaker. So, here's a summary about that as well:
<p><img style="margin: 6px;" src="/wp-content/uploads/2019/12/fosdem-2019_small.png" align="right" />As usual, I started the year attending one of my favourite conferences of the year by going to <strong><a href="https://archive.fosdem.org/2019/">FOSDEM 2019</a></strong> in Brussels. And even though I didn&rsquo;t have any talk to present in there, I did enjoy my visit like every year I go there. Being able to meet so many people and being able to attend such an impressive amount of interesting talks over the weekend while having some beers and chocolate is always great!</p>
<p>Next stop was Toronto, Canada, where I attended <strong><a href="https://docs.google.com/document/u/1/d/e/2PACX-1vTgBrqyQ4KCchsymvssri1pN1BkOg3sEqHThqhvFDl9-zl-hLx1S5c8sc5gaZ_VzKEVaYj94H3m1vso/pub">BlinkOn 10</a></strong> on April 9th &amp; 10th. I was honoured to have a chance to <a href="https://speakerdeck.com/mariospr/summary-of-igalias-contributions-to-chromium-in-the-past-year"><strong>present a summary of the contributions that Igalia</strong> <strong>made to the Chromium</strong></a> Open Source project in the 12 months before the event, which was a rewarding experience but also quite an intense one, because it was a lightning talk and I had to go through all the ~10 slides in a bit under 3 minutes! <strong><a href="https://speakerdeck.com/mariospr/summary-of-igalias-contributions-to-chromium-in-the-past-year">Slides are here</a></strong> and there is also a <strong><a href="https://www.youtube.com/watch?v=XZ08w8wIo3I">video of the talk</a>,</strong> in case you want to check how crazy that was.</p>
<p>Took a bit of a rest from conferences over the summer and then attended, also as usual, the <strong><a href="https://webengineshackfest.org/2019/">Web Engines Hackfest</a></strong> that we at <a href="https://www.igalia.com">Igalia</a> have been organising every single year since 2009. Didn&rsquo;t have a presentation this time, but still it was a blast to attend it once again as an Igalian and celebrate the hackfest&rsquo;s 10th anniversary sharing knowledge and experiences with the <a href="https://webengineshackfest.org/2019/#attendees">people who attended this year&rsquo;s edition</a>.</p>
<p><img style="margin: 6px;" src="/wp-content/uploads/2019/12/Chromium_logo_small.png" align="right" />Finally, I attended two conferences in the Bay Area by mid November: first one was the <strong><a href="https://developer.chrome.com/devsummit/">Chrome Dev Summit 2019</a></strong> in San Francisco on Nov 11-12, and the second one was <strong><a href="https://docs.google.com/document/u/2/d/e/2PACX-1vR9u7kNG0X5tkblbkBWc-lGtPj-E5i9eYbsocSeY6fwzg4qwf_Ajw-QPyFCtr-bXiWngmDtLaBJncd6/pub">BlinkOn 11</a></strong> in Sunnyvale on Nov 14-15. It was my first time at the <a href="https://developer.chrome.com/devsummit/">Chrome Dev Summit</a> and I have to say I was fairly impressed by the event, how it was organised and the quality of the talks in there. It was also great for me, as a browsers developer, to see first hand what are the things web developers are more &amp; less excited about, what&rsquo;s coming next&hellip; and to get to meet people I would have never had a chance to meet in other events.</p>
<p>As for <a href="https://docs.google.com/document/u/2/d/e/2PACX-1vR9u7kNG0X5tkblbkBWc-lGtPj-E5i9eYbsocSeY6fwzg4qwf_Ajw-QPyFCtr-bXiWngmDtLaBJncd6/pub">BlinkOn 11</a>, I presented a 30 min <strong><a href="https://speakerdeck.com/mariospr/improving-chromiums-code-health-onion-soup-and-beyond">talk about our work on the Onion Soup project, the Mojo migrations and improving Chromium&rsquo;s code health</a></strong> in general, along with my colleague <a href="https://blogs.igalia.com/tonikitoo">Antonio Gomes</a>. It was basically a &ldquo;extended&rdquo; version of this post where we went not only through the tasks I was personally involved with, but also talked about other tasks that other members of our team worked on during this year, which include way many other things! Feel free to check out the <a href="https://speakerdeck.com/mariospr/improving-chromiums-code-health-onion-soup-and-beyond"><strong>slides here</strong></a>, as well as the <strong><a href="https://youtu.be/0T-ZMW5PiDY">video of the talk</a></strong>.</p>
<h2>Wrapping Up</h2>
As you might have guessed, 2019 has been a pretty exciting and busy year for me work-wise, but the most interesting bit in my opinion is that what I mentioned here was just the tip of the iceberg... many other things happened in the personal side of things, starting with the fact that this was the year that we consolidated our return to Spain after 6 years living abroad, for instance.
<p>Also, and getting back to work-related stuff here again, this year I also became accepted back at <a href="https://www.igalia.com">Igalia</a>&rsquo;s Assembly after having <a href="/2018/08/03/on-moving/">re-joined this amazing company back in September 2018 after a 6-year &ldquo;gap&rdquo; living and working in the UK</a> which, besides being something I was very excited and happy about, also brought some more responsibilities onto my plate, as it&rsquo;s natural.</p>
<p>Last, I can&rsquo;t finish this post without being explicitly grateful for all the people I got to interact with during this year, both at work and outside, which made my life easier and nicer at so many different levels. To all of you,  cheers!</p>
<p>And to everyone else reading this&hellip; happy holidays and happy new year in advance!</p>
]]></content:encoded></item><item><title>Working on the Chromium Servicification Project</title><link>https://mariospr.org/2019/01/29/working-on-the-chromium-servicification-project/</link><pubDate>Tue, 29 Jan 2019 18:35:44 +0000</pubDate><guid isPermaLink="false">https://mariospr.org/?p=2660</guid><description>&lt;p&gt;&lt;a href="https://www.igalia.com/browsers-webkit-chromium"&gt;&lt;img class="alignright wp-image-2687" src="https://mariospr.org/wp-content/uploads/2019/01/igalia-chromium-logos-vertical-147x300.png" alt="Igalia &amp;amp; Chromium" width="108" height="220" /&gt;&lt;/a&gt;It's been a few months already since I (re)joined &lt;a href="https://www.igalia.com/"&gt;Igalia&lt;/a&gt; as part of its &lt;a href="https://www.igalia.com/browsers-webkit-chromium/"&gt;Chromium team&lt;/a&gt; and I couldn't be happier about it: right since the very first day, I felt perfectly integrated as part of the team that I'd be part of and quickly started making my way through the -fully upstream- project that would keep me busy during the following months: the &lt;strong&gt;&lt;a href="https://www.chromium.org/servicification"&gt;Chromium Servicification Project&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;But what is this "&lt;a href="https://www.chromium.org/servicification"&gt;Chromium servicification project&lt;/a&gt;"? Well, according to the &lt;a href="https://en.wiktionary.org/wiki/servicification"&gt;Wiktionary&lt;/a&gt; the word &lt;em&gt;"servicification"&lt;/em&gt; means, applied to computing, &lt;em&gt;"the migration from monolithic legacy applications to service-based components and solutions"&lt;/em&gt;, which is exactly what this project is about: as described in the &lt;a href="https://www.chromium.org/servicification"&gt;Chromium servicification project's website&lt;/a&gt;, the whole purpose behind this idea is &lt;em&gt;"to migrate the code base to a more modular, service-oriented architecture"&lt;/em&gt;, in order to &lt;em&gt;"produce reusable and decoupled components while also reducing duplication"&lt;/em&gt;.&lt;/p&gt;</description><content:encoded><![CDATA[<p><a href="https://www.igalia.com/browsers-webkit-chromium"><img class="alignright wp-image-2687" src="/wp-content/uploads/2019/01/igalia-chromium-logos-vertical-147x300.png" alt="Igalia &amp; Chromium" width="108" height="220" /></a>It's been a few months already since I (re)joined <a href="https://www.igalia.com/">Igalia</a> as part of its <a href="https://www.igalia.com/browsers-webkit-chromium/">Chromium team</a> and I couldn't be happier about it: right since the very first day, I felt perfectly integrated as part of the team that I'd be part of and quickly started making my way through the -fully upstream- project that would keep me busy during the following months: the <strong><a href="https://www.chromium.org/servicification">Chromium Servicification Project</a></strong>.</p>
<p>But what is this "<a href="https://www.chromium.org/servicification">Chromium servicification project</a>"? Well, according to the <a href="https://en.wiktionary.org/wiki/servicification">Wiktionary</a> the word <em>"servicification"</em> means, applied to computing, <em>"the migration from monolithic legacy applications to service-based components and solutions"</em>, which is exactly what this project is about: as described in the <a href="https://www.chromium.org/servicification">Chromium servicification project's website</a>, the whole purpose behind this idea is <em>"to migrate the code base to a more modular, service-oriented architecture"</em>, in order to <em>"produce reusable and decoupled components while also reducing duplication"</em>.</p>
<p>Doing so would not only make Chromium a more manageable project from a source code-related point of view and create better and more stable interfaces to embed chromium from different projects, but should also enable teams to experiment with new features by combining these services in different ways, as well as to ship different products based in Chromium without having to bundle the whole world just to provide a particular set of features. </p>
<p>For instance, as <a href="https://www.linkedin.com/in/camille-lamy-2506a459">Camille Lamy</a> put it in the <a href="https://www.youtube.com/watch?v=AHlZ_T74nOo">talk delivered</a> (<a href="https://webengineshackfest.org/2018/slides/servicification-modularizing-chromium-by-camille-lamy-colin-blundell-and-robert-kroeger.pdf">slides here</a>) during the <a href="https://webengineshackfest.org/2018/">latest Web Engines Hackfest</a>,  <em>"it might be interesting long term that the user only downloads the bits of the app they need so, for instance, if you have a very low-end phone, support for VR is probably not very useful for you"</em>. This is of course not the current status of things yet (right now everything is bundled into a big executable), but it's still a good way to visualise where this idea of moving to a services-oriented architecture should take us in the long run.</p>
<p><a href="/wp-content/uploads/2019/01/chromium-s13n-layers-1.png"><img class="size-medium wp-image-2711 alignright" src="/wp-content/uploads/2019/01/chromium-s13n-layers-1-269x300.png" alt="Chromium Servicification Layers" width="269" height="300" /></a></p>
<p>With this in mind, the idea behind this project would be to work on the migration of the different parts of Chromium depending on those components that are being converted into services, which would be part of a "foundation" base layer providing the core services that any application, framework or runtime build on top of chromium would need.</p>
<p>As you can imagine, the whole idea of refactoring such an enormous code base like Chromium's is daunting and a lot of work, especially considering that currently ongoing efforts can't simply be stopped just to perform this migration, and that is where our focus is currently aimed at: we integrate with different teams from the Chromium project working on the migration of those components into services, and we make sure that the clients of their old APIs move away from them and use the new services' APIs instead, while keeping everything running normally in the meantime.</p>
<p>At the beginning, we started working on the migration to the <a href="https://chromium.googlesource.com/chromium/src/+/master/services/network">Network Service</a> (which allows to run Chromium's network stack even without a browser) and managed to get it shipped in Chromium Beta by early October already, which was a pretty big deal as far as I understand. In my particular case, that stage was a very short ride since such migration was nearly done by the time I joined Igalia, but still something worth mentioning due to the impact it had in the project, for extra context.</p>
<p>After that, our team started working on the migration of the <a href="https://chromium.googlesource.com/chromium/src/+/master/services/identity">Identity service,</a> where the main idea is to encapsulate the functionality of accessing the user's identities right through this service, so that one day this logic can be run outside of the browser process. One interesting bit about this migration is that this particular functionality (largely implemented inside the <a href="https://chromium.googlesource.com/chromium/src/+/master/components/signin">sign-in component</a>) has historically been located quite high up in the stack, and yet it's now being pushed all the way down into that "foundation" base layer, as a core service. That's probably one of the factors contributing to making this migration quite complicated, but everyone involved is being very dedicated and has been very helpful so far, so I'm confident we'll get there in a reasonable time frame.</p>
<p>If you're curious enough, though, you can check this <a href="https://groups.google.com/a/chromium.org/forum/#!topic/identity-service-dev/c18zBMpaj-8">status report for the Identity service</a>, where you can see the evolution of this particular migration, along with the impact our team had since we started working on this part, back on early October. There are more reports and more information in the <a href="https://groups.google.com/a/chromium.org/forum/#!forum/identity-service-dev">mailing list for the Identity service</a>, so feel free to check it out and/or subscribe there if you like.</p>
<p>One clarification is needed, tough: for now, the scope of this migrations is focused on using the public C++ APIs that such services expose (see <code>//services/&lt;service_name&gt;/public/cpp</code>), but in the long run the idea is that those services will also provide <a href="https://chromium.googlesource.com/chromium/src/+/master/mojo/README.md">Mojo interfaces</a>. That will enable using their functionality regardless of whether you're running those services as part of the browser's process, or inside their own &amp; separate processes, which will then allow the flexibility that chromium will need to run smoothly and safely in different kind of environments, from the least constrained ones to others with a less favourable set of resources at their disposal.</p>
<p>And this is it for now, I think. I was really looking forward to writing a status update about what I've been up to in the past months and here it is, even though it's not the shortest of all reports.</p>
<div class="wp-block-image">
<figure class="alignright"><a href="https://fosdem.org"><img class="wp-image-2679" src="/wp-content/uploads/2019/01/fosdem-2019.png" alt="FOSDEM 2019" /></a></figure>
</div>
<p>One last thing, though: as usual, I'm <strong>going to <a href="https://fosdem.org/">FOSDEM</a></strong> this year as well, along with a bunch of colleagues &amp; friends from <a href="https://www.igalia.com/">Igalia</a>, so please feel free to drop me/us a line if you want to chat and/or hangout, either to talk about work-related matters or anything else really.</p>
<p>And, of course, I'd be also more than happy to talk about any of the <strong><a href="https://www.igalia.com/nc/about-us">open job positions at Igalia</a></strong>, should you consider applying. There are quite a few of them available at the moment for all kind of things (most of them available for remote work): from more technical roles such as <a href="https://www.igalia.com/nc/about-us/form/webkit-graphics-developer">graphics</a>, <a href="https://www.igalia.com/nc/about-us/form/compilers-developer">compilers</a>, <a href="https://www.igalia.com/nc/about-us/form/multimedia-developer">multimedia</a>, <a href="https://www.igalia.com/nc/about-us/form/javascript-engine-developer">JavaScript engines</a>, browsers (<a href="https://www.igalia.com/nc/about-us/form/webkit-developer">WebKit</a>, <a href="https://www.igalia.com/nc/about-us/form/chromium-developer">Chromium</a>, <a href="https://www.igalia.com/nc/about-us/form/web-platform-engineer">Web Platform</a>) or <a href="https://www.igalia.com/nc/about-us/form/senior-systems-administrator-galicia-spain">systems administration</a> (this one not available for remotes, though), to other less "hands-on" types of roles like <a href="https://www.igalia.com/nc/about-us/form/developer-advocate">developer advocate</a>, <a href="https://www.igalia.com/nc/about-us/form/sales-engineer">sales engineer</a> or <a href="https://www.igalia.com/nc/about-us/form/project-manager">project manager</a>, so it's possible there's something interesting for you if you're considering to join such an special company like this one.</p>
<p>See you in <strong><a href="https://fosdem.org/">FOSDEM</a></strong>!</p>
]]></content:encoded></item></channel></rss>