SlideShare uma empresa Scribd logo
1 de 31
Baixar para ler offline
Firefox OS study group tokyo 9th
Firefox OS for Embedded System and Web APIs
(English version)
2/31
Self Introduction

Twitter: @masap

Embedded System Engineer(mainly Wi-Fi)
3/31
Table of contents

What is WoT ?

Position of Firefox OS on WoT

Add the Web APIs for Firefox OS

Standardization of Web APIs
4/31
What is WoT ?
5/31
review

Today's thema is “Go for it WoT ”!

Review on WoT
6/31
IoT (Internet of Things)

Connect various things to the Internet

By computers on cloud

Summarize informations

Control devices

Cloud
Things
Traffic accident
occurredControl signals,
digital signage
7/31
WoT (Web of Things)

Web = HTTP ?

IoT = IP、Web = HTTP no diferent→

Application
HTTP
IP
Things
Application
Things
IP
IoT WoT
8/31
WoT (Web of Things)

Web = Browser?

We can write all with JavaScript

Browser
HTTP
IP
Things
WoT
ApplicationApplication
IP
Things
IoT
C
C/Java
JavaScript
9/31
Browser as a platform

“Web = Browser” is more acceptable

Accessing to things and connection to the network
could be done via Browser

JavaScript can control things and HTTP protocol

At the standard IoT, almost things will be controlled
with native languages (like C)

⇒Browser as a platform

WoT means this

10/31
Position of Firefox OS on WoT
11/31
Should all the things run
browser ?

Smart Endpoint vs Dumb Endpoint

This question causes debates on IoT

Should the “Things” on IoT be intelligent ?

Don' be involved in the debates. Make an layer
between them. Fog computing⇒

Smart Endpoint Dumb Endpoint
Unintelligent
- Pass the raw data to upper layer
- Do ordered actions
Intelligent
- Pass the summarized data
to upper layer
- Acts autonomously
12/31
What is Fog Computing

Create a Fog Layer between Cloud and Things
Cloud
Things
Cloud
Things
Fog
Data reception server, Database,
Statistical Analytics Server, etc...
temperature, accelerometer,
Geiger-Müller counter, other sensors.
Cloud
Computing
Fog
Computing
Summarize data,
Transform format, etc...
13/31
Example of Fog Layer
Cloud
Things
Fog
Urban planning by AI
Fog
Things
Notify to neighbors
Accidents statistics
Traffic accident
occurredControl signals,
digital signage
14/31
Fog Computing Products

Cisco

Cisco proposes Fog Computing

Cisco has “Cisco Iox” Fog Development Platform

It's too expensive for almost companies
15/31
Fog with Firefox OS

Firefox OS

Fog with Firefox OS

Firefox OS has more hardware access Web APIs than
Chrome、Safari、IE
16/31
What is required for Fog ?

Hardware access via Firefox OS

Firefox OS is built with Web Technology

There is no mechanism like the Android NDK

Can not use native language

Hardware control with JavaScript is required
17/31
The way to control Things via
Web (1)

Via Network

HTTP, nodejs, WebSocket, WebRTC

This way is already used
sensorFirefox OS
network
18/31
The way to control Things via
Web (2)

Control locally

Without network connection

There is not any path for this
⇒ Let them make API
⇒ Create new Web APIs !
sensor
Direct connectionFirefox OS
19/31
Add the Web APIs for Firefox OS
20/31
What is Web API ?

“Web API” has two means

Services on the Web

Twitter API、Youtube API、...

JavaScript API on the Browser (I expect this today)

navigator.getUserMedia, navigator.geolocation, …
21/31
Hardware access Web API

What will we create ?

Create navigator.hardwareaccessxxx API like
navigator.getusermedia

How to create new Web API ?

Modify Firefox
22/31
Modify Firefox

On Firefox, Gecko implements Web APIs

So will add some new code to Gecko to create some new
Web APIs

gecko/dom/geolocation etc...
Gecko
Web Application
Web API
23/31
Required Web API

