SlideShare a Scribd company logo
1Samsung Open Source Group
How Servo Renders the Web
Adenilson Cavalcanti Msc.
Samsung Open Source Group
WebKit & Blink committer
W3C CSS WG member
2
MotivationMotivation
Rust and ServoRust and Servo
Concepts of Browser EnginesConcepts of Browser Engines
Servo High Level ArchitectureServo High Level Architecture
Anatomy of a CSS FeatureAnatomy of a CSS Feature
Summary
3Samsung Open Source Group
Motivation

All modern browser engines were
designed 15 years ago (KHTML, WebKit,
Gecko, Blink).

They fail to exploit full parallelism.

In both mobile and desktop more cores are
expected (but not faster CPUs).
4Samsung Open Source Group
Issues with Current Browser
Engines

Single-threaded

Javascript execution

Layout

Painting/rasterization

Security issues derived from C/C++

Huge code bases
5Samsung Open Source Group
Servo

New browser engine written in Rust

Parallel: layout, painting, selector matching

Targets performance and battery efficiency
6Samsung Open Source Group
Implementation Strategy

Rewrite layout, rendering, HTML/CSS
parsing, networking, core engine glue.

Reuse JavaScript engine, EME containers,
graphics library, fonts.

Bootstrap with OpenSSL, image libraries,
etc.
7Samsung Open Source Group
Servo Status

Over 120 CSS properties are supported

Rendering real sites nearly correct

Competitive to perf in benchmarks

2x-3x speedups on 4 cores
8Samsung Open Source Group
Rust
9Samsung Open Source Group
What is Rust?
https://www.youtube.com/watch?v=oKwub2OpsG4
10Samsung Open Source Group
The Case for Rust

It aims to solve some gruesome issues
with C/C++.

Be more expressive for hard tasks

Safety vs. performance: you can have
both!
11Samsung Open Source Group
Rust Features

Compiled language (uses llvm)

Memory safety

Concurrency

Parallelism
12Samsung Open Source Group
C++ vs. Rust
13
http://doc.rust-
lang.org/nightly/intro.html#ownership
C++ Example: Anything Wrong
Here?
Samsung Open Source Group
14
Run on Valgrind: Warnings
Samsung Open Source Group
15
Using gdb to Understand
What's Happening…
Samsung Open Source Group
16
AddressAddress
Address: 0x100103af0
Samsung Open Source Group
17
AddressAddress
Samsung Open Source Group
It Changed! 0x100103b10
18
Compiler warnings won’t catch it:
Ref Points to Old Address!
Samsung Open Source Group
19
Rust to the Rescue!
Samsung Open Source Group
20
Rust Stops Bugs From
Happening
Samsung Open Source Group
21Samsung Open Source Group

Ownership
– Exactly one variable “owns” an allocated value
– Ownership may be transferred (move)
– Ownership may be temporary (borrow)

Lifetime
– These variables’ scopes provide an upper bound on
how long that value lasts

Memory safety without overhead
– No garbage collector
– No SmartPointers
– No reference counting
22Samsung Open Source Group
Concepts of Browser
Engines
23
How a Browser Works…
Samsung Open Source Group
24
First OS
50 60 70 80 90 00 10 20
Books?
First
browser
OS books
time
Delay between a disruptive tech becoming widespread
and the textbooks being published
Reasons for Lack of Literature
Samsung Open Source Group
25
HTMLHTML
CSSCSS
JSJS
Loader /
Parser
Loader /
Parser
DOM
Tree
DOM
Tree
Script
Handler
Script
Handler
Browse
r
UI
Browse
r
UI
Layout* /
Renderin
g
Layout* /
Renderin
g
user-generated input
*Calculating layout is referred as Reflow (Gecko) or Attachment
(WebKit)
High Level Flow
Samsung Open Source Group
26
More details at: http://arxiv.org/abs/1505.07383
HTML
CSS
JS
DOM
Flow
Tree
Display
Lists
Layers
Final
Output
Parsing Styling
Layout
RenderingCompositing
ScriptScript
Servo High-Level Architecture
Samsung Open Source Group
27
ConstellationConstellation
RendererRenderer
LayoutLayoutScriptScript
Pipeline 1 (iframe 1)
RendererRenderer
LayoutLayoutScriptScript
Pipeline 2 (iframe 2)
Tab 1
RendererRenderer
LayoutLayoutScript
Pipeline 3 (iframe 3)
Servo Threading Architecture
Samsung Open Source Group
28Samsung Open Source Group
Servo Rendering Pipeline
Overview

Content (aka. Script):
– Creates and owns the DOM tree

Layout:
– Takes from content a snapshot of the DOM tree
– Calculates style (attachment), builds the flow tree
– Flow tree used to calculate the layout of nodes
– Layout of nodes used to build a display list
29Samsung Open Source Group
Servo Rendering Pipeline
Overview

