SlideShare une entreprise Scribd logo
1  sur  41
Télécharger pour lire hors ligne
1Samsung Open Source Group
Introduction to IoT.js
Tilmann Scheller
Principal Compiler Engineer
t.scheller@samsung.com
Samsung Open Source Group
Samsung Research UK
OpenIoT Summit 2016
San Diego, USA, April 4 – 6, 2016
2Samsung Open Source Group
Overview
● Introduction
● JerryScript
● IoT.js
● Memory consumption/Performance
● Demo
● Future work
● Summary
3Samsung Open Source Group
Introduction
4Samsung Open Source Group
What is IoT.js?
● A lightweight version of Node.js
● Attempt to bring the success of Node.js to the embedded
world
● Retains backwards compatibility with Node.js as much as
possible
● Runs on top of JerryScript
5Samsung Open Source Group
IoT Hardware
http://postscapes.com/internet-of-things-hardware
6Samsung Open Source Group
What is JerryScript?
● A really lightweight JavaScript engine
● Has a base footprint of 10KB of RAM
● Optimized for microcontrollers
● Developed from scratch by Samsung
7Samsung Open Source Group
Why JavaScript on microcontrollers?
● There's a huge pool of JavaScript developers
● Opens up the possibility for web developers to easily write
software for embedded devices
● Performance overhead of JavaScript less of an issue for
control tasks
● Increased productivity, shorter time to market
● Ability to load code dynamically over the network
● Security: Executing JavaScript code is safer than executing
arbitrary native code
8Samsung Open Source Group
Open source
● Actively developed on GitHub
● JerryScript and IoT.js are both open source released
under the Apache 2.0 license
● Building up a community around IoT.js/JerryScript
9Samsung Open Source Group
JerryScript
10Samsung Open Source Group
JerryScript History
● Development started in June 2014
● Released as open source in June 2015
● JerryScript passed 100% of the test262 conformance test
suite in August 2015
● Rewritten compact byte code implementation landed in
January 2016
● Current focus on performance optimization
11Samsung Open Source Group
JerryScript
● Heavily optimized for a low memory footprint
● Interpreter-only
● Compact object representation
● Compressed pointers
● No AST, directly creating byte code
● Compact byte code heavily optimized for low memory
consumption
12Samsung Open Source Group
JerryScript Portability
● Extremely portable
● Self-contained
● Small C library
● Can run bare-metal
● Supports the STM32F4, ESP8266 boards
● Runs on Linux/OS X as well
13Samsung Open Source Group
JerryScript
● Written in C99
● About 74KLOC
● Code size ~190KB when compiled with GCC LTO for
ARM Thumb-2
● Implements the entire ECMAScript 5.1 standard, passes
100% of the test262 conformance test suite
● C API for embedding JerryScript
● Byte code snapshot feature
14Samsung Open Source Group
JerryScript C API
15Samsung Open Source Group
JerryScript C API
16Samsung Open Source Group
IoT.js
17Samsung Open Source Group
IoT.js
● Lightweight version of Node.js
● Focus on resource-constrained devices
● Tries to retain backwards compatibility
● Mostly written in JavaScript
18Samsung Open Source Group
IoT.js Architecture
19Samsung Open Source Group
IoT.js Modules
● Assert
● Buffer
● DNS
● Events
● File System
● HTTP
● Net
● Modules
● Process
● Stream
● Timers
● GPIO
20Samsung Open Source Group
Target hardware
● STM32F4 developer board
● Cortex-M4F clocked at 168 MHz
● 192KB of RAM
● 1MB of flash memory
21Samsung Open Source Group
NuttX
● Real-time operating system
● Open source (BSD license)
● Scales from 8-bit microcontrollers to 32-bit
microcontrollers
● Supports the STM32F4 developer board
22Samsung Open Source Group
libtuv
● libuv - Support library for asynchronous I/O
● libtuv - Stripped down version of Libuv
● Runs on NuttX and Linux
● Experimental support for mbed OS
23Samsung Open Source Group
Memory consumption/
Performance
24Samsung Open Source Group
IoT.js - Memory consumption
Measured on a Raspberry Pi 2
Test name IoT.js Node.js
require('http') 40KB 6.70MB
test_httpserver.js 80KB 8.63MB
25Samsung Open Source Group
SunSpider 1.0.2 - Memory consumption
3d-cube
access-binary-trees
access-fannkuch
access-nbody
bitops-3bit-bits-in-byte
bitops-bits-in-byte
bitops-bitwise-and
bitops-nsieve-bits
controlflow-recursive
crypto-aes
crypto-md5
crypto-sha1
date-format-tofte
date-format-xparb
math-cordic
math-partial-sums
math-spectral-norm
string-base64
string-fasta
0 100 200 300 400 500 600 700
76
76
32
36
24
24
24
148
136
104
152
112
60
52
32
28
32
152
44
216
240
160
172
160
160
160
384
204
268
420
304
572
220
164
160
164
324
172
JerryScript
Duktape 1.4
Max RSS in KB (lower is better) Measured on a Raspberry Pi 2
26Samsung Open Source Group
SunSpider 1.0.2 - Performance
3d-cube
access-binary-trees
access-fannkuch
access-nbody
bitops-3bit-bits-in-byte
bitops-bits-in-byte
bitops-bitwise-and
bitops-nsieve-bits
controlflow-recursive
crypto-aes
crypto-md5
crypto-sha1
date-format-tofte
date-format-xparb
math-cordic
math-partial-sums
math-spectral-norm
string-base64
string-fasta
0 2 4 6 8 10 12 14 16 18 20
2.54
1.36
7.38
2.81
1.62
2.39
3.27
17.88
0.95
3.36
3.29
2.07
2.09
0.83
2.83
1.57
1.46
5.08
3.21
1.44
1.78
3.4
2.23
2.42
2.73
10.75
4.52
1.51
2.58
2.08
1.93
4.64
2.23
3.62
3.73
1.13
5.95
6.46
JerryScript
Duktape 1.4
Execution time in seconds (lower is better) Measured on a Raspberry Pi 2
27Samsung Open Source Group
ubench - Memory consumption
loop-sum
loop-empty-resolve
loop-empty
function-sum
function-missing-args
function-excess-args
function-emtpy
function-correct-args
function-closure
0 100 200 300 400 500 600
24
24
24
24
24
24
24
24
32
152
152
152
156
156
156
156
156
496
JerryScript
Duktape 1.4
Max RSS in KB (lower is better) Measured on a Raspberry Pi 2
28Samsung Open Source Group
ubench - Performance
loop-sum
loop-empty-resolve
loop-empty
function-sum
function-missing-args
function-excess-args
function-emtpy
function-correct-args
function-closure
0 10 20 30 40 50 60 70 80 90
35.48
3.42
30.14
18.05
16.09
20.85
19.66
22.18
2.62
76.65
6.41
55.23
23.93
27.35
27.93
38.89
27.95
18.87
JerryScript
Duktape 1.4
Execution time in seconds (lower is better) Measured on a Raspberry Pi 2
29Samsung Open Source Group
Demo
30Samsung Open Source Group
Tetris Demo
● Implementation of the classic Tetris game
● Each device drives one LED matrix as display
● Implemented as a Node.js module
● Both devices are running exactly the same JavaScript
code
31Samsung Open Source Group
Demo
Raspberry Pi 2
(1GB RAM, 8GB Flash)
Tetris
Node.js
V8
Linux
STM32F4 board
(192KB RAM, 1MB Flash)
Tetris
IoT.js
JerryScript
NuttX
USB Keypad
LED Matrix LED Matrix
I2C I2C
Switches via GPIO
32Samsung Open Source Group
Tetris Demo
https://youtu.be/q4iBeOAC7XI
33Samsung Open Source Group
Pong Demo
● Implementation of the classic Pong game
● Display shared across two devices
● Each device drives one LED matrix
● Implemented as a Node.js module
● "AI" oppenent running on the microcontroller
34Samsung Open Source Group
Demo
Raspberry Pi 2
(1GB RAM, 8GB Flash)
Pong Client
Node.js
V8
Linux
STM32F4 board
(192KB RAM, 1MB Flash)
Pong Server
IoT.js
JerryScript
NuttX
Ethernet
USB Keypad
LED Matrix LED Matrix
I2C I2C
35Samsung Open Source Group
Pong Demo
36Samsung Open Source Group
Future work
37Samsung Open Source Group
Future work
● Close performance gap between JerryScript and Duktape
● Further performance and memory optimizations
● Enhance JerryScript C API
● Add more IoT.js modules
● Package manager for IoT.js
● Support more devices
38Samsung Open Source Group
Summary
39Samsung Open Source Group
Summary
● Significantly lowers barrier of entry for JavaScript
development targeting heavily constrained embedded
devices
● Speeds up development
● Active community
● More information on http://www.jerryscript.net and
http://www.iotjs.net
● Looking for bug reports and feedback
Thank you.
40Samsung Open Source Group
41Samsung Open Source Group
Contact Information:
Tilmann Scheller
t.scheller@samsung.com
Samsung Open Source Group
Samsung Research UK