Popular hardware for IoT

input: sensor

output: motor

Such hardwares has GPIO or I2C interface

Create Web API for GPIO and I2C
24/31
What is GPIO ?

What is GPIO ?

General Purpose Input/Output

Pins connects computers and peripherals

Configure on/of or read on/of of specific pin

Control on/of of LEDs or motors
25/31
What is I2C ?

What is I2C ?

Bus for serial communication

Enables you to read/write a value

GPIO deals only on/of

Almost sensors and motors has this interface
26/31
Web GPIO API

Web GPIO API (part)

navigator.requestGPIOAccess()

Get a GPIO access object

gpio.ports.get(GPIO pin number)

Get a GPIO port object

port.write(value)

Write to a port

port.read()

Read from a port
27/31
Web I2C API

Web I2C API (in progress)

navigator.requestI2CAccess(device_name,address)

Get an I2C device access object

i2c_device.write/read(register address, value);

Write to a register, read from a register

example

Drive a motor with DRV8830
var i2c_device =
navigator.requestI2CAccess("/dev/i2c-1", 0x64);
i2c_device.write(0x00, 0xfd);
28/31
Standardization of Web APIs
29/31
Standardization

WoT is not only Gecko

WoT with V8 or Trident

Standard way is required

Web GPIO is discussed on W3C Browsers and
Robotics Community Group
http://www.w3.org/community/browserobo/
30/31
Example of discussion

Promise vs Return value

Promise

merit: async enabled

demerit: deep nest

Return value

merit: shallow nest

demerit: async disabled
31/31
end

Mais conteúdo relacionado

Destaque

Mark Unwin CV Oct 16
Mark Unwin CV Oct 16Mark Unwin CV Oct 16
Mark Unwin CV Oct 16
Mark Unwin
 
COMPRO JOY GROUP
COMPRO JOY GROUPCOMPRO JOY GROUP
COMPRO JOY GROUP
Donny Eka
 

Destaque (10)

Firefox OS for Embedded System
Firefox OS for Embedded SystemFirefox OS for Embedded System
Firefox OS for Embedded System
 
ROS.js の紹介
ROS.js の紹介ROS.js の紹介
ROS.js の紹介
 
Mark Unwin CV Oct 16
Mark Unwin CV Oct 16Mark Unwin CV Oct 16
Mark Unwin CV Oct 16
 
COMPRO JOY GROUP
COMPRO JOY GROUPCOMPRO JOY GROUP
COMPRO JOY GROUP
 
Prospective Software Investment Program
Prospective Software Investment ProgramProspective Software Investment Program
Prospective Software Investment Program
 
HOJA INFORMATIVA CGT 161013
HOJA INFORMATIVA CGT 161013HOJA INFORMATIVA CGT 161013
HOJA INFORMATIVA CGT 161013
 
Prep 2 tg-unit-2
Prep 2 tg-unit-2Prep 2 tg-unit-2
Prep 2 tg-unit-2
 
Dépannage à domicile : Nouvelles pratiques
Dépannage à domicile : Nouvelles pratiquesDépannage à domicile : Nouvelles pratiques
Dépannage à domicile : Nouvelles pratiques
 
139406323-F
139406323-F139406323-F
139406323-F
 
Portable Ladder Safety
Portable Ladder SafetyPortable Ladder Safety
Portable Ladder Safety
 

Semelhante a Fxos for Embedded Systems (English version)

Add the power of the Web to your embedded devices with WPE WebKit
Add the power of the Web to your embedded devices with WPE WebKitAdd the power of the Web to your embedded devices with WPE WebKit
Add the power of the Web to your embedded devices with WPE WebKit
Igalia
 
Flogo - A Golang-powered Open Source IoT Integration Framework (Gophercon)
Flogo - A Golang-powered Open Source IoT Integration Framework (Gophercon)Flogo - A Golang-powered Open Source IoT Integration Framework (Gophercon)
Flogo - A Golang-powered Open Source IoT Integration Framework (Gophercon)
Kai Wähner
 