Renderer:
– Receives a display list from layout
– Renders visible portions to one or more tiles in parallel

Compositor:
– Composites the tiles from the renderer
– Sends the final image to the screen for display
30Samsung Open Source Group
Blink/WebKit Differences

In Blink, layout will create a RenderTree
with RenderObjects that have geometric
information and know how to paint
themselves.

In Servo, layout will generate a FlowTree
and later DisplayLists are created from it.
31Samsung Open Source Group
Renderer and Compositor
●
Both the Renderer and Compositor are:
– Decoupled from Layout (separate threads)
– Designed for responsiveness
●
Compositor manages its memory.
– Screen is divided into a series of tiles:
– Rendered in parallel
– Required for mobile performance
●
Display lists are divided in sublists (i.e. stack
context):
– Contents can be retained on the GPU
– Rendered in parallel
32Samsung Open Source Group
Parallel Layout Challenges

HTML layout has complex dependencies:
– Inline element positioning
– Floating elements
– Vertical text
– Pagination

Each page is very different, making static
parallelism prediction difficult.
33
div
div
div
Queue
Parallel Layout
Samsung Open Source Group
34Samsung Open Source Group
Parallelism for Power Too

Force low-frequency CPU setting
– Above four cores, same end-to-end
performance as single core at high-
frequency
– BUT, 40% of the power usage
35
Parallelism Reduces Page
Appearance Time
Samsung Open Source Group
36Samsung Open Source Group
Servo Detailed Roadmap

https://github.com/servo/servo/wiki/Roadmap

Q2 2015
– Increase Servo quality - work on more sites
– Demonstrate superior end-to-end performance
– Mobile / embedded

2015
– Full Alpha-quality release
37Samsung Open Source Group
Contributions are Welcome!

Servo: github.com/mozilla/servo

Rust: github.com/mozilla/rust | rust-lang.org

#servo | #rust | #rust-internals @ irc.mozilla.org

dev-servo | rust-dev @ lists.mozilla.org

News: http://blog.servo.org/
38Samsung Open Source Group
Servo vs. Gecko: CNN
39Samsung Open Source Group
Servo vs. Gecko: Reddit
40Samsung Open Source Group
Thank You!

More Related Content

What's hot

The pathway to Chromium on Wayland (Web Engines Hackfest 2018)
The pathway to Chromium on Wayland (Web Engines Hackfest 2018)The pathway to Chromium on Wayland (Web Engines Hackfest 2018)
The pathway to Chromium on Wayland (Web Engines Hackfest 2018)
Igalia
 