Contenu connexe

Tendances

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 DeviceSamsung 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 ThingsSamsung 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 LinuxSamsung 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 DevicesSamsung 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 IoTivitySamsung 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 USBSamsung Open Source Group
 
IoTivity for Automotive IoT Interoperability
IoTivity for Automotive IoT InteroperabilityIoTivity for Automotive IoT Interoperability
IoTivity for Automotive IoT InteroperabilitySamsung Open Source Group
 
LAS16-507: LXC support in LAVA
LAS16-507: LXC support in LAVALAS16-507: LXC support in LAVA
LAS16-507: LXC support in LAVALinaro
 
Media Resource Sharing Through the Media Controller API
Media Resource Sharing Through the Media Controller APIMedia Resource Sharing Through the Media Controller API
Media Resource Sharing Through the Media Controller APISamsung Open Source Group
 
BUD17-405: Building a reference IoT product with Zephyr
BUD17-405: Building a reference IoT product with Zephyr BUD17-405: Building a reference IoT product with Zephyr
BUD17-405: Building a reference IoT product with Zephyr Linaro
 
Upstreaming 101 - SFO17-TR02
Upstreaming 101 - SFO17-TR02Upstreaming 101 - SFO17-TR02
Upstreaming 101 - SFO17-TR02Linaro
 