Semelhante a Fxos for Embedded Systems (English version) (20)

EPC Cloud: Using the Web to Simplify the Global RFID Network
EPC Cloud: Using the Web to Simplify the Global RFID NetworkEPC Cloud: Using the Web to Simplify the Global RFID Network
EPC Cloud: Using the Web to Simplify the Global RFID Network
 
Add the power of the Web to your embedded devices with WPE WebKit
Add the power of the Web to your embedded devices with WPE WebKitAdd the power of the Web to your embedded devices with WPE WebKit
Add the power of the Web to your embedded devices with WPE WebKit
 
Open Source on Wheels - Tech Day by Init 2017
Open Source on Wheels - Tech Day by Init 2017Open Source on Wheels - Tech Day by Init 2017
Open Source on Wheels - Tech Day by Init 2017
 
Track 4 session 6 - st dev con 2016 - samsung artik
Track 4   session 6 - st dev con 2016 - samsung artikTrack 4   session 6 - st dev con 2016 - samsung artik
Track 4 session 6 - st dev con 2016 - samsung artik
 
WebKit and Blink: Bridging the Gap Between the Kernel and the HTML5 Revolution
WebKit and Blink: Bridging the Gap Between the Kernel and the HTML5 RevolutionWebKit and Blink: Bridging the Gap Between the Kernel and the HTML5 Revolution
WebKit and Blink: Bridging the Gap Between the Kernel and the HTML5 Revolution
 
WebKit and Blink: Bridging the Gap Between the Kernel and the HTML5 Revolutio...
WebKit and Blink: Bridging the Gap Between the Kernel and the HTML5 Revolutio...WebKit and Blink: Bridging the Gap Between the Kernel and the HTML5 Revolutio...
WebKit and Blink: Bridging the Gap Between the Kernel and the HTML5 Revolutio...
 
WbeRTC in IOT presented in KrankyGeek
WbeRTC in IOT presented in KrankyGeekWbeRTC in IOT presented in KrankyGeek
WbeRTC in IOT presented in KrankyGeek
 
IAB3948 Wiring the internet of things with Node-RED
IAB3948 Wiring the internet of things with Node-REDIAB3948 Wiring the internet of things with Node-RED
IAB3948 Wiring the internet of things with Node-RED
 
Eclipse Edje: A Java API for Microcontrollers
Eclipse Edje: A Java API for MicrocontrollersEclipse Edje: A Java API for Microcontrollers
Eclipse Edje: A Java API for Microcontrollers
 
Fullstack IoT Development
Fullstack IoT DevelopmentFullstack IoT Development
Fullstack IoT Development
 
Sigfox x Arduino Workshop
Sigfox x Arduino Workshop Sigfox x Arduino Workshop
Sigfox x Arduino Workshop
 
Flogo - A Golang-powered Open Source IoT Integration Framework (Gophercon)
Flogo - A Golang-powered Open Source IoT Integration Framework (Gophercon)Flogo - A Golang-powered Open Source IoT Integration Framework (Gophercon)
Flogo - A Golang-powered Open Source IoT Integration Framework (Gophercon)
 
IoT Workshop with Sigfox & Arduino - Copenhagen Business School
IoT Workshop with Sigfox & Arduino - Copenhagen Business SchoolIoT Workshop with Sigfox & Arduino - Copenhagen Business School
IoT Workshop with Sigfox & Arduino - Copenhagen Business School
 
Programming IoT Gateways with macchina.io
Programming IoT Gateways with macchina.ioProgramming IoT Gateways with macchina.io
Programming IoT Gateways with macchina.io
 
The Internet of Things with InduSoft and Raspberry Pi
The Internet of Things with InduSoft and Raspberry PiThe Internet of Things with InduSoft and Raspberry Pi
The Internet of Things with InduSoft and Raspberry Pi
 