HTML5 Apps on AGL Platform with the Web Application Manager (Automotive Grade...
HTML5 Apps on AGL Platform with the Web Application Manager (Automotive Grade...HTML5 Apps on AGL Platform with the Web Application Manager (Automotive Grade...
HTML5 Apps on AGL Platform with the Web Application Manager (Automotive Grade...
Igalia
 
Why You Should be Using Multi-stage Docker Builds in 2019
Why You Should be Using Multi-stage Docker Builds in 2019Why You Should be Using Multi-stage Docker Builds in 2019
Why You Should be Using Multi-stage Docker Builds in 2019
Codefresh
 
Aplicaciones en tiempo real con ReactJS y SignalR Core
Aplicaciones en tiempo real con ReactJS y SignalR CoreAplicaciones en tiempo real con ReactJS y SignalR Core
Aplicaciones en tiempo real con ReactJS y SignalR Core
Miguel Angel Teheran Garcia
 
Building a Modern JavaScript Framework by James Milner
Building a Modern JavaScript Framework by James MilnerBuilding a Modern JavaScript Framework by James Milner
Building a Modern JavaScript Framework by James Milner
dylanks
 
.NET Fest 2018. Martin Ullrich. MSBuild: Understand and Customize Your .NET B...
.NET Fest 2018. Martin Ullrich. MSBuild: Understand and Customize Your .NET B....NET Fest 2018. Martin Ullrich. MSBuild: Understand and Customize Your .NET B...
.NET Fest 2018. Martin Ullrich. MSBuild: Understand and Customize Your .NET B...
NETFest
 
Hw accelerated webkitgtk+ on raspberry pi
Hw accelerated webkitgtk+ on raspberry piHw accelerated webkitgtk+ on raspberry pi
Hw accelerated webkitgtk+ on raspberry pi
gnomekr
 
Financial Project with Spring WebFlux
Financial Project with Spring WebFluxFinancial Project with Spring WebFlux
Financial Project with Spring WebFlux
LINE Corporation
 

What's hot (8)

The pathway to Chromium on Wayland (Web Engines Hackfest 2018)
The pathway to Chromium on Wayland (Web Engines Hackfest 2018)The pathway to Chromium on Wayland (Web Engines Hackfest 2018)
The pathway to Chromium on Wayland (Web Engines Hackfest 2018)
 
HTML5 Apps on AGL Platform with the Web Application Manager (Automotive Grade...
HTML5 Apps on AGL Platform with the Web Application Manager (Automotive Grade...HTML5 Apps on AGL Platform with the Web Application Manager (Automotive Grade...
HTML5 Apps on AGL Platform with the Web Application Manager (Automotive Grade...
 
Why You Should be Using Multi-stage Docker Builds in 2019
Why You Should be Using Multi-stage Docker Builds in 2019Why You Should be Using Multi-stage Docker Builds in 2019
Why You Should be Using Multi-stage Docker Builds in 2019
 
Aplicaciones en tiempo real con ReactJS y SignalR Core
Aplicaciones en tiempo real con ReactJS y SignalR CoreAplicaciones en tiempo real con ReactJS y SignalR Core
Aplicaciones en tiempo real con ReactJS y SignalR Core
 
Building a Modern JavaScript Framework by James Milner
Building a Modern JavaScript Framework by James MilnerBuilding a Modern JavaScript Framework by James Milner
Building a Modern JavaScript Framework by James Milner
 
.NET Fest 2018. Martin Ullrich. MSBuild: Understand and Customize Your .NET B...
.NET Fest 2018. Martin Ullrich. MSBuild: Understand and Customize Your .NET B....NET Fest 2018. Martin Ullrich. MSBuild: Understand and Customize Your .NET B...
.NET Fest 2018. Martin Ullrich. MSBuild: Understand and Customize Your .NET B...
 
Hw accelerated webkitgtk+ on raspberry pi
Hw accelerated webkitgtk+ on raspberry piHw accelerated webkitgtk+ on raspberry pi
Hw accelerated webkitgtk+ on raspberry pi
 
Financial Project with Spring WebFlux
Financial Project with Spring WebFluxFinancial Project with Spring WebFlux
Financial Project with Spring WebFlux
 

Viewers also liked

Browsers. Magic is inside.
Browsers. Magic is inside.Browsers. Magic is inside.
Browsers. Magic is inside.
Devexperts
 
Firefox OS Graphics inside
Firefox OS Graphics insideFirefox OS Graphics inside
Firefox OS Graphics inside
Sotaro Ikeda
 
Optimizing Browser Rendering
Optimizing Browser RenderingOptimizing Browser Rendering
Optimizing Browser Rendering
michael.labriola
 
웹브라우저는 어떻게 동작하나?
웹브라우저는 어떻게 동작하나?웹브라우저는 어떻게 동작하나?
웹브라우저는 어떻게 동작하나?Joone Hur
 
How Browsers Work -By Tali Garsiel and Paul Irish
How Browsers Work -By Tali Garsiel and Paul IrishHow Browsers Work -By Tali Garsiel and Paul Irish
How Browsers Work -By Tali Garsiel and Paul Irish
Nagamurali Reddy
 
Web browser architecture
Web browser architectureWeb browser architecture
Web browser architecture
Nguyen Quang
 

Viewers also liked (6)

Browsers. Magic is inside.
Browsers. Magic is inside.Browsers. Magic is inside.
Browsers. Magic is inside.
 
Firefox OS Graphics inside
Firefox OS Graphics insideFirefox OS Graphics inside
Firefox OS Graphics inside
 
Optimizing Browser Rendering
Optimizing Browser RenderingOptimizing Browser Rendering
Optimizing Browser Rendering
 
웹브라우저는 어떻게 동작하나?
웹브라우저는 어떻게 동작하나?웹브라우저는 어떻게 동작하나?
웹브라우저는 어떻게 동작하나?
 
How Browsers Work -By Tali Garsiel and Paul Irish
How Browsers Work -By Tali Garsiel and Paul IrishHow Browsers Work -By Tali Garsiel and Paul Irish
How Browsers Work -By Tali Garsiel and Paul Irish
 
Web browser architecture
Web browser architectureWeb browser architecture
Web browser architecture
 

Similar to How Servo Renders the Web

EFL: Scaling From the Embedded World to the Desktop
EFL: Scaling From the Embedded World to the DesktopEFL: Scaling From the Embedded World to the Desktop
EFL: Scaling From the Embedded World to the Desktop
Samsung Open Source Group
 
#Webperf Choreography
#Webperf Choreography#Webperf Choreography
#Webperf Choreography
Harald Kirschner
 
How Servo Renders the Web
How Servo Renders the WebHow Servo Renders the Web
How Servo Renders the Web
Adenilson Cavalcanti
 
[D2 campus seminar]웹브라우저 엔진
[D2 campus seminar]웹브라우저 엔진[D2 campus seminar]웹브라우저 엔진
[D2 campus seminar]웹브라우저 엔진
NAVER D2
 
LAMP is so yesterday, MEAN is so tomorrow! :)
LAMP is so yesterday, MEAN is so tomorrow! :) LAMP is so yesterday, MEAN is so tomorrow! :)
LAMP is so yesterday, MEAN is so tomorrow! :)
Sascha Sambale
 
Android Chromium Rendering Pipeline
Android Chromium Rendering PipelineAndroid Chromium Rendering Pipeline
Android Chromium Rendering PipelineHyungwook Lee
 
Building high performing web pages
Building high performing web pagesBuilding high performing web pages
Building high performing web pages
Nilesh Bafna
 
Micro-Frontends JSVidCon
Micro-Frontends JSVidConMicro-Frontends JSVidCon
Micro-Frontends JSVidCon
Amir Zuker
 
Performance-driven front-end development
Performance-driven front-end developmentPerformance-driven front-end development
Performance-driven front-end development
youth Overturn
 
dan_labrecque_web_resume
dan_labrecque_web_resumedan_labrecque_web_resume
dan_labrecque_web_resume
Dan Labrecque
 
KharkivJS: Flaws of the Web Components in 2019 and how to address them
KharkivJS: Flaws of the Web Components in 2019 and how to address themKharkivJS: Flaws of the Web Components in 2019 and how to address them
KharkivJS: Flaws of the Web Components in 2019 and how to address them
Vlad Fedosov
 
Js foo - Sept 8 upload
Js foo - Sept 8 uploadJs foo - Sept 8 upload
Js foo - Sept 8 upload
Debnath Sinha
 
Quantum. Just Quantum
Quantum. Just QuantumQuantum. Just Quantum
Quantum. Just Quantum
ElifTech
 
Die Qual der Wahl bei den Single Page Application Frameworks
Die Qual der Wahl bei den Single Page Application FrameworksDie Qual der Wahl bei den Single Page Application Frameworks
Die Qual der Wahl bei den Single Page Application Frameworks
Jonas Bandi
 
Web (dis)assembly
Web (dis)assemblyWeb (dis)assembly
Web (dis)assembly
Shakacon
 
Webinar: Adobe Experience Manager Clustering Made Easy on MongoDB
Webinar: Adobe Experience Manager Clustering Made Easy on MongoDB Webinar: Adobe Experience Manager Clustering Made Easy on MongoDB
Webinar: Adobe Experience Manager Clustering Made Easy on MongoDB
MongoDB
 
Single Page Applications – Know The Ecosystem system
Single Page Applications – Know The Ecosystem systemSingle Page Applications – Know The Ecosystem system
Single Page Applications – Know The Ecosystem system
Synerzip
 
Seven Versions of One Web Application
Seven Versions of One Web ApplicationSeven Versions of One Web Application
Seven Versions of One Web Application
Yakov Fain
 
Client side performance compromises worth making
Client side performance compromises worth makingClient side performance compromises worth making
Client side performance compromises worth making
Cathy Lill
 
Introduction to CSS3
Introduction to CSS3Introduction to CSS3
Introduction to CSS3
Doris Chen
 

Similar to How Servo Renders the Web (20)

EFL: Scaling From the Embedded World to the Desktop
EFL: Scaling From the Embedded World to the DesktopEFL: Scaling From the Embedded World to the Desktop
EFL: Scaling From the Embedded World to the Desktop
 
#Webperf Choreography
#Webperf Choreography#Webperf Choreography
#Webperf Choreography
 
How Servo Renders the Web
How Servo Renders the WebHow Servo Renders the Web
How Servo Renders the Web
 
[D2 campus seminar]웹브라우저 엔진
[D2 campus seminar]웹브라우저 엔진[D2 campus seminar]웹브라우저 엔진
[D2 campus seminar]웹브라우저 엔진
 
LAMP is so yesterday, MEAN is so tomorrow! :)
LAMP is so yesterday, MEAN is so tomorrow! :) LAMP is so yesterday, MEAN is so tomorrow! :)
LAMP is so yesterday, MEAN is so tomorrow! :)
 