BKK16-307 LHG OE Initiative
BKK16-307 LHG OE InitiativeBKK16-307 LHG OE Initiative
BKK16-307 LHG OE InitiativeLinaro
 
LAS16-500: The Rise and Fall of Assembler and the VGIC from Hell
LAS16-500: The Rise and Fall of Assembler and the VGIC from HellLAS16-500: The Rise and Fall of Assembler and the VGIC from Hell
LAS16-500: The Rise and Fall of Assembler and the VGIC from HellLinaro
 
BKK16-105 HALs for LITE
BKK16-105 HALs for LITEBKK16-105 HALs for LITE
BKK16-105 HALs for LITELinaro
 
Deploy STM32 family on Zephyr - SFO17-102
Deploy STM32 family on Zephyr - SFO17-102Deploy STM32 family on Zephyr - SFO17-102
Deploy STM32 family on Zephyr - SFO17-102Linaro
 

Tendances (20)

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
 
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
 
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
 
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
 
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
 
6LoWPAN: An Open IoT Networking Protocol
6LoWPAN: An Open IoT Networking Protocol6LoWPAN: An Open IoT Networking Protocol
6LoWPAN: An Open IoT Networking Protocol
 
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
 
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
 
IoTivity for Automotive IoT Interoperability
IoTivity for Automotive IoT InteroperabilityIoTivity for Automotive IoT Interoperability
IoTivity for Automotive IoT Interoperability
 
Framework for IoT Interoperability
Framework for IoT InteroperabilityFramework for IoT Interoperability
Framework for IoT Interoperability
 
Where is LLVM Being Used Today?
Where is LLVM Being Used Today? Where is LLVM Being Used Today?
Where is LLVM Being Used Today?
 
Easy IoT with JavaScript
Easy IoT with JavaScriptEasy IoT with JavaScript
Easy IoT with JavaScript
 
LAS16-507: LXC support in LAVA
LAS16-507: LXC support in LAVALAS16-507: LXC support in LAVA
LAS16-507: LXC support in LAVA
 
Media Resource Sharing Through the Media Controller API
Media Resource Sharing Through the Media Controller APIMedia Resource Sharing Through the Media Controller API
Media Resource Sharing Through the Media Controller API
 
BUD17-405: Building a reference IoT product with Zephyr
BUD17-405: Building a reference IoT product with Zephyr BUD17-405: Building a reference IoT product with Zephyr
BUD17-405: Building a reference IoT product with Zephyr
 
Upstreaming 101 - SFO17-TR02
Upstreaming 101 - SFO17-TR02Upstreaming 101 - SFO17-TR02
Upstreaming 101 - SFO17-TR02
 
BKK16-307 LHG OE Initiative
BKK16-307 LHG OE InitiativeBKK16-307 LHG OE Initiative
BKK16-307 LHG OE Initiative
 
