SlideShare a Scribd company logo
STEALING CHROMIUM: EMBEDDING HTML5 
WITH THE SERVO BROWSER ENGINE 
Lars Bergstrom 
Mozilla Research 
Mike Blumenkrantz 
Samsung R&D America
Why a new web engine? 
• Support new types of applications and new 
devices 
• All modern browser engines (Safari, Firefox, 
Chrome) originally designed pre-2000 
• Coarse parallelism 
• Tightly coupled components 
• Vast majority of security issues are related to the 
C++ memory model
Servo 
•Written in a memory-safe 
systems language, Rust 
• Architected for 
parallelism 
• Coarse (per-tab), as in 
Chrome 
• Lightweight (intra-page), 
too 
• Designed for embedding
Rust - safe systems programming 
• C++ syntax and idioms 
• C++-like performance 
•Memory safety 
• Concurrency 
• Parallelism 
http://www.rust-lang.org
Familiar syntax and performance
Memory safety without overhead 
• Lifetimes and ownership ensure memory safety 
•No garbage collection 
•No reference counting 
•No C++ “smart” pointer classes
Example of code you can’t write
How a browser works 
HTML 
CSS 
JS 
Script & 
Interactions 
DOM Flow 
Tree 
Display 
Lists 
Script 
Layout Render 
Parsing 
More details: http://www.html5rocks.com/en/tutorials/internals/howbrowserswork/
How a browser works 
HTML 
CSS 
JS 
Script & 
Interactions 
DOM Flow 
Tree 
Display 
Lists 
Script 
Layout Render 
Parsing 
This works: 
<html> 
<script> 
document.write 
(“</script> 
<li>foo</li> 
</html> 
More details: http://www.html5rocks.com/en/tutorials/internals/howbrowserswork/
Timing breakdown 
Task Percentage 
Runtime libraries 25% 
Layout 22% 
Windowing 17% 
Script 16% 
Painting to screen 10% 
CSS styling 4% 
Other 6% 
Data from A Case for Parallelizing Web Pages. Mai, Tang, et. al. HOTPAR ‘12
Websites already partitioned
Servo’s architecture 
Constellation 
Pipeline 1 (iframe 1) 
Renderer 
Script Layout 
Tab 1
Servo’s architecture 
Tab 1 
Constellation 
Pipeline 1 (iframe 1) 
Renderer 
Script Layout 
Pipeline 2 (iframe 2) 
Renderer 
Script Layout
Servo’s architecture 
Tab 1 
Constellation 
Pipeline 1 (iframe 1) 
Renderer 
Script Layout 
Pipeline 2 (iframe 2) 
Renderer 
Script Layout 
Pipeline 3 (iframe 3) 
Renderer 
Script Layout
Demo: parallelism and sandboxing
Parallel layout 
•Matters hugely on mobile platforms 
• Processors run at lower frequencies, but many 
cores 
•Would enable more complicated pages on all 
platforms 
• Implemented by work-stealing algorithm 
See: Fast and Parallel Webpage Layout. Meyerovich and Bodik. WWW 2010.
Parallel layout 
body 
div div div 
text bold text text
Parallel layout 
body 
div div div 
text bold text text 
Queue 
div 
div 
div
Parallel layout challenges 
•HTML layout has complex dependencies 
• Inline element positioning 
• Floating elements 
• Vertical text 
• Pagination 
• Considering adding speculation
Layout: parallel speedups 
Time (ms) 
700 
525 
350 
175 
0 
High CPU Frequency Low CPU Frequency 
1 2 3 4 5 6 7 8 
Number of Threads
Total time with parallel layout 
Time (s) 
3.6 
2.7 
1.8 
0.9 
0 
High CPU Frequency Low CPU Frequency 
1 2 3 4 5 6 7 8 
Number of Threads
Total power with parallel layout 
Power (J) 
120 
90 
60 
30 
0 
High CPU Frequency Low CPU Frequency 
1 2 3 4 5 6 7 8 
Number of Threads 
Measurements by Laleh Beni, intern from University of California Irvine
Punchline: 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 
• Could also parallelize more 
• Rendering, CSS selector matching, etc.
From engine to browser 
• Servo just renders pages 
• Similar to the Blink and Gecko engines 
• Designed to work in many browser shells 
• Firefox OS, over interprocess communication 
(IPC) 
• Android, by implementing a Java wrapper 
•On the desktop with…
What is embedding? 
•Hosting web engine in native application
Why embed? 
• Reduced development 
time 
•HTML5 popularity
How not to embed 
•WebKit 
• Blink 
• Both suffer from an unstable API 
• Application developer choices: 
• Ship full browser engine with application 
• Continually update to match breakages
How to embed? 
• CEF: Chromium Embedded Framework 
• Isolates application developers from core API 
• C API with C++ extensions
Servo embedding strategy 
• Stable API/ABI 
• Extensive API testing is a plus 
• C-based 
• Flexible 
• Already designed
How to embed with Servo? 
• Use CEF API+ABI 
• Removes need for YA embedding API 
• Less competition, more coding 
• Allows easy testing between engines 
• Servo: the pragmatic embedding engine
Servo embedding methodology 
• Full symbol/ABI coverage 
• Every CEF function call resolves to a Servo function 
• Struct allocation sizes are identical 
typedef struct _cef_string_utf8_t { 
char* str; 
size_t length; 
void (*dtor)(char* str); 
} cef_string_utf8_t; 
!!!!! 
C 
pub struct cef_string_utf8 { 
pub str: *mut u8, 
pub length: size_t, 
pub dtor: extern “C” fn(str: *mut u8), 
} 
!!!!! 
Rust
Servo embedding development 
• Start with base set of symbols 
• `nm -u` on CEF applications 
• Track function execution 
• CEF <-> Blink <-> Application <-> CEF … 
•Mimic CEF behavior using Servo equivalents 
• Use preload hacks to test 
• LD_PRELOAD on Linux
Servo status 
• Pass some tests 
• ACID1, ACID2 
• Render basic web pages 
•Wikipedia, etc. 
• Focus on design + 
challenges 
• Parallelism, latency, 
power, memory
Servo roadmap 
• https://github.com/servo/servo/wiki/Roadmap 
• Q3 2014 
•Writing modes (vertical text) 
•DOM memory usage, perf, and features 
•Web Platform Tests & CSS Ref Tests 
• Q4 2014 
• Very basic dogfooding
Getting involved with Servo 
•www.github.com/servo/ 
servo/issues 
• Filter for “E-Easy” 
• irc.mozilla.org, #servo 
channel 
•Worldwide community 
• Looking for more 
partners and contributors 
• larsberg@mozilla.com

More Related Content

What's hot

Azure Templates for Consistent Deployment
Azure Templates for Consistent DeploymentAzure Templates for Consistent Deployment
Azure Templates for Consistent Deployment
José Maia
 
.NET no Browser - Webassembly com Blazor!
.NET no Browser - Webassembly com Blazor!.NET no Browser - Webassembly com Blazor!
.NET no Browser - Webassembly com Blazor!
Rodrigo Kono
 
The Need For Speed - NxtGen Cambridge
The Need For Speed - NxtGen CambridgeThe Need For Speed - NxtGen Cambridge
The Need For Speed - NxtGen CambridgePhil Pursglove
 
Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1Henry S
 
CBDW2014 - Down the RabbitMQ hole with ColdFusion
CBDW2014 - Down the RabbitMQ hole with ColdFusionCBDW2014 - Down the RabbitMQ hole with ColdFusion
CBDW2014 - Down the RabbitMQ hole with ColdFusion
Ortus Solutions, Corp
 
Node.js
Node.jsNode.js
Node.js
RTigger
 
From Web to Mobile with Stage 3D
From Web to Mobile with Stage 3DFrom Web to Mobile with Stage 3D
From Web to Mobile with Stage 3D
Jean-Philippe Doiron
 
Phoenix and the Plug-life
Phoenix and the Plug-lifePhoenix and the Plug-life
Phoenix and the Plug-life
devmyndmichael
 
The Python in the Apple
The Python in the AppleThe Python in the Apple
The Python in the Apple
zeroSteiner
 
Ruby Setup
Ruby SetupRuby Setup
Ruby Setup
Alan Hecht
 
Merging two big Symfony based applications - SymfonyCon 2017
Merging two big Symfony based applications - SymfonyCon 2017Merging two big Symfony based applications - SymfonyCon 2017
Merging two big Symfony based applications - SymfonyCon 2017
Ivo Lukac
 
RESTFul Tools For Lazy Experts - CFSummit 2016
RESTFul Tools For Lazy Experts - CFSummit 2016RESTFul Tools For Lazy Experts - CFSummit 2016
RESTFul Tools For Lazy Experts - CFSummit 2016
Ortus Solutions, Corp
 
Advanced Server Integration with Data and Direct
Advanced Server Integration with Data and DirectAdvanced Server Integration with Data and Direct
Advanced Server Integration with Data and Direct
Sencha
 
Introdcution to Adobe CQ
Introdcution to Adobe CQIntrodcution to Adobe CQ
Introdcution to Adobe CQ
Rest West
 
PHP7.1 New Features & Performance
PHP7.1 New Features & PerformancePHP7.1 New Features & Performance
PHP7.1 New Features & Performance
Xinchen Hui
 
The WordPress Way: Accessibility and Backwards Compatibility
The WordPress Way: Accessibility and Backwards CompatibilityThe WordPress Way: Accessibility and Backwards Compatibility
The WordPress Way: Accessibility and Backwards Compatibility
Joseph Dolson
 
Velocity - NxtGen Oxford
Velocity - NxtGen OxfordVelocity - NxtGen Oxford
Velocity - NxtGen OxfordPhil Pursglove
 
Implementing portlets using Web Scripts
Implementing portlets using Web ScriptsImplementing portlets using Web Scripts
Implementing portlets using Web Scripts
Piergiorgio Lucidi
 

What's hot (20)

Azure Templates for Consistent Deployment
Azure Templates for Consistent DeploymentAzure Templates for Consistent Deployment
Azure Templates for Consistent Deployment
 
.NET no Browser - Webassembly com Blazor!
.NET no Browser - Webassembly com Blazor!.NET no Browser - Webassembly com Blazor!
.NET no Browser - Webassembly com Blazor!
 
The Need For Speed - NxtGen Cambridge
The Need For Speed - NxtGen CambridgeThe Need For Speed - NxtGen Cambridge
The Need For Speed - NxtGen Cambridge
 
Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1
 
CBDW2014 - Down the RabbitMQ hole with ColdFusion
CBDW2014 - Down the RabbitMQ hole with ColdFusionCBDW2014 - Down the RabbitMQ hole with ColdFusion
CBDW2014 - Down the RabbitMQ hole with ColdFusion
 
Node.js
Node.jsNode.js
Node.js
 
From Web to Mobile with Stage 3D
From Web to Mobile with Stage 3DFrom Web to Mobile with Stage 3D
From Web to Mobile with Stage 3D
 
Phoenix and the Plug-life
Phoenix and the Plug-lifePhoenix and the Plug-life
Phoenix and the Plug-life
 
The Python in the Apple
The Python in the AppleThe Python in the Apple
The Python in the Apple
 
Ruby Setup
Ruby SetupRuby Setup
Ruby Setup
 
Merging two big Symfony based applications - SymfonyCon 2017
Merging two big Symfony based applications - SymfonyCon 2017Merging two big Symfony based applications - SymfonyCon 2017
Merging two big Symfony based applications - SymfonyCon 2017
 
RESTFul Tools For Lazy Experts - CFSummit 2016
RESTFul Tools For Lazy Experts - CFSummit 2016RESTFul Tools For Lazy Experts - CFSummit 2016
RESTFul Tools For Lazy Experts - CFSummit 2016
 
Advanced Server Integration with Data and Direct
Advanced Server Integration with Data and DirectAdvanced Server Integration with Data and Direct
Advanced Server Integration with Data and Direct
 
Introdcution to Adobe CQ
Introdcution to Adobe CQIntrodcution to Adobe CQ
Introdcution to Adobe CQ
 
PHP7.1 New Features & Performance
PHP7.1 New Features & PerformancePHP7.1 New Features & Performance
PHP7.1 New Features & Performance
 
Velocity - Edge UG
Velocity - Edge UGVelocity - Edge UG
Velocity - Edge UG
 
The WordPress Way: Accessibility and Backwards Compatibility
The WordPress Way: Accessibility and Backwards CompatibilityThe WordPress Way: Accessibility and Backwards Compatibility
The WordPress Way: Accessibility and Backwards Compatibility
 
Selenium
SeleniumSelenium
Selenium
 
Velocity - NxtGen Oxford
Velocity - NxtGen OxfordVelocity - NxtGen Oxford
Velocity - NxtGen Oxford
 
Implementing portlets using Web Scripts
Implementing portlets using Web ScriptsImplementing portlets using Web Scripts
Implementing portlets using Web Scripts
 

Similar to Stealing Chromium: Embedding HTML5 with the Servo Browser Engine (LinuxCon NA 2014)

Web Assembly Big Picture
Web Assembly Big PictureWeb Assembly Big Picture
Web Assembly Big Picture
Yousif Shalaby
 
Beginners Node.js
Beginners Node.jsBeginners Node.js
Beginners Node.js
Khaled Mosharraf
 
Top 10 web application development frameworks 2016
Top 10 web application development frameworks 2016Top 10 web application development frameworks 2016
Top 10 web application development frameworks 2016
iMOBDEV Technologies Pvt. Ltd.
 
Getting started with Emscripten – Transpiling C / C++ to JavaScript / HTML5
Getting started with Emscripten – Transpiling C / C++ to JavaScript / HTML5Getting started with Emscripten – Transpiling C / C++ to JavaScript / HTML5
Getting started with Emscripten – Transpiling C / C++ to JavaScript / HTML5
David Voyles
 
What's New in .Net 4.5
What's New in .Net 4.5What's New in .Net 4.5
What's New in .Net 4.5
Malam Team
 
Asp.net and .Net Framework ppt presentation
Asp.net and .Net Framework ppt presentationAsp.net and .Net Framework ppt presentation
Asp.net and .Net Framework ppt presentation
abhishek singh
 
MEAN Stack
MEAN StackMEAN Stack
MEAN Stack
Krishnaprasad k
 
MEAN Stack
MEAN StackMEAN Stack
MEAN Stack
Krishnaprasad k
 
Meanstack Introduction by Kishore Chandra
Meanstack Introduction by Kishore ChandraMeanstack Introduction by Kishore Chandra
Meanstack Introduction by Kishore Chandra
Kishore Chandra
 
.Net overviewrajnish
.Net overviewrajnish.Net overviewrajnish
.Net overviewrajnishRajnish Kalla
 
T4T Training day - NodeJS
T4T Training day - NodeJST4T Training day - NodeJS
T4T Training day - NodeJSTim Sommer
 
AMF Flash and .NET
AMF Flash and .NETAMF Flash and .NET
AMF Flash and .NETYaniv Uriel
 
Ci of js and apex using jasmine, phantom js and drone io df14
Ci of js and apex using jasmine, phantom js and drone io   df14Ci of js and apex using jasmine, phantom js and drone io   df14
Ci of js and apex using jasmine, phantom js and drone io df14
Kevin Poorman
 
Apache Drill (ver. 0.2)
Apache Drill (ver. 0.2)Apache Drill (ver. 0.2)
Apache Drill (ver. 0.2)
Camuel Gilyadov
 
Escaping the yellow bubble - rewriting Domino using MongoDb and Angular
Escaping the yellow bubble - rewriting Domino using MongoDb and AngularEscaping the yellow bubble - rewriting Domino using MongoDb and Angular
Escaping the yellow bubble - rewriting Domino using MongoDb and Angular
Mark Leusink
 
MICROSOFT BLAZOR - NEXT GENERATION WEB UI OR SILVERLIGHT ALL OVER AGAIN?
MICROSOFT BLAZOR - NEXT GENERATION WEB UI OR SILVERLIGHT ALL OVER AGAIN?MICROSOFT BLAZOR - NEXT GENERATION WEB UI OR SILVERLIGHT ALL OVER AGAIN?
MICROSOFT BLAZOR - NEXT GENERATION WEB UI OR SILVERLIGHT ALL OVER AGAIN?
Clint Edmonson
 
Blazor.pptx
Blazor.pptxBlazor.pptx
Blazor.pptx
ssuserb1d1a2
 
What is Mean Stack Development ?
What is Mean Stack Development ?What is Mean Stack Development ?
What is Mean Stack Development ?
Balajihope
 
ASP.NET
ASP.NETASP.NET
Net framework
Net frameworkNet framework
Net framework
Mahfuz1061
 

Similar to Stealing Chromium: Embedding HTML5 with the Servo Browser Engine (LinuxCon NA 2014) (20)

Web Assembly Big Picture
Web Assembly Big PictureWeb Assembly Big Picture
Web Assembly Big Picture
 
Beginners Node.js
Beginners Node.jsBeginners Node.js
Beginners Node.js
 
Top 10 web application development frameworks 2016
Top 10 web application development frameworks 2016Top 10 web application development frameworks 2016
Top 10 web application development frameworks 2016
 
Getting started with Emscripten – Transpiling C / C++ to JavaScript / HTML5
Getting started with Emscripten – Transpiling C / C++ to JavaScript / HTML5Getting started with Emscripten – Transpiling C / C++ to JavaScript / HTML5
Getting started with Emscripten – Transpiling C / C++ to JavaScript / HTML5
 
What's New in .Net 4.5
What's New in .Net 4.5What's New in .Net 4.5
What's New in .Net 4.5
 
Asp.net and .Net Framework ppt presentation
Asp.net and .Net Framework ppt presentationAsp.net and .Net Framework ppt presentation
Asp.net and .Net Framework ppt presentation
 
MEAN Stack
MEAN StackMEAN Stack
MEAN Stack
 
MEAN Stack
MEAN StackMEAN Stack
MEAN Stack
 
Meanstack Introduction by Kishore Chandra
Meanstack Introduction by Kishore ChandraMeanstack Introduction by Kishore Chandra
Meanstack Introduction by Kishore Chandra
 
.Net overviewrajnish
.Net overviewrajnish.Net overviewrajnish
.Net overviewrajnish
 
T4T Training day - NodeJS
T4T Training day - NodeJST4T Training day - NodeJS
T4T Training day - NodeJS
 
AMF Flash and .NET
AMF Flash and .NETAMF Flash and .NET
AMF Flash and .NET
 
Ci of js and apex using jasmine, phantom js and drone io df14
Ci of js and apex using jasmine, phantom js and drone io   df14Ci of js and apex using jasmine, phantom js and drone io   df14
Ci of js and apex using jasmine, phantom js and drone io df14
 
Apache Drill (ver. 0.2)
Apache Drill (ver. 0.2)Apache Drill (ver. 0.2)
Apache Drill (ver. 0.2)
 
Escaping the yellow bubble - rewriting Domino using MongoDb and Angular
Escaping the yellow bubble - rewriting Domino using MongoDb and AngularEscaping the yellow bubble - rewriting Domino using MongoDb and Angular
Escaping the yellow bubble - rewriting Domino using MongoDb and Angular
 
MICROSOFT BLAZOR - NEXT GENERATION WEB UI OR SILVERLIGHT ALL OVER AGAIN?
MICROSOFT BLAZOR - NEXT GENERATION WEB UI OR SILVERLIGHT ALL OVER AGAIN?MICROSOFT BLAZOR - NEXT GENERATION WEB UI OR SILVERLIGHT ALL OVER AGAIN?
MICROSOFT BLAZOR - NEXT GENERATION WEB UI OR SILVERLIGHT ALL OVER AGAIN?
 
Blazor.pptx
Blazor.pptxBlazor.pptx
Blazor.pptx
 
What is Mean Stack Development ?
What is Mean Stack Development ?What is Mean Stack Development ?
What is Mean Stack Development ?
 
ASP.NET
ASP.NETASP.NET
ASP.NET
 
Net framework
Net frameworkNet framework
Net framework
 

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

From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 

Recently uploaded (20)

From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 

Stealing Chromium: Embedding HTML5 with the Servo Browser Engine (LinuxCon NA 2014)

  • 1. STEALING CHROMIUM: EMBEDDING HTML5 WITH THE SERVO BROWSER ENGINE Lars Bergstrom Mozilla Research Mike Blumenkrantz Samsung R&D America
  • 2. Why a new web engine? • Support new types of applications and new devices • All modern browser engines (Safari, Firefox, Chrome) originally designed pre-2000 • Coarse parallelism • Tightly coupled components • Vast majority of security issues are related to the C++ memory model
  • 3. Servo •Written in a memory-safe systems language, Rust • Architected for parallelism • Coarse (per-tab), as in Chrome • Lightweight (intra-page), too • Designed for embedding
  • 4. Rust - safe systems programming • C++ syntax and idioms • C++-like performance •Memory safety • Concurrency • Parallelism http://www.rust-lang.org
  • 5. Familiar syntax and performance
  • 6. Memory safety without overhead • Lifetimes and ownership ensure memory safety •No garbage collection •No reference counting •No C++ “smart” pointer classes
  • 7. Example of code you can’t write
  • 8. How a browser works HTML CSS JS Script & Interactions DOM Flow Tree Display Lists Script Layout Render Parsing More details: http://www.html5rocks.com/en/tutorials/internals/howbrowserswork/
  • 9. How a browser works HTML CSS JS Script & Interactions DOM Flow Tree Display Lists Script Layout Render Parsing This works: <html> <script> document.write (“</script> <li>foo</li> </html> More details: http://www.html5rocks.com/en/tutorials/internals/howbrowserswork/
  • 10. Timing breakdown Task Percentage Runtime libraries 25% Layout 22% Windowing 17% Script 16% Painting to screen 10% CSS styling 4% Other 6% Data from A Case for Parallelizing Web Pages. Mai, Tang, et. al. HOTPAR ‘12
  • 11.
  • 13. Servo’s architecture Constellation Pipeline 1 (iframe 1) Renderer Script Layout Tab 1
  • 14. Servo’s architecture Tab 1 Constellation Pipeline 1 (iframe 1) Renderer Script Layout Pipeline 2 (iframe 2) Renderer Script Layout
  • 15. Servo’s architecture Tab 1 Constellation Pipeline 1 (iframe 1) Renderer Script Layout Pipeline 2 (iframe 2) Renderer Script Layout Pipeline 3 (iframe 3) Renderer Script Layout
  • 16. Demo: parallelism and sandboxing
  • 17. Parallel layout •Matters hugely on mobile platforms • Processors run at lower frequencies, but many cores •Would enable more complicated pages on all platforms • Implemented by work-stealing algorithm See: Fast and Parallel Webpage Layout. Meyerovich and Bodik. WWW 2010.
  • 18. Parallel layout body div div div text bold text text
  • 19. Parallel layout body div div div text bold text text Queue div div div
  • 20. Parallel layout challenges •HTML layout has complex dependencies • Inline element positioning • Floating elements • Vertical text • Pagination • Considering adding speculation
  • 21. Layout: parallel speedups Time (ms) 700 525 350 175 0 High CPU Frequency Low CPU Frequency 1 2 3 4 5 6 7 8 Number of Threads
  • 22. Total time with parallel layout Time (s) 3.6 2.7 1.8 0.9 0 High CPU Frequency Low CPU Frequency 1 2 3 4 5 6 7 8 Number of Threads
  • 23. Total power with parallel layout Power (J) 120 90 60 30 0 High CPU Frequency Low CPU Frequency 1 2 3 4 5 6 7 8 Number of Threads Measurements by Laleh Beni, intern from University of California Irvine
  • 24. Punchline: 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 • Could also parallelize more • Rendering, CSS selector matching, etc.
  • 25. From engine to browser • Servo just renders pages • Similar to the Blink and Gecko engines • Designed to work in many browser shells • Firefox OS, over interprocess communication (IPC) • Android, by implementing a Java wrapper •On the desktop with…
  • 26. What is embedding? •Hosting web engine in native application
  • 27. Why embed? • Reduced development time •HTML5 popularity
  • 28. How not to embed •WebKit • Blink • Both suffer from an unstable API • Application developer choices: • Ship full browser engine with application • Continually update to match breakages
  • 29. How to embed? • CEF: Chromium Embedded Framework • Isolates application developers from core API • C API with C++ extensions
  • 30. Servo embedding strategy • Stable API/ABI • Extensive API testing is a plus • C-based • Flexible • Already designed
  • 31. How to embed with Servo? • Use CEF API+ABI • Removes need for YA embedding API • Less competition, more coding • Allows easy testing between engines • Servo: the pragmatic embedding engine
  • 32. Servo embedding methodology • Full symbol/ABI coverage • Every CEF function call resolves to a Servo function • Struct allocation sizes are identical typedef struct _cef_string_utf8_t { char* str; size_t length; void (*dtor)(char* str); } cef_string_utf8_t; !!!!! C pub struct cef_string_utf8 { pub str: *mut u8, pub length: size_t, pub dtor: extern “C” fn(str: *mut u8), } !!!!! Rust
  • 33. Servo embedding development • Start with base set of symbols • `nm -u` on CEF applications • Track function execution • CEF <-> Blink <-> Application <-> CEF … •Mimic CEF behavior using Servo equivalents • Use preload hacks to test • LD_PRELOAD on Linux
  • 34. Servo status • Pass some tests • ACID1, ACID2 • Render basic web pages •Wikipedia, etc. • Focus on design + challenges • Parallelism, latency, power, memory
  • 35. Servo roadmap • https://github.com/servo/servo/wiki/Roadmap • Q3 2014 •Writing modes (vertical text) •DOM memory usage, perf, and features •Web Platform Tests & CSS Ref Tests • Q4 2014 • Very basic dogfooding
  • 36. Getting involved with Servo •www.github.com/servo/ servo/issues • Filter for “E-Easy” • irc.mozilla.org, #servo channel •Worldwide community • Looking for more partners and contributors • larsberg@mozilla.com