Android Chromium Rendering Pipeline
Android Chromium Rendering PipelineAndroid Chromium Rendering Pipeline
Android Chromium Rendering Pipeline
 
Building high performing web pages
Building high performing web pagesBuilding high performing web pages
Building high performing web pages
 
Micro-Frontends JSVidCon
Micro-Frontends JSVidConMicro-Frontends JSVidCon
Micro-Frontends JSVidCon
 
Performance-driven front-end development
Performance-driven front-end developmentPerformance-driven front-end development
Performance-driven front-end development
 
dan_labrecque_web_resume
dan_labrecque_web_resumedan_labrecque_web_resume
dan_labrecque_web_resume
 
KharkivJS: Flaws of the Web Components in 2019 and how to address them
KharkivJS: Flaws of the Web Components in 2019 and how to address themKharkivJS: Flaws of the Web Components in 2019 and how to address them
KharkivJS: Flaws of the Web Components in 2019 and how to address them
 
Js foo - Sept 8 upload
Js foo - Sept 8 uploadJs foo - Sept 8 upload
Js foo - Sept 8 upload
 
Quantum. Just Quantum
Quantum. Just QuantumQuantum. Just Quantum
Quantum. Just Quantum
 
Die Qual der Wahl bei den Single Page Application Frameworks
Die Qual der Wahl bei den Single Page Application FrameworksDie Qual der Wahl bei den Single Page Application Frameworks
Die Qual der Wahl bei den Single Page Application Frameworks
 