LAS16-500: The Rise and Fall of Assembler and the VGIC from Hell
LAS16-500: The Rise and Fall of Assembler and the VGIC from HellLAS16-500: The Rise and Fall of Assembler and the VGIC from Hell
LAS16-500: The Rise and Fall of Assembler and the VGIC from Hell
 
BKK16-105 HALs for LITE
BKK16-105 HALs for LITEBKK16-105 HALs for LITE
BKK16-105 HALs for LITE
 
Deploy STM32 family on Zephyr - SFO17-102
Deploy STM32 family on Zephyr - SFO17-102Deploy STM32 family on Zephyr - SFO17-102
Deploy STM32 family on Zephyr - SFO17-102
 

En vedette

Keller 1er trimestre 2014 d
Keller 1er trimestre 2014 dKeller 1er trimestre 2014 d
Keller 1er trimestre 2014 dNelson Hernandez
 
OSGi IoT Demo & Contest 2015
OSGi IoT Demo & Contest 2015OSGi IoT Demo & Contest 2015
OSGi IoT Demo & Contest 2015mfrancis
 
Iiq 4 balances_energia_r_e.obs
Iiq 4 balances_energia_r_e.obsIiq 4 balances_energia_r_e.obs
Iiq 4 balances_energia_r_e.obsGaba Oliva
 
Datos. Encuesta Situacion Venezuela (Feb 2014)
Datos. Encuesta Situacion Venezuela (Feb 2014)Datos. Encuesta Situacion Venezuela (Feb 2014)
Datos. Encuesta Situacion Venezuela (Feb 2014)Nelson Hernandez
 
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/LinuxSamsung Open Source Group
 
OJT Application Sample
OJT Application SampleOJT Application Sample
OJT Application SampleMeyg's Saga
 
PrésiTrack : l'analyse de la semaine du 13 au 17 mars
PrésiTrack : l'analyse de la semaine du 13 au 17 marsPrésiTrack : l'analyse de la semaine du 13 au 17 mars
PrésiTrack : l'analyse de la semaine du 13 au 17 marsAlexandre Rousset
 

En vedette (12)

Keller 1er trimestre 2014 d
Keller 1er trimestre 2014 dKeller 1er trimestre 2014 d
Keller 1er trimestre 2014 d
 
OSGi IoT Demo & Contest 2015
OSGi IoT Demo & Contest 2015OSGi IoT Demo & Contest 2015
OSGi IoT Demo & Contest 2015
 
MyRocks Deep Dive
MyRocks Deep DiveMyRocks Deep Dive
MyRocks Deep Dive
 
Iiq 4 balances_energia_r_e.obs
Iiq 4 balances_energia_r_e.obsIiq 4 balances_energia_r_e.obs
Iiq 4 balances_energia_r_e.obs
 
Datos. Encuesta Situacion Venezuela (Feb 2014)
Datos. Encuesta Situacion Venezuela (Feb 2014)Datos. Encuesta Situacion Venezuela (Feb 2014)
Datos. Encuesta Situacion Venezuela (Feb 2014)
 
Tizen Connected with IoTivity
Tizen Connected with IoTivityTizen Connected with IoTivity
Tizen Connected with IoTivity
 
Toward "OCF Automotive" profile
Toward "OCF Automotive" profileToward "OCF Automotive" profile
Toward "OCF Automotive" profile
 
OIC AGL Collaboration
OIC AGL CollaborationOIC AGL Collaboration
OIC AGL Collaboration
 
IoTivity: From Devices to the Cloud
IoTivity: From Devices to the CloudIoTivity: From Devices to the Cloud
IoTivity: From Devices to the Cloud
 
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
 
OJT Application Sample
OJT Application SampleOJT Application Sample
OJT Application Sample
 
PrésiTrack : l'analyse de la semaine du 13 au 17 mars
PrésiTrack : l'analyse de la semaine du 13 au 17 marsPrésiTrack : l'analyse de la semaine du 13 au 17 mars
PrésiTrack : l'analyse de la semaine du 13 au 17 mars
 

Similaire à Introduction to IoT.js

LMG Lightning Talks - SFO17-205
LMG Lightning Talks - SFO17-205LMG Lightning Talks - SFO17-205
LMG Lightning Talks - SFO17-205Linaro
 
Linxu conj2016 96boards
Linxu conj2016 96boardsLinxu conj2016 96boards
Linxu conj2016 96boardsLF Events
 
LCU14 Keynote by George Grey
LCU14 Keynote by George GreyLCU14 Keynote by George Grey
LCU14 Keynote by George GreyLinaro
 