IxorTalk IoT Convention 2018
IxorTalk IoT Convention 2018IxorTalk IoT Convention 2018
IxorTalk IoT Convention 2018
 
IRJET - Mirroring of Source and Sink Devices in Android Screen Casting
IRJET - Mirroring of Source and Sink Devices in Android Screen CastingIRJET - Mirroring of Source and Sink Devices in Android Screen Casting
IRJET - Mirroring of Source and Sink Devices in Android Screen Casting
 
Flutter Festival London 2022 - End to end IoT with Dart and Flutter
Flutter Festival London 2022 - End to end IoT with Dart and FlutterFlutter Festival London 2022 - End to end IoT with Dart and Flutter
Flutter Festival London 2022 - End to end IoT with Dart and Flutter
 
MachinePulse at the November Open Hardware Meetup, Mumbai 2014
MachinePulse at the November Open Hardware Meetup, Mumbai 2014MachinePulse at the November Open Hardware Meetup, Mumbai 2014
MachinePulse at the November Open Hardware Meetup, Mumbai 2014
 
Node-RED Interoperability Test
Node-RED Interoperability TestNode-RED Interoperability Test
Node-RED Interoperability Test
 

Mais de Honma Masashi

Photo hack day Japan 2014 プレゼン資料
Photo hack day Japan 2014 プレゼン資料Photo hack day Japan 2014 プレゼン資料
Photo hack day Japan 2014 プレゼン資料
Honma Masashi
 
Firefox OS 日本語 IME 開発状況
Firefox OS 日本語 IME 開発状況Firefox OS 日本語 IME 開発状況
Firefox OS 日本語 IME 開発状況
Honma Masashi
 
Firefox OS を使って HTML5 でハードウェアを動かしてみよう
Firefox OS を使って HTML5 でハードウェアを動かしてみようFirefox OS を使って HTML5 でハードウェアを動かしてみよう
Firefox OS を使って HTML5 でハードウェアを動かしてみよう
Honma Masashi
 
Designers hack 011 ウォシュレットのリモコンから UI を極力無くすには
Designers hack 011 ウォシュレットのリモコンから UI を極力無くすにはDesigners hack 011 ウォシュレットのリモコンから UI を極力無くすには
Designers hack 011 ウォシュレットのリモコンから UI を極力無くすには
Honma Masashi
 
次世代プラットフォームでのHTML5アプリ開発 Firefox OS/Ubuntu Touch
次世代プラットフォームでのHTML5アプリ開発 Firefox OS/Ubuntu Touch次世代プラットフォームでのHTML5アプリ開発 Firefox OS/Ubuntu Touch
次世代プラットフォームでのHTML5アプリ開発 Firefox OS/Ubuntu Touch
Honma Masashi
 
Firefox OS 2012 年まとめ
Firefox OS 2012 年まとめFirefox OS 2012 年まとめ
Firefox OS 2012 年まとめ
Honma Masashi
 
さわってみよう Firefox OS in 福岡
さわってみよう Firefox OS in 福岡さわってみよう Firefox OS in 福岡
さわってみよう Firefox OS in 福岡
Honma Masashi
 
Firefox OS の Wi-Fi 機能改善
Firefox OS の Wi-Fi 機能改善Firefox OS の Wi-Fi 機能改善
Firefox OS の Wi-Fi 機能改善
Honma Masashi
 
デザイナー目線で Firefox OS を変えよう
デザイナー目線で Firefox OS を変えようデザイナー目線で Firefox OS を変えよう
デザイナー目線で Firefox OS を変えよう
Honma Masashi
 
Firefox OS カスタム ROM の作成
Firefox OS カスタム ROM の作成Firefox OS カスタム ROM の作成
Firefox OS カスタム ROM の作成
Honma Masashi
 

Mais de Honma Masashi (12)

HTML5 によるロボット制御
HTML5 によるロボット制御HTML5 によるロボット制御
HTML5 によるロボット制御
 