Web (dis)assembly
Web (dis)assemblyWeb (dis)assembly
Web (dis)assembly
 
Webinar: Adobe Experience Manager Clustering Made Easy on MongoDB
Webinar: Adobe Experience Manager Clustering Made Easy on MongoDB Webinar: Adobe Experience Manager Clustering Made Easy on MongoDB
Webinar: Adobe Experience Manager Clustering Made Easy on MongoDB
 
Single Page Applications – Know The Ecosystem system
Single Page Applications – Know The Ecosystem systemSingle Page Applications – Know The Ecosystem system
Single Page Applications – Know The Ecosystem system
 
Seven Versions of One Web Application
Seven Versions of One Web ApplicationSeven Versions of One Web Application
Seven Versions of One Web Application
 
Client side performance compromises worth making
Client side performance compromises worth makingClient side performance compromises worth making
Client side performance compromises worth making
 
Introduction to CSS3
Introduction to CSS3Introduction to CSS3
Introduction to CSS3
 

More from Samsung Open Source Group

The Complex IoT Equation (and FLOSS solutions)
The Complex IoT Equation (and FLOSS solutions)The Complex IoT Equation (and FLOSS solutions)
The Complex IoT Equation (and FLOSS solutions)
Samsung Open Source Group
 
Easy IoT with JavaScript
Easy IoT with JavaScriptEasy IoT with JavaScript
Easy IoT with JavaScript
Samsung Open Source Group
 
Spawny: A New Approach to Logins
Spawny: A New Approach to LoginsSpawny: A New Approach to Logins
Spawny: A New Approach to Logins
Samsung Open Source Group
 
Rapid SPi Device Driver Development over USB
Rapid SPi Device Driver Development over USBRapid SPi Device Driver Development over USB
Rapid SPi Device Driver Development over USB
Samsung Open Source Group
 
Tizen RT: A Lightweight RTOS Platform for Low-End IoT Devices
Tizen RT: A Lightweight RTOS Platform for Low-End IoT DevicesTizen RT: A Lightweight RTOS Platform for Low-End IoT Devices
Tizen RT: A Lightweight RTOS Platform for Low-End IoT Devices
Samsung Open Source Group
 
IoTivity: Smart Home to Automotive and Beyond
IoTivity: Smart Home to Automotive and BeyondIoTivity: Smart Home to Automotive and Beyond
IoTivity: Smart Home to Automotive and Beyond
Samsung Open Source Group
 
IoTivity for Automotive: meta-ocf-automotive tutorial
IoTivity for Automotive: meta-ocf-automotive tutorialIoTivity for Automotive: meta-ocf-automotive tutorial
IoTivity for Automotive: meta-ocf-automotive tutorial
Samsung Open Source Group
 
GENIVI + OCF Cooperation
GENIVI + OCF CooperationGENIVI + OCF Cooperation
GENIVI + OCF Cooperation
Samsung Open Source Group
 
Framework for IoT Interoperability
Framework for IoT InteroperabilityFramework for IoT Interoperability
Framework for IoT Interoperability
Samsung Open Source Group
 
Open Source Metrics to Inform Corporate Strategy
Open Source Metrics to Inform Corporate StrategyOpen Source Metrics to Inform Corporate Strategy
Open Source Metrics to Inform Corporate Strategy
Samsung Open Source Group
 
IoTivity for Automotive IoT Interoperability
IoTivity for Automotive IoT InteroperabilityIoTivity for Automotive IoT Interoperability
IoTivity for Automotive IoT Interoperability
Samsung Open Source Group
 
JerryScript: An ultra-lighteweight JavaScript Engine for the Internet of Thin...
JerryScript: An ultra-lighteweight JavaScript Engine for the Internet of Thin...JerryScript: An ultra-lighteweight JavaScript Engine for the Internet of Thin...
JerryScript: An ultra-lighteweight JavaScript Engine for the Internet of Thin...
Samsung Open Source Group
 