LAS16 100 K1 - Keynote George Grey
LAS16 100 K1 - Keynote George GreyLAS16 100 K1 - Keynote George Grey
LAS16 100 K1 - Keynote George Grey96Boards
 
LAS16-100K1: Welcome Keynote
LAS16-100K1: Welcome KeynoteLAS16-100K1: Welcome Keynote
LAS16-100K1: Welcome KeynoteLinaro
 
BKK16-100K1 George Grey, Linaro CEO Opening Keynote
BKK16-100K1 George Grey, Linaro CEO Opening KeynoteBKK16-100K1 George Grey, Linaro CEO Opening Keynote
BKK16-100K1 George Grey, Linaro CEO Opening KeynoteLinaro
 
Cinder Update, OpenInfra Meetup Q3 China, 2020-09-26
Cinder Update, OpenInfra Meetup Q3 China, 2020-09-26Cinder Update, OpenInfra Meetup Q3 China, 2020-09-26
Cinder Update, OpenInfra Meetup Q3 China, 2020-09-26Brian Rosmaita
 
20141111_SOS3_Gallo
20141111_SOS3_Gallo20141111_SOS3_Gallo
20141111_SOS3_GalloAndrea Gallo
 
Is Android the New Embedded Linux? at AnDevCon VI
Is Android the New Embedded Linux? at AnDevCon VIIs Android the New Embedded Linux? at AnDevCon VI
Is Android the New Embedded Linux? at AnDevCon VIOpersys inc.
 
Hacking with ARM Mobile devices on Linux
Hacking with ARM Mobile devices on LinuxHacking with ARM Mobile devices on Linux
Hacking with ARM Mobile devices on LinuxNetwalker lab kapper
 
Is Android the New Embedded Linux? at AnDevCon V
Is Android the New Embedded Linux? at AnDevCon VIs Android the New Embedded Linux? at AnDevCon V
Is Android the New Embedded Linux? at AnDevCon VOpersys inc.
 
0xdroid osdc-2010-100426084937-phpapp02
0xdroid osdc-2010-100426084937-phpapp020xdroid osdc-2010-100426084937-phpapp02
0xdroid osdc-2010-100426084937-phpapp02chon2010
 
HKG15: Opening Keynote - George Grey, Linaro CEO
HKG15: Opening Keynote - George Grey, Linaro CEOHKG15: Opening Keynote - George Grey, Linaro CEO
HKG15: Opening Keynote - George Grey, Linaro CEOLinaro
 
gVisor, Kata Containers, Firecracker, Docker: Who is Who in the Container Space?
gVisor, Kata Containers, Firecracker, Docker: Who is Who in the Container Space?gVisor, Kata Containers, Firecracker, Docker: Who is Who in the Container Space?
gVisor, Kata Containers, Firecracker, Docker: Who is Who in the Container Space?ArangoDB Database
 
Heterogeneous multiprocessing on androd and i.mx7
Heterogeneous multiprocessing on androd and i.mx7Heterogeneous multiprocessing on androd and i.mx7
Heterogeneous multiprocessing on androd and i.mx7Kynetics
 
Porting Android ABS 2011
Porting Android ABS 2011Porting Android ABS 2011
Porting Android ABS 2011Opersys inc.
 
X86 ROM Cooking 101 (Android Builders Summit 2014)
X86 ROM Cooking 101 (Android Builders Summit 2014)X86 ROM Cooking 101 (Android Builders Summit 2014)
X86 ROM Cooking 101 (Android Builders Summit 2014)Ron Munitz
 

Similaire à Introduction to IoT.js (20)

Js on-microcontrollers
Js on-microcontrollersJs on-microcontrollers
Js on-microcontrollers
 
LMG Lightning Talks - SFO17-205
LMG Lightning Talks - SFO17-205LMG Lightning Talks - SFO17-205
LMG Lightning Talks - SFO17-205
 
Linxu conj2016 96boards
Linxu conj2016 96boardsLinxu conj2016 96boards
Linxu conj2016 96boards
 
LCU14 Keynote by George Grey
LCU14 Keynote by George GreyLCU14 Keynote by George Grey
LCU14 Keynote by George Grey
 
LAS16 100 K1 - Keynote George Grey
LAS16 100 K1 - Keynote George GreyLAS16 100 K1 - Keynote George Grey
LAS16 100 K1 - Keynote George Grey
 
LAS16-100K1: Welcome Keynote
LAS16-100K1: Welcome KeynoteLAS16-100K1: Welcome Keynote
LAS16-100K1: Welcome Keynote
 