Photo hack day Japan 2014 プレゼン資料
Photo hack day Japan 2014 プレゼン資料Photo hack day Japan 2014 プレゼン資料
Photo hack day Japan 2014 プレゼン資料
 
Firefox OS 日本語 IME 開発状況
Firefox OS 日本語 IME 開発状況Firefox OS 日本語 IME 開発状況
Firefox OS 日本語 IME 開発状況
 
Firefox OS を使って HTML5 でハードウェアを動かしてみよう
Firefox OS を使って HTML5 でハードウェアを動かしてみようFirefox OS を使って HTML5 でハードウェアを動かしてみよう
Firefox OS を使って HTML5 でハードウェアを動かしてみよう
 
Designers hack 011 ウォシュレットのリモコンから UI を極力無くすには
Designers hack 011 ウォシュレットのリモコンから UI を極力無くすにはDesigners hack 011 ウォシュレットのリモコンから UI を極力無くすには
Designers hack 011 ウォシュレットのリモコンから UI を極力無くすには
 
次世代プラットフォームでのHTML5アプリ開発 Firefox OS/Ubuntu Touch
次世代プラットフォームでのHTML5アプリ開発 Firefox OS/Ubuntu Touch次世代プラットフォームでのHTML5アプリ開発 Firefox OS/Ubuntu Touch
次世代プラットフォームでのHTML5アプリ開発 Firefox OS/Ubuntu Touch
 
さわってみよう Firefox OS in 大阪
さわってみよう Firefox OS in 大阪さわってみよう Firefox OS in 大阪
さわってみよう Firefox OS in 大阪
 
Firefox OS 2012 年まとめ
Firefox OS 2012 年まとめFirefox OS 2012 年まとめ
Firefox OS 2012 年まとめ
 
さわってみよう Firefox OS in 福岡
さわってみよう Firefox OS in 福岡さわってみよう Firefox OS in 福岡
さわってみよう Firefox OS in 福岡
 
Firefox OS の Wi-Fi 機能改善
Firefox OS の Wi-Fi 機能改善Firefox OS の Wi-Fi 機能改善
Firefox OS の Wi-Fi 機能改善
 
デザイナー目線で Firefox OS を変えよう
デザイナー目線で Firefox OS を変えようデザイナー目線で Firefox OS を変えよう
デザイナー目線で Firefox OS を変えよう
 
Firefox OS カスタム ROM の作成
Firefox OS カスタム ROM の作成Firefox OS カスタム ROM の作成
Firefox OS カスタム ROM の作成
 

Último

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 

