SlideShare une entreprise Scribd logo
1  sur  39
Télécharger pour lire hors ligne
e10s 
@makoto_kato
about:me 
• 
• 
• 
• 
•
•Rust Samurai #4-https://atnd.org/events/54657
Agenda 
•Electrolysis (e10s) ? 
•Firefox OS
•Firefox / Gecko
e10s 
•FirefoxOut-Of-Process Plugin 
•Firefox 3.6 
•FirefoxDRM/CDM(Content Decryption Module) 
•Firefox 3x? 
•FirefoxChromeContent 
•(Nightly) 
•Firefox OS
Firefox OS 
•b2g 
•plugin-container 
• 
•APIb2g
Kernel / Gonk 
b2g process 
Plugin- container 
process 
(Apps) 
Plugin- container process 
(Apps) 
Hardware Access 
IPC 
IPC
(IPC) 
•ChromiumIPC 
•IPCIPDL 
•IDL
IPDL 
•IDL 
• 
•IPDL 
• 
•
ipdl 
hal/sandbox/PHal.idl 
sync protocol PHal{ 
… 
child: 
NotifyBatteryChange( 
BatteryInformationaBatteryInfo); 
… 
parent: 
Vibrate(uint32_t[] pattern, uint64_t[] id, 
PBrowserbrowser); 
}
() 
@OBJDIR@/ipc/ipdl/_ipdlheaders/mozilla/hal_sandbox/PHal.h 
class Msg_NotifyBatteryChange: 
public IPC::Message 
… 
}
() 
@OBJDIR@/ipc/ipdl/_ipdlheaders/mozilla/hal_sandbox/PHalChild.h 
class /*NS_ABSTRACT_CLASS*/ PHalParent: 
public mozilla::ipc::IProtocol, 
protected mozilla::ipc::IProtocolManager<mozilla::ipc::IProtocol> 
{ 
… 
virtual bool 
RecvVibrate( 
constnsTArray<uint32_t>& pattern, 
constnsTArray<uint64_t>& id, 
PBrowserParent* browser) = 0; 
… 
bool 
SendNotifyBatteryChange(constBatteryInformation& aBatteryInfo) NS_WARN_UNUSED_RESULT;
() 
@OBJDIR@/ipc/ipdl/_ipdlheaders/mozilla/hal_sandbox/PHalChild.h 
class /*NS_ABSTRACT_CLASS*/ PHalChild: 
public mozilla::ipc::IProtocol, 
protected mozilla::ipc::IProtocolManager<mozilla::ipc::IProtocol> 
{ 
… 
virtual bool 
RecvNotifyBatteryChange(constBatteryInformation& aBatteryInfo) = 0; 
… 
bool 
SendVibrate( 
constnsTArray<uint32_t>& pattern, 
constnsTArray<uint64_t>& id, 
PBrowserChild* browser);
template<> 
structParamTraits<mozilla::WidgetGUIEvent> 
{ 
typedefmozilla::WidgetGUIEventparamType; 
static void Write(Message* aMsg, constparamType& aParam) 
{ 
WriteParam(aMsg, static_cast<mozilla::WidgetEvent>(aParam)); 
WriteParam(aMsg, aParam.mPluginEvent.mBuffer); 
} 
static boolRead(constMessage* aMsg, void** aIter, 
paramType* aResult) 
{ 
return ReadParam(aMsg, aIter, 
static_cast<mozilla::WidgetEvent*>(aResult)) && 
ReadParam(aMsg, aIter, &aResult->mPluginEvent.mBuffer); 
}
IPC 
•B2g(Chrome) (Content) 
•b2g
•XMLHttpRequsest 
•WebSocket 
•Socket (TCP/UDP) 
•Web Activity 
•Inter App Communication
XMLHttpRequest/ WebSocket 
•
XMLHttpRequest/ WebSocket 
• 
•HTTP 
•Firefox OSDaemon ProcessDaemon Process 
•DRM 
•LocalhostNetwork Activity
Socket API 
•TCP or UDP Socket 
• 
•
TCPSocket () 
varsocket = new navigator.mozTCPSocket.open( 
‘127.0.0.1’, 8888, { binaryType: ‘string’ } ); 
socket.onopen= function() { 
}; 
socket.ondata= function(msg) { 
// 
}; 
… 
socket.send(‘hello’);
TCP Server Socket 
varsocket = navigator.mozTCPSocket.listen(8888, { binaryType: ‘string’ }); 
Socket.onconnect= function() { 
// 
} 
…
UDP Socket 
varsocket = new UDPSocket(); 
socket.addEventListener(‘message’, function() { 
// 
}) 
socket.send(‘hello’, ‘127.0.0.1’, 8888);
Web Activity 
•Web IntentAPI (Google Chrome) Firefox OSCounter Proposal
“Web Activities' intent is not to be a clone of Google's Web Intents with some naming and API details changed. Web Activities aim to be a simple API trying to solve a very clear set of use cases.” http://lists.w3.org/Archives/Public/public-web- intents/2012Jun/0061.html
•MozActivity
varactivity = new MozActivity( { 
name: “pick”, 
data: { 
type: “image/jpeg” 
} 
}); 
activity.onsuccess= function() { 
// this.result 
}
• 
• 
•
{ 
“name”: ‘<Application Name>’, 
“description”: ‘<Application’s description>’, 
“activities”: { 
“view” : { 
“filters”: { 
“type” : “image/tiff” 
} 
} 
} 
}
varregister = navigator.mozRegisterActivityHandler({ 
name: “view”, 
disposition: “inline”, 
filters: { 
type: “image/tiff”; 
} 
}
navigator.mozSetMessageHandler(‘activity’, function(request) { 
// 
request.postRequest(…); 
}
Web Activity 
• 
•1:n 
•
Inter-App Communication (IAC) 
•Firefox OS 1.2+ 
•Certified App only 
•Web Activity 
• 
•–Publisher 
• 
•-Subscriber
“connections” { 
“<keyword>” : { 
“handler_path”: “/index.html”, 
“description”: “description”, 
“rules” : { 
“manifestURLs”: “<url>”, 
… 
} 
} 
}
navigator.mozApps.getSelf().onsuccess= function(ev) { 
varapp = ev.target.result; 
app.connet(‘<keyword>’, rules).then(function(ports) { 
// connected 
ports.forEach(function(port) { 
port.onmessage= function(evt) { 
// received data 
}); 
port.postMessage({ value: ‘hello’ }); 
} 
}, function(reason) { 
// reject 
}); 
};
navigator.mozSetMessageHandler(‘connection’, 
function(request) { 
varkeyword = request.keyword; 
varport = request.port; 
port.onmessage= function(evt) { 
varmessage = evt.data; 
port.postMessage({ value: “Hello” }); 
} 
});
Inter App Communication 
•Certified App 
•Certified 
•1:1
•e10sGecko 
•Gecko 
•Firefox OS(Web Activity / Inter- App Communication) e10s 
•APINetwork Activity 
•Gecko 
•XMLHttpRequest/ WebSocket/ Socket API
References 
•mozTCPSocket 
•https://developer.mozilla.org/en- US/docs/Web/API/Navigator.mozTCPSocket 
•WebActivities 
•https://developer.mozilla.org/en- US/docs/Web/API/Web_Activities 
•Inter App Communication 
•https://wiki.mozilla.org/WebAPI/Inter_App_Communication 
•https://bugzilla.mozilla.org/show_bug.cgi?id=907068

Contenu connexe

Tendances

Meetup uikit programming
Meetup uikit programmingMeetup uikit programming
Meetup uikit programming
joaopmaia
 

Tendances (19)

Ktor 101 (以 Ktor 實作 Website 範例)
Ktor 101 (以 Ktor 實作 Website 範例)Ktor 101 (以 Ktor 實作 Website 範例)
Ktor 101 (以 Ktor 實作 Website 範例)
 
Kotlin for Web (with Ktor)
Kotlin for Web (with Ktor)Kotlin for Web (with Ktor)
Kotlin for Web (with Ktor)
 
Meetup uikit programming
Meetup uikit programmingMeetup uikit programming
Meetup uikit programming
 
通过 Ktor 迅速打造以 Kotlin 为核心的后端服务应用
通过 Ktor 迅速打造以 Kotlin 为核心的后端服务应用通过 Ktor 迅速打造以 Kotlin 为核心的后端服务应用
通过 Ktor 迅速打造以 Kotlin 为核心的后端服务应用
 
以 Kotlin 快速打造 Mobile Backend
以 Kotlin 快速打造 Mobile Backend以 Kotlin 快速打造 Mobile Backend
以 Kotlin 快速打造 Mobile Backend
 
Geb presentation
Geb presentationGeb presentation
Geb presentation
 
Kotlin 在 Web 方面的应用
Kotlin 在 Web 方面的应用Kotlin 在 Web 方面的应用
Kotlin 在 Web 方面的应用
 
以 Ktor 快速打造 Web 應用
以 Ktor 快速打造 Web 應用以 Ktor 快速打造 Web 應用
以 Ktor 快速打造 Web 應用
 
Drupal @ MediaCamp Athens
Drupal @ MediaCamp Athens Drupal @ MediaCamp Athens
Drupal @ MediaCamp Athens
 
Creating Your Own Static Website Generator
Creating Your Own Static Website GeneratorCreating Your Own Static Website Generator
Creating Your Own Static Website Generator
 
Kotlin 讀書會 #1
Kotlin 讀書會 #1Kotlin 讀書會 #1
Kotlin 讀書會 #1
 
Banquet 50
Banquet 50Banquet 50
Banquet 50
 
Web components
Web componentsWeb components
Web components
 
Look Towards 2.0 and Beyond - eZ Conference 2016
Look Towards 2.0 and Beyond -   eZ Conference 2016Look Towards 2.0 and Beyond -   eZ Conference 2016
Look Towards 2.0 and Beyond - eZ Conference 2016
 
Ktor 部署攻略 - 老派 Fat Jar 大法
Ktor 部署攻略 - 老派 Fat Jar 大法Ktor 部署攻略 - 老派 Fat Jar 大法
Ktor 部署攻略 - 老派 Fat Jar 大法
 
Webdriver io presentation
Webdriver io presentationWebdriver io presentation
Webdriver io presentation
 
Introduction to asp.net Wroclaw
Introduction to asp.net WroclawIntroduction to asp.net Wroclaw
Introduction to asp.net Wroclaw
 
[HKOSCon 2020] Build an api service using ktor rapidly
[HKOSCon 2020] Build an api service using ktor rapidly[HKOSCon 2020] Build an api service using ktor rapidly
[HKOSCon 2020] Build an api service using ktor rapidly
 
In-browser storage and me
In-browser storage and meIn-browser storage and me
In-browser storage and me
 

Similaire à e10sとアプリ間通信

MozTW Jetpack Workshop: Taichung
MozTW Jetpack Workshop: TaichungMozTW Jetpack Workshop: Taichung
MozTW Jetpack Workshop: Taichung
littlebtc
 
MozTW Jetpack Workshop: Taipei
MozTW Jetpack Workshop: TaipeiMozTW Jetpack Workshop: Taipei
MozTW Jetpack Workshop: Taipei
littlebtc
 

Similaire à e10sとアプリ間通信 (20)

スマートフォンサイトの作成術 - 大川洋一
スマートフォンサイトの作成術 - 大川洋一スマートフォンサイトの作成術 - 大川洋一
スマートフォンサイトの作成術 - 大川洋一
 
MozTW Jetpack Workshop: Taichung
MozTW Jetpack Workshop: TaichungMozTW Jetpack Workshop: Taichung
MozTW Jetpack Workshop: Taichung
 
Web Standards Support in WebKit
Web Standards Support in WebKitWeb Standards Support in WebKit
Web Standards Support in WebKit
 
Android lessons you won't learn in school
Android lessons you won't learn in schoolAndroid lessons you won't learn in school
Android lessons you won't learn in school
 
HTML5 on Mobile
HTML5 on MobileHTML5 on Mobile
HTML5 on Mobile
 
Firefox OS - The platform you deserve - Athens App Days - 2013-11-27
Firefox OS - The platform you deserve - Athens App Days - 2013-11-27Firefox OS - The platform you deserve - Athens App Days - 2013-11-27
Firefox OS - The platform you deserve - Athens App Days - 2013-11-27
 
Plone FSR
Plone FSRPlone FSR
Plone FSR
 
Web Performance Part 4 "Client-side performance"
Web Performance Part 4  "Client-side performance"Web Performance Part 4  "Client-side performance"
Web Performance Part 4 "Client-side performance"
 
MozTW Jetpack Workshop: Taipei
MozTW Jetpack Workshop: TaipeiMozTW Jetpack Workshop: Taipei
MozTW Jetpack Workshop: Taipei
 
[Serverless Meetup Tokyo #3] Serverless in Azure (Azure Functionsのアップデート、事例、デ...
[Serverless Meetup Tokyo #3] Serverless in Azure (Azure Functionsのアップデート、事例、デ...[Serverless Meetup Tokyo #3] Serverless in Azure (Azure Functionsのアップデート、事例、デ...
[Serverless Meetup Tokyo #3] Serverless in Azure (Azure Functionsのアップデート、事例、デ...
 
Building APIs in an easy way using API Platform
Building APIs in an easy way using API PlatformBuilding APIs in an easy way using API Platform
Building APIs in an easy way using API Platform
 
The Open & Social Web - Kings of Code 2009
The Open & Social Web - Kings of Code 2009The Open & Social Web - Kings of Code 2009
The Open & Social Web - Kings of Code 2009
 
ITB2017 - Keynote
ITB2017 - KeynoteITB2017 - Keynote
ITB2017 - Keynote
 
How to Contribute to Apache Usergrid
How to Contribute to Apache UsergridHow to Contribute to Apache Usergrid
How to Contribute to Apache Usergrid
 
Firefox OS - The platform you deserve - Firefox OS Budapest workshop - 2013-1...
Firefox OS - The platform you deserve - Firefox OS Budapest workshop - 2013-1...Firefox OS - The platform you deserve - Firefox OS Budapest workshop - 2013-1...
Firefox OS - The platform you deserve - Firefox OS Budapest workshop - 2013-1...
 
Google App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and GaelykGoogle App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and Gaelyk
 
Mobile Web Development with HTML5
Mobile Web Development with HTML5Mobile Web Development with HTML5
Mobile Web Development with HTML5
 
Node.js: The What, The How and The When
Node.js: The What, The How and The WhenNode.js: The What, The How and The When
Node.js: The What, The How and The When
 
REST easy with API Platform
REST easy with API PlatformREST easy with API Platform
REST easy with API Platform
 
Iac d.damyanov 4.pptx
Iac d.damyanov 4.pptxIac d.damyanov 4.pptx
Iac d.damyanov 4.pptx
 

Plus de Makoto Kato

Firefox 4 and Mobile
Firefox 4 and MobileFirefox 4 and Mobile
Firefox 4 and Mobile
Makoto Kato
 
Firefox mobile for android internals
Firefox mobile for android internalsFirefox mobile for android internals
Firefox mobile for android internals
Makoto Kato
 
Firefox 4 with SVG
Firefox 4 with SVGFirefox 4 with SVG
Firefox 4 with SVG
Makoto Kato
 
Firefox for mobile
Firefox for mobileFirefox for mobile
Firefox for mobile
Makoto Kato
 
Firefoxの開発プロセス
Firefoxの開発プロセスFirefoxの開発プロセス
Firefoxの開発プロセス
Makoto Kato
 

Plus de Makoto Kato (20)

Emoji
EmojiEmoji
Emoji
 
Moz2D
Moz2DMoz2D
Moz2D
 
Firefox OSのアーキテクチャと構成技術
Firefox OSのアーキテクチャと構成技術Firefox OSのアーキテクチャと構成技術
Firefox OSのアーキテクチャと構成技術
 
Mozillaのビルドインフラ
MozillaのビルドインフラMozillaのビルドインフラ
Mozillaのビルドインフラ
 
Openness, Innovation and Opptunity
Openness, Innovation and OpptunityOpenness, Innovation and Opptunity
Openness, Innovation and Opptunity
 
Mobile Web
Mobile WebMobile Web
Mobile Web
 
Firefox Mobile
Firefox MobileFirefox Mobile
Firefox Mobile
 
Firefox 4 and Mobile
Firefox 4 and MobileFirefox 4 and Mobile
Firefox 4 and Mobile
 
Mobile addon
Mobile addonMobile addon
Mobile addon
 
keep it real
keep it realkeep it real
keep it real
 
Firefox mobile for android internals
Firefox mobile for android internalsFirefox mobile for android internals
Firefox mobile for android internals
 
Think.next
Think.nextThink.next
Think.next
 
Firefox 4 with SVG
Firefox 4 with SVGFirefox 4 with SVG
Firefox 4 with SVG
 
Firefox for mobile
Firefox for mobileFirefox for mobile
Firefox for mobile
 
Firefoxの開発プロセス
Firefoxの開発プロセスFirefoxの開発プロセス
Firefoxの開発プロセス
 
"Open"
"Open""Open"
"Open"
 
ブラウザの歴史
ブラウザの歴史ブラウザの歴史
ブラウザの歴史
 
Raindrop
RaindropRaindrop
Raindrop
 
CSS3の最新事情
CSS3の最新事情CSS3の最新事情
CSS3の最新事情
 
FirefoxとMozillaでのSVGの取り組み
FirefoxとMozillaでのSVGの取り組みFirefoxとMozillaでのSVGの取り組み
FirefoxとMozillaでのSVGの取り組み
 

Dernier

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Dernier (20)

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?
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
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...
 
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...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
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
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
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)
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - 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
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
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
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 

e10sとアプリ間通信