BKK16-100K1 George Grey, Linaro CEO Opening Keynote
BKK16-100K1 George Grey, Linaro CEO Opening KeynoteBKK16-100K1 George Grey, Linaro CEO Opening Keynote
BKK16-100K1 George Grey, Linaro CEO Opening Keynote
 
Cinder Update, OpenInfra Meetup Q3 China, 2020-09-26
Cinder Update, OpenInfra Meetup Q3 China, 2020-09-26Cinder Update, OpenInfra Meetup Q3 China, 2020-09-26
Cinder Update, OpenInfra Meetup Q3 China, 2020-09-26
 
20141111_SOS3_Gallo
20141111_SOS3_Gallo20141111_SOS3_Gallo
20141111_SOS3_Gallo
 
Is Android the New Embedded Linux? at AnDevCon VI
Is Android the New Embedded Linux? at AnDevCon VIIs Android the New Embedded Linux? at AnDevCon VI
Is Android the New Embedded Linux? at AnDevCon VI
 
Porting Android
Porting AndroidPorting Android
Porting Android
 
Hacking with ARM Mobile devices on Linux
Hacking with ARM Mobile devices on LinuxHacking with ARM Mobile devices on Linux
Hacking with ARM Mobile devices on Linux
 
Is Android the New Embedded Linux? at AnDevCon V
Is Android the New Embedded Linux? at AnDevCon VIs Android the New Embedded Linux? at AnDevCon V
Is Android the New Embedded Linux? at AnDevCon V
 
0xdroid osdc-2010-100426084937-phpapp02
0xdroid osdc-2010-100426084937-phpapp020xdroid osdc-2010-100426084937-phpapp02
0xdroid osdc-2010-100426084937-phpapp02
 
HKG15: Opening Keynote - George Grey, Linaro CEO
HKG15: Opening Keynote - George Grey, Linaro CEOHKG15: Opening Keynote - George Grey, Linaro CEO
HKG15: Opening Keynote - George Grey, Linaro CEO
 
gVisor, Kata Containers, Firecracker, Docker: Who is Who in the Container Space?
gVisor, Kata Containers, Firecracker, Docker: Who is Who in the Container Space?gVisor, Kata Containers, Firecracker, Docker: Who is Who in the Container Space?
gVisor, Kata Containers, Firecracker, Docker: Who is Who in the Container Space?
 
Heterogeneous multiprocessing on androd and i.mx7
Heterogeneous multiprocessing on androd and i.mx7Heterogeneous multiprocessing on androd and i.mx7
Heterogeneous multiprocessing on androd and i.mx7
 
Porting Android
Porting AndroidPorting Android
Porting Android
 
Porting Android ABS 2011
Porting Android ABS 2011Porting Android ABS 2011
Porting Android ABS 2011
 
X86 ROM Cooking 101 (Android Builders Summit 2014)
X86 ROM Cooking 101 (Android Builders Summit 2014)X86 ROM Cooking 101 (Android Builders Summit 2014)
X86 ROM Cooking 101 (Android Builders Summit 2014)
 

Plus de Samsung Open Source Group

Plus de Samsung Open Source Group (8)

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)
 
Spawny: A New Approach to Logins
Spawny: A New Approach to LoginsSpawny: A New Approach to Logins
Spawny: A New Approach to Logins
 
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
 
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 Connects RVI from GENIVI's Develoment Platform to Tizen devices
IoTivity Connects RVI from GENIVI's Develoment Platform to Tizen devicesIoTivity Connects RVI from GENIVI's Develoment Platform to Tizen devices
IoTivity Connects RVI from GENIVI's Develoment Platform to Tizen devices
 
IoTivity on Tizen: How to
IoTivity on Tizen: How toIoTivity on Tizen: How to
IoTivity on Tizen: How to
 

Dernier

Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsSafe Software
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentationvaddepallysandeep122
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...Akihiro Suda
 
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfInnovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfYashikaSharma391629
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfStefano Stabellini
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsChristian Birchler
 

Dernier (20)

Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentation
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
 
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfInnovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdf
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
 