Adding IEEE 802.15.4 and 6LoWPAN to an Embedded Linux Device
Adding IEEE 802.15.4 and 6LoWPAN to an Embedded Linux DeviceAdding IEEE 802.15.4 and 6LoWPAN to an Embedded Linux Device
Adding IEEE 802.15.4 and 6LoWPAN to an Embedded Linux Device
Samsung Open Source Group
 
IoTivity: From Devices to the Cloud
IoTivity: From Devices to the CloudIoTivity: From Devices to the Cloud
IoTivity: From Devices to the Cloud
Samsung Open Source Group
 
SOSCON 2016 JerryScript
SOSCON 2016 JerryScriptSOSCON 2016 JerryScript
SOSCON 2016 JerryScript
Samsung Open Source Group
 
IoT: From Arduino Microcontrollers to Tizen Products using IoTivity
IoT: From Arduino Microcontrollers to Tizen Products using IoTivityIoT: From Arduino Microcontrollers to Tizen Products using IoTivity
IoT: From Arduino Microcontrollers to Tizen Products using IoTivity
Samsung Open Source Group
 
Run Your Own 6LoWPAN Based IoT Network
Run Your Own 6LoWPAN Based IoT NetworkRun Your Own 6LoWPAN Based IoT Network
Run Your Own 6LoWPAN Based IoT Network
Samsung Open Source Group
 
Practical Guide to Run an IEEE 802.15.4 Network with 6LoWPAN Under Linux
Practical Guide to Run an IEEE 802.15.4 Network with 6LoWPAN Under LinuxPractical Guide to Run an IEEE 802.15.4 Network with 6LoWPAN Under Linux
Practical Guide to Run an IEEE 802.15.4 Network with 6LoWPAN Under Linux
Samsung Open Source Group
 
IoTivity Tutorial: Prototyping IoT Devices on GNU/Linux
IoTivity Tutorial: Prototyping IoT Devices on GNU/LinuxIoTivity Tutorial: Prototyping IoT Devices on GNU/Linux
IoTivity Tutorial: Prototyping IoT Devices on GNU/Linux
Samsung Open Source Group
 
JerryScript: An ultra-lighteweight JavaScript Engine for the Internet of Things
JerryScript: An ultra-lighteweight JavaScript Engine for the Internet of ThingsJerryScript: An ultra-lighteweight JavaScript Engine for the Internet of Things
JerryScript: An ultra-lighteweight JavaScript Engine for the Internet of Things
Samsung Open Source Group
 

More from Samsung Open Source Group (20)

The Complex IoT Equation (and FLOSS solutions)
The Complex IoT Equation (and FLOSS solutions)The Complex IoT Equation (and FLOSS solutions)
The Complex IoT Equation (and FLOSS solutions)
 
Easy IoT with JavaScript
Easy IoT with JavaScriptEasy IoT with JavaScript
Easy IoT with JavaScript
 
Spawny: A New Approach to Logins
Spawny: A New Approach to LoginsSpawny: A New Approach to Logins
Spawny: A New Approach to Logins
 
Rapid SPi Device Driver Development over USB
Rapid SPi Device Driver Development over USBRapid SPi Device Driver Development over USB
Rapid SPi Device Driver Development over USB
 
Tizen RT: A Lightweight RTOS Platform for Low-End IoT Devices
Tizen RT: A Lightweight RTOS Platform for Low-End IoT DevicesTizen RT: A Lightweight RTOS Platform for Low-End IoT Devices
Tizen RT: A Lightweight RTOS Platform for Low-End IoT Devices
 
IoTivity: Smart Home to Automotive and Beyond
IoTivity: Smart Home to Automotive and BeyondIoTivity: Smart Home to Automotive and Beyond
IoTivity: Smart Home to Automotive and Beyond
 
IoTivity for Automotive: meta-ocf-automotive tutorial
IoTivity for Automotive: meta-ocf-automotive tutorialIoTivity for Automotive: meta-ocf-automotive tutorial
IoTivity for Automotive: meta-ocf-automotive tutorial
 
GENIVI + OCF Cooperation
GENIVI + OCF CooperationGENIVI + OCF Cooperation
GENIVI + OCF Cooperation
 
Framework for IoT Interoperability
Framework for IoT InteroperabilityFramework for IoT Interoperability
Framework for IoT Interoperability
 
Open Source Metrics to Inform Corporate Strategy
Open Source Metrics to Inform Corporate StrategyOpen Source Metrics to Inform Corporate Strategy
Open Source Metrics to Inform Corporate Strategy
 
IoTivity for Automotive IoT Interoperability
IoTivity for Automotive IoT InteroperabilityIoTivity for Automotive IoT Interoperability
IoTivity for Automotive IoT Interoperability
 