Fxos for Embedded Systems (English version)

  • 1. Firefox OS study group tokyo 9th Firefox OS for Embedded System and Web APIs (English version)
  • 3. 3/31 Table of contents  What is WoT ?  Position of Firefox OS on WoT  Add the Web APIs for Firefox OS  Standardization of Web APIs
  • 5. 5/31 review  Today's thema is “Go for it WoT ”!  Review on WoT
  • 6. 6/31 IoT (Internet of Things)  Connect various things to the Internet  By computers on cloud  Summarize informations  Control devices  Cloud Things Traffic accident occurredControl signals, digital signage
  • 7. 7/31 WoT (Web of Things)  Web = HTTP ?  IoT = IP、Web = HTTP no diferent→  Application HTTP IP Things Application Things IP IoT WoT
  • 8. 8/31 WoT (Web of Things)  Web = Browser?  We can write all with JavaScript  Browser HTTP IP Things WoT ApplicationApplication IP Things IoT C C/Java JavaScript
  • 9. 9/31 Browser as a platform  “Web = Browser” is more acceptable  Accessing to things and connection to the network could be done via Browser  JavaScript can control things and HTTP protocol  At the standard IoT, almost things will be controlled with native languages (like C)  ⇒Browser as a platform  WoT means this 
  • 11. 11/31 Should all the things run browser ?  Smart Endpoint vs Dumb Endpoint  This question causes debates on IoT  Should the “Things” on IoT be intelligent ?  Don' be involved in the debates. Make an layer between them. Fog computing⇒  Smart Endpoint Dumb Endpoint Unintelligent - Pass the raw data to upper layer - Do ordered actions Intelligent - Pass the summarized data to upper layer - Acts autonomously
  • 12. 12/31 What is Fog Computing  Create a Fog Layer between Cloud and Things Cloud Things Cloud Things Fog Data reception server, Database, Statistical Analytics Server, etc... temperature, accelerometer, Geiger-Müller counter, other sensors. Cloud Computing Fog Computing Summarize data, Transform format, etc...
  • 13. 13/31 Example of Fog Layer Cloud Things Fog Urban planning by AI Fog Things Notify to neighbors Accidents statistics Traffic accident occurredControl signals, digital signage
  • 14. 14/31 Fog Computing Products  Cisco  Cisco proposes Fog Computing  Cisco has “Cisco Iox” Fog Development Platform  It's too expensive for almost companies
  • 15. 15/31 Fog with Firefox OS  Firefox OS  Fog with Firefox OS  Firefox OS has more hardware access Web APIs than Chrome、Safari、IE
  • 16. 16/31 What is required for Fog ?  Hardware access via Firefox OS  Firefox OS is built with Web Technology  There is no mechanism like the Android NDK  Can not use native language  Hardware control with JavaScript is required
  • 17. 17/31 The way to control Things via Web (1)  Via Network  HTTP, nodejs, WebSocket, WebRTC  This way is already used sensorFirefox OS network
  • 18. 18/31 The way to control Things via Web (2)  Control locally  Without network connection  There is not any path for this ⇒ Let them make API ⇒ Create new Web APIs ! sensor Direct connectionFirefox OS
  • 19. 19/31 Add the Web APIs for Firefox OS
  • 20. 20/31 What is Web API ?  “Web API” has two means  Services on the Web  Twitter API、Youtube API、...  JavaScript API on the Browser (I expect this today)  navigator.getUserMedia, navigator.geolocation, …
  • 21. 21/31 Hardware access Web API  What will we create ?  Create navigator.hardwareaccessxxx API like navigator.getusermedia  How to create new Web API ?  Modify Firefox
  • 22. 22/31 Modify Firefox  On Firefox, Gecko implements Web APIs  So will add some new code to Gecko to create some new Web APIs  gecko/dom/geolocation etc... Gecko Web Application Web API
  • 23. 23/31 Required Web API  Popular hardware for IoT  input: sensor  output: motor  Such hardwares has GPIO or I2C interface  Create Web API for GPIO and I2C
  • 24. 24/31 What is GPIO ?  What is GPIO ?  General Purpose Input/Output  Pins connects computers and peripherals  Configure on/of or read on/of of specific pin  Control on/of of LEDs or motors
  • 25. 25/31 What is I2C ?  What is I2C ?  Bus for serial communication  Enables you to read/write a value  GPIO deals only on/of  Almost sensors and motors has this interface
  • 26. 26/31 Web GPIO API  Web GPIO API (part)  navigator.requestGPIOAccess()  Get a GPIO access object  gpio.ports.get(GPIO pin number)  Get a GPIO port object  port.write(value)  Write to a port  port.read()  Read from a port
  • 27. 27/31 Web I2C API  Web I2C API (in progress)  navigator.requestI2CAccess(device_name,address)  Get an I2C device access object  i2c_device.write/read(register address, value);  Write to a register, read from a register  example  Drive a motor with DRV8830 var i2c_device = navigator.requestI2CAccess("/dev/i2c-1", 0x64); i2c_device.write(0x00, 0xfd);
  • 29. 29/31 Standardization  WoT is not only Gecko  WoT with V8 or Trident  Standard way is required  Web GPIO is discussed on W3C Browsers and Robotics Community Group http://www.w3.org/community/browserobo/
  • 30. 30/31 Example of discussion  Promise vs Return value  Promise  merit: async enabled  demerit: deep nest  Return value  merit: shallow nest  demerit: async disabled