Introduction to IoT.js

  • 1. 1Samsung Open Source Group Introduction to IoT.js Tilmann Scheller Principal Compiler Engineer t.scheller@samsung.com Samsung Open Source Group Samsung Research UK OpenIoT Summit 2016 San Diego, USA, April 4 – 6, 2016
  • 2. 2Samsung Open Source Group Overview ● Introduction ● JerryScript ● IoT.js ● Memory consumption/Performance ● Demo ● Future work ● Summary
  • 3. 3Samsung Open Source Group Introduction
  • 4. 4Samsung Open Source Group What is IoT.js? ● A lightweight version of Node.js ● Attempt to bring the success of Node.js to the embedded world ● Retains backwards compatibility with Node.js as much as possible ● Runs on top of JerryScript
  • 5. 5Samsung Open Source Group IoT Hardware http://postscapes.com/internet-of-things-hardware
  • 6. 6Samsung Open Source Group What is JerryScript? ● A really lightweight JavaScript engine ● Has a base footprint of 10KB of RAM ● Optimized for microcontrollers ● Developed from scratch by Samsung
  • 7. 7Samsung Open Source Group Why JavaScript on microcontrollers? ● There's a huge pool of JavaScript developers ● Opens up the possibility for web developers to easily write software for embedded devices ● Performance overhead of JavaScript less of an issue for control tasks ● Increased productivity, shorter time to market ● Ability to load code dynamically over the network ● Security: Executing JavaScript code is safer than executing arbitrary native code
  • 8. 8Samsung Open Source Group Open source ● Actively developed on GitHub ● JerryScript and IoT.js are both open source released under the Apache 2.0 license ● Building up a community around IoT.js/JerryScript
  • 9. 9Samsung Open Source Group JerryScript
  • 10. 10Samsung Open Source Group JerryScript History ● Development started in June 2014 ● Released as open source in June 2015 ● JerryScript passed 100% of the test262 conformance test suite in August 2015 ● Rewritten compact byte code implementation landed in January 2016 ● Current focus on performance optimization
  • 11. 11Samsung Open Source Group JerryScript ● Heavily optimized for a low memory footprint ● Interpreter-only ● Compact object representation ● Compressed pointers ● No AST, directly creating byte code ● Compact byte code heavily optimized for low memory consumption
  • 12. 12Samsung Open Source Group JerryScript Portability ● Extremely portable ● Self-contained ● Small C library ● Can run bare-metal ● Supports the STM32F4, ESP8266 boards ● Runs on Linux/OS X as well
  • 13. 13Samsung Open Source Group JerryScript ● Written in C99 ● About 74KLOC ● Code size ~190KB when compiled with GCC LTO for ARM Thumb-2 ● Implements the entire ECMAScript 5.1 standard, passes 100% of the test262 conformance test suite ● C API for embedding JerryScript ● Byte code snapshot feature
  • 14. 14Samsung Open Source Group JerryScript C API
  • 15. 15Samsung Open Source Group JerryScript C API
  • 16. 16Samsung Open Source Group IoT.js
  • 17. 17Samsung Open Source Group IoT.js ● Lightweight version of Node.js ● Focus on resource-constrained devices ● Tries to retain backwards compatibility ● Mostly written in JavaScript
  • 18. 18Samsung Open Source Group IoT.js Architecture
  • 19. 19Samsung Open Source Group IoT.js Modules ● Assert ● Buffer ● DNS ● Events ● File System ● HTTP ● Net ● Modules ● Process ● Stream ● Timers ● GPIO
  • 20. 20Samsung Open Source Group Target hardware ● STM32F4 developer board ● Cortex-M4F clocked at 168 MHz ● 192KB of RAM ● 1MB of flash memory
  • 21. 21Samsung Open Source Group NuttX ● Real-time operating system ● Open source (BSD license) ● Scales from 8-bit microcontrollers to 32-bit microcontrollers ● Supports the STM32F4 developer board
  • 22. 22Samsung Open Source Group libtuv ● libuv - Support library for asynchronous I/O ● libtuv - Stripped down version of Libuv ● Runs on NuttX and Linux ● Experimental support for mbed OS
  • 23. 23Samsung Open Source Group Memory consumption/ Performance
  • 24. 24Samsung Open Source Group IoT.js - Memory consumption Measured on a Raspberry Pi 2 Test name IoT.js Node.js require('http') 40KB 6.70MB test_httpserver.js 80KB 8.63MB
  • 25. 25Samsung Open Source Group SunSpider 1.0.2 - Memory consumption 3d-cube access-binary-trees access-fannkuch access-nbody bitops-3bit-bits-in-byte bitops-bits-in-byte bitops-bitwise-and bitops-nsieve-bits controlflow-recursive crypto-aes crypto-md5 crypto-sha1 date-format-tofte date-format-xparb math-cordic math-partial-sums math-spectral-norm string-base64 string-fasta 0 100 200 300 400 500 600 700 76 76 32 36 24 24 24 148 136 104 152 112 60 52 32 28 32 152 44 216 240 160 172 160 160 160 384 204 268 420 304 572 220 164 160 164 324 172 JerryScript Duktape 1.4 Max RSS in KB (lower is better) Measured on a Raspberry Pi 2
  • 26. 26Samsung Open Source Group SunSpider 1.0.2 - Performance 3d-cube access-binary-trees access-fannkuch access-nbody bitops-3bit-bits-in-byte bitops-bits-in-byte bitops-bitwise-and bitops-nsieve-bits controlflow-recursive crypto-aes crypto-md5 crypto-sha1 date-format-tofte date-format-xparb math-cordic math-partial-sums math-spectral-norm string-base64 string-fasta 0 2 4 6 8 10 12 14 16 18 20 2.54 1.36 7.38 2.81 1.62 2.39 3.27 17.88 0.95 3.36 3.29 2.07 2.09 0.83 2.83 1.57 1.46 5.08 3.21 1.44 1.78 3.4 2.23 2.42 2.73 10.75 4.52 1.51 2.58 2.08 1.93 4.64 2.23 3.62 3.73 1.13 5.95 6.46 JerryScript Duktape 1.4 Execution time in seconds (lower is better) Measured on a Raspberry Pi 2
  • 27. 27Samsung Open Source Group ubench - Memory consumption loop-sum loop-empty-resolve loop-empty function-sum function-missing-args function-excess-args function-emtpy function-correct-args function-closure 0 100 200 300 400 500 600 24 24 24 24 24 24 24 24 32 152 152 152 156 156 156 156 156 496 JerryScript Duktape 1.4 Max RSS in KB (lower is better) Measured on a Raspberry Pi 2
  • 28. 28Samsung Open Source Group ubench - Performance loop-sum loop-empty-resolve loop-empty function-sum function-missing-args function-excess-args function-emtpy function-correct-args function-closure 0 10 20 30 40 50 60 70 80 90 35.48 3.42 30.14 18.05 16.09 20.85 19.66 22.18 2.62 76.65 6.41 55.23 23.93 27.35 27.93 38.89 27.95 18.87 JerryScript Duktape 1.4 Execution time in seconds (lower is better) Measured on a Raspberry Pi 2
  • 29. 29Samsung Open Source Group Demo
  • 30. 30Samsung Open Source Group Tetris Demo ● Implementation of the classic Tetris game ● Each device drives one LED matrix as display ● Implemented as a Node.js module ● Both devices are running exactly the same JavaScript code
  • 31. 31Samsung Open Source Group Demo Raspberry Pi 2 (1GB RAM, 8GB Flash) Tetris Node.js V8 Linux STM32F4 board (192KB RAM, 1MB Flash) Tetris IoT.js JerryScript NuttX USB Keypad LED Matrix LED Matrix I2C I2C Switches via GPIO
  • 32. 32Samsung Open Source Group Tetris Demo https://youtu.be/q4iBeOAC7XI
  • 33. 33Samsung Open Source Group Pong Demo ● Implementation of the classic Pong game ● Display shared across two devices ● Each device drives one LED matrix ● Implemented as a Node.js module ● "AI" oppenent running on the microcontroller
  • 34. 34Samsung Open Source Group Demo Raspberry Pi 2 (1GB RAM, 8GB Flash) Pong Client Node.js V8 Linux STM32F4 board (192KB RAM, 1MB Flash) Pong Server IoT.js JerryScript NuttX Ethernet USB Keypad LED Matrix LED Matrix I2C I2C
  • 35. 35Samsung Open Source Group Pong Demo
  • 36. 36Samsung Open Source Group Future work
  • 37. 37Samsung Open Source Group Future work ● Close performance gap between JerryScript and Duktape ● Further performance and memory optimizations ● Enhance JerryScript C API ● Add more IoT.js modules ● Package manager for IoT.js ● Support more devices
  • 38. 38Samsung Open Source Group Summary
  • 39. 39Samsung Open Source Group Summary ● Significantly lowers barrier of entry for JavaScript development targeting heavily constrained embedded devices ● Speeds up development ● Active community ● More information on http://www.jerryscript.net and http://www.iotjs.net ● Looking for bug reports and feedback
  • 41. 41Samsung Open Source Group Contact Information: Tilmann Scheller t.scheller@samsung.com Samsung Open Source Group Samsung Research UK