JerryScript: An ultra-lighteweight JavaScript Engine for the Internet of Thin...
JerryScript: An ultra-lighteweight JavaScript Engine for the Internet of Thin...JerryScript: An ultra-lighteweight JavaScript Engine for the Internet of Thin...
JerryScript: An ultra-lighteweight JavaScript Engine for the Internet of Thin...
 
Adding IEEE 802.15.4 and 6LoWPAN to an Embedded Linux Device
Adding IEEE 802.15.4 and 6LoWPAN to an Embedded Linux DeviceAdding IEEE 802.15.4 and 6LoWPAN to an Embedded Linux Device
Adding IEEE 802.15.4 and 6LoWPAN to an Embedded Linux Device
 
IoTivity: From Devices to the Cloud
IoTivity: From Devices to the CloudIoTivity: From Devices to the Cloud
IoTivity: From Devices to the Cloud
 
SOSCON 2016 JerryScript
SOSCON 2016 JerryScriptSOSCON 2016 JerryScript
SOSCON 2016 JerryScript
 
IoT: From Arduino Microcontrollers to Tizen Products using IoTivity
IoT: From Arduino Microcontrollers to Tizen Products using IoTivityIoT: From Arduino Microcontrollers to Tizen Products using IoTivity
IoT: From Arduino Microcontrollers to Tizen Products using IoTivity
 
Run Your Own 6LoWPAN Based IoT Network
Run Your Own 6LoWPAN Based IoT NetworkRun Your Own 6LoWPAN Based IoT Network
Run Your Own 6LoWPAN Based IoT Network
 
Practical Guide to Run an IEEE 802.15.4 Network with 6LoWPAN Under Linux
Practical Guide to Run an IEEE 802.15.4 Network with 6LoWPAN Under LinuxPractical Guide to Run an IEEE 802.15.4 Network with 6LoWPAN Under Linux
Practical Guide to Run an IEEE 802.15.4 Network with 6LoWPAN Under Linux
 
IoTivity Tutorial: Prototyping IoT Devices on GNU/Linux
IoTivity Tutorial: Prototyping IoT Devices on GNU/LinuxIoTivity Tutorial: Prototyping IoT Devices on GNU/Linux
IoTivity Tutorial: Prototyping IoT Devices on GNU/Linux
 
JerryScript: An ultra-lighteweight JavaScript Engine for the Internet of Things
JerryScript: An ultra-lighteweight JavaScript Engine for the Internet of ThingsJerryScript: An ultra-lighteweight JavaScript Engine for the Internet of Things
JerryScript: An ultra-lighteweight JavaScript Engine for the Internet of Things
 

Recently uploaded

RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Vladimir Iglovikov, Ph.D.
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
ThomasParaiso2
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 

Recently uploaded (20)

RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 

How Servo Renders the Web

  • 1. 1Samsung Open Source Group How Servo Renders the Web Adenilson Cavalcanti Msc. Samsung Open Source Group WebKit & Blink committer W3C CSS WG member
  • 2. 2 MotivationMotivation Rust and ServoRust and Servo Concepts of Browser EnginesConcepts of Browser Engines Servo High Level ArchitectureServo High Level Architecture Anatomy of a CSS FeatureAnatomy of a CSS Feature Summary
  • 3. 3Samsung Open Source Group Motivation  All modern browser engines were designed 15 years ago (KHTML, WebKit, Gecko, Blink).  They fail to exploit full parallelism.  In both mobile and desktop more cores are expected (but not faster CPUs).
  • 4. 4Samsung Open Source Group Issues with Current Browser Engines  Single-threaded  Javascript execution  Layout  Painting/rasterization  Security issues derived from C/C++  Huge code bases
  • 5. 5Samsung Open Source Group Servo  New browser engine written in Rust  Parallel: layout, painting, selector matching  Targets performance and battery efficiency
  • 6. 6Samsung Open Source Group Implementation Strategy  Rewrite layout, rendering, HTML/CSS parsing, networking, core engine glue.  Reuse JavaScript engine, EME containers, graphics library, fonts.  Bootstrap with OpenSSL, image libraries, etc.
  • 7. 7Samsung Open Source Group Servo Status  Over 120 CSS properties are supported  Rendering real sites nearly correct  Competitive to perf in benchmarks  2x-3x speedups on 4 cores
  • 8. 8Samsung Open Source Group Rust
  • 9. 9Samsung Open Source Group What is Rust? https://www.youtube.com/watch?v=oKwub2OpsG4
  • 10. 10Samsung Open Source Group The Case for Rust  It aims to solve some gruesome issues with C/C++.  Be more expressive for hard tasks  Safety vs. performance: you can have both!
  • 11. 11Samsung Open Source Group Rust Features  Compiled language (uses llvm)  Memory safety  Concurrency  Parallelism
  • 12. 12Samsung Open Source Group C++ vs. Rust
  • 14. 14 Run on Valgrind: Warnings Samsung Open Source Group
  • 15. 15 Using gdb to Understand What's Happening… Samsung Open Source Group
  • 17. 17 AddressAddress Samsung Open Source Group It Changed! 0x100103b10
  • 18. 18 Compiler warnings won’t catch it: Ref Points to Old Address! Samsung Open Source Group
  • 19. 19 Rust to the Rescue! Samsung Open Source Group
  • 20. 20 Rust Stops Bugs From Happening Samsung Open Source Group
  • 21. 21Samsung Open Source Group  Ownership – Exactly one variable “owns” an allocated value – Ownership may be transferred (move) – Ownership may be temporary (borrow)  Lifetime – These variables’ scopes provide an upper bound on how long that value lasts  Memory safety without overhead – No garbage collector – No SmartPointers – No reference counting
  • 22. 22Samsung Open Source Group Concepts of Browser Engines
  • 23. 23 How a Browser Works… Samsung Open Source Group
  • 24. 24 First OS 50 60 70 80 90 00 10 20 Books? First browser OS books time Delay between a disruptive tech becoming widespread and the textbooks being published Reasons for Lack of Literature Samsung Open Source Group
  • 25. 25 HTMLHTML CSSCSS JSJS Loader / Parser Loader / Parser DOM Tree DOM Tree Script Handler Script Handler Browse r UI Browse r UI Layout* / Renderin g Layout* / Renderin g user-generated input *Calculating layout is referred as Reflow (Gecko) or Attachment (WebKit) High Level Flow Samsung Open Source Group
  • 26. 26 More details at: http://arxiv.org/abs/1505.07383 HTML CSS JS DOM Flow Tree Display Lists Layers Final Output Parsing Styling Layout RenderingCompositing ScriptScript Servo High-Level Architecture Samsung Open Source Group
  • 27. 27 ConstellationConstellation RendererRenderer LayoutLayoutScriptScript Pipeline 1 (iframe 1) RendererRenderer LayoutLayoutScriptScript Pipeline 2 (iframe 2) Tab 1 RendererRenderer LayoutLayoutScript Pipeline 3 (iframe 3) Servo Threading Architecture Samsung Open Source Group
  • 28. 28Samsung Open Source Group Servo Rendering Pipeline Overview  Content (aka. Script): – Creates and owns the DOM tree  Layout: – Takes from content a snapshot of the DOM tree – Calculates style (attachment), builds the flow tree – Flow tree used to calculate the layout of nodes – Layout of nodes used to build a display list
  • 29. 29Samsung Open Source Group Servo Rendering Pipeline Overview  Renderer: – Receives a display list from layout – Renders visible portions to one or more tiles in parallel  Compositor: – Composites the tiles from the renderer – Sends the final image to the screen for display
  • 30. 30Samsung Open Source Group Blink/WebKit Differences  In Blink, layout will create a RenderTree with RenderObjects that have geometric information and know how to paint themselves.  In Servo, layout will generate a FlowTree and later DisplayLists are created from it.
  • 31. 31Samsung Open Source Group Renderer and Compositor ● Both the Renderer and Compositor are: – Decoupled from Layout (separate threads) – Designed for responsiveness ● Compositor manages its memory. – Screen is divided into a series of tiles: – Rendered in parallel – Required for mobile performance ● Display lists are divided in sublists (i.e. stack context): – Contents can be retained on the GPU – Rendered in parallel
  • 32. 32Samsung Open Source Group Parallel Layout Challenges  HTML layout has complex dependencies: – Inline element positioning – Floating elements – Vertical text – Pagination  Each page is very different, making static parallelism prediction difficult.
  • 34. 34Samsung Open Source Group Parallelism for Power Too  Force low-frequency CPU setting – Above four cores, same end-to-end performance as single core at high- frequency – BUT, 40% of the power usage
  • 35. 35 Parallelism Reduces Page Appearance Time Samsung Open Source Group
  • 36. 36Samsung Open Source Group Servo Detailed Roadmap  https://github.com/servo/servo/wiki/Roadmap  Q2 2015 – Increase Servo quality - work on more sites – Demonstrate superior end-to-end performance – Mobile / embedded  2015 – Full Alpha-quality release
  • 37. 37Samsung Open Source Group Contributions are Welcome!  Servo: github.com/mozilla/servo  Rust: github.com/mozilla/rust | rust-lang.org  #servo | #rust | #rust-internals @ irc.mozilla.org  dev-servo | rust-dev @ lists.mozilla.org  News: http://blog.servo.org/
  • 38. 38Samsung Open Source Group Servo vs. Gecko: CNN
  • 39. 39Samsung Open Source Group Servo vs. Gecko: Reddit
  • 40. 40Samsung Open Source Group Thank You!