SlideShare ist ein Scribd-Unternehmen logo
1 von 26
Downloaden Sie, um offline zu lesen
#DevoxxUS
Lean and Easy IoT Applications
with OSGi and Eclipse Concierge
Jan S. Rellermeyer, IBM Research
#eclipseIoT @rellermeyer
#DevoxxUS
THE INFORMATION CONTAINED IN THIS PRESENTATION IS PROVIDED FOR INFORMATIONAL PURPOSES
ONLY.
WHILST EFFORTS WERE MADE TO VERIFY THE COMPLETENESS AND ACCURACY OF THE INFORMATION
CONTAINED IN THIS PRESENTATION, IT IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED.
ALL PERFORMANCE DATA INCLUDED IN THIS PRESENTATION HAVE BEEN GATHERED IN A CONTROLLED
ENVIRONMENT. YOUR OWN TEST RESULTS MAY VARY BASED ON HARDWARE, SOFTWARE OR
INFRASTRUCTURE DIFFERENCES.
ALL DATA INCLUDED IN THIS PRESENTATION ARE MEANT TO BE USED ONLY AS A GUIDE.
IN ADDITION, THE INFORMATION CONTAINED IN THIS PRESENTATION IS BASED ON IBM’S CURRENT
PRODUCT PLANS AND STRATEGY, WHICH ARE SUBJECT TO CHANGE BY IBM, WITHOUT NOTICE.
IBM AND ITS AFFILIATED COMPANIES SHALL NOT BE RESPONSIBLE FOR ANY DAMAGES ARISING OUT OF
THE USE OF, OR OTHERWISE RELATED TO, THIS PRESENTATION OR ANY OTHER DOCUMENTATION.
NOTHING CONTAINED IN THIS PRESENTATION IS INTENDED TO, OR SHALL HAVE THE EFFECT OF:
- CREATING ANY WARRANT OR REPRESENTATION FROM IBM, ITS AFFILIATED COMPANIES OR ITS OR
THEIR SUPPLIERS AND/OR LICENSORS
Important Disclaimers
#eclipseIoT @rellermeyer
#DevoxxUS
Software Lifecycle Management
#eclipseIoT @rellermeyer
Module A
Module B
Module C
Module D
#DevoxxUS
OSGi Module Layer
Modules are called Bundles
• JAR files with additional metadata
Runtime system: The Framework
• Lifecycle management
Bundles implement isolation and locality
• Interaction between bundles is limited
• Shared code through package imports
• Every bundle is loaded through a separate classloader
Monitoring system state through events
#eclipseIoT @rellermeyer
Module
Module Module
#DevoxxUS
OSGi Framework
OSGi Framework
BundleA
Package 1
Package 2
Package 3
BundleB
Package I
Package II
Exported Package Exported Package
Private Package
Import
Export-Package: Package 1 Export-Package: Package I, Package II
Import-Package: Package 1
#eclipseIoT @rellermeyer
#DevoxxUS
OSGi Service Layer
Modules allow for a compositional approach to building applications
But: Package dependencies are explicit.
Limits the modularity!
Solution: Services
Idea: Separate the interface from the implementation
Module
Module Module
Interface
Implementation
Service Service
#eclipseIoT @rellermeyer
#DevoxxUS
OSGi for IoT
IoT systems are often dynamic
•Sensors and actuators might not always be available
•N:M relationship between producers and consumers
Event
Source
Event
Listener
Service
gets registers
receives service life-cycle events
Service Registry
#eclipseIoT @rellermeyer
#DevoxxUS
Eclipse Concierge
Full OSGi core R5 compatibility
• Goal achieved
Keep a small footprint to work well on embedded
devices
• 250kiB without debug symbols
• 330kiB with debug symbols
Remain “readable”
• Currently 9 classes
Remain backwards-compatible
• Java 5
#eclipseIoT @rellermeyer
#DevoxxUS
Building IoT Applications
• Concierge supports Knopflerfish-style xargs file for startup
• Enhanced property (variable replacement) and install notation (wildcard support)
• Supports start level in scripts (-level <n>)
#eclipseIoT @rellermeyer
$ java -jar framework/org.eclipse.concierge-5.0.0.*.jar samples/demo.xargs
# demo.xargs
-Dorg.osgi.framework.system.packages.extra+=javax.xml.parsers
# -Drepo=http://www.us.apache.org/dist/felix
-Drepo=localRepo
# load bundles, use wildcard notation for local files, not for URLs
-istart bundles/org.eclipse.concierge.shell-5.0.0.*.jar
-istart bundles/org.eclipse.concierge.service.startlevel-5.0.0.*.jar
-istart bundles/org.eclipse.concierge.service.packageadmin-5.0.0.*.jar
-istart ${repo}/org.apache.felix.httplite.complete-0.1.4.jar
-istart ${repo}/org.apache.felix.webconsole-4.2.14-all.jar
#DevoxxUS
Remote Management
• RESTful interface
• Exposing the framework and its internal state as resources
• Bundles
• Services
• Easy management of OSGi deployments through REST
• Command line tools
• Web interfaces
• Application-level
#eclipseIoT @rellermeyer
#DevoxxUS
Use Case: Eclipse SmartHome
#eclipseIoT @rellermeyer
+
openHAB2 smarthome-concierge
Distribution 160 MB 19 MB
OSGi (no Karaf) 3.1 MB 1.6 MB
EMF/xText 7 MB 0 MB
Java Runtime 32 MB 16 MB (compact3)
12 MB (compact2)
Memory footprint ~32 MB ~15 MB
Startup time ~40 sec ~30 sec
#DevoxxUS
Use Case: iMinds IoT Lab
#eclipseIoT @rellermeyer
#DevoxxUS
Use Case: OSGi enRoute
OSGi enRoute uses OSGi R6 and bndtools
• R6 implementation of Concierge available as a snapshot
• OSGi repository hosted at the Concierge website
#eclipseIoT @rellermeyer
#DevoxxUS
Experiments
Beaglebone Rev A5
•AM335x 720MHz ARM Cortex-A8
•256 MiB DDR2 RAM
•4 GiB microSD card
•Angstrom Linux
•Java SE Embedded 1.7.0_21-b11 and
•Java SE Embedded build 1.8.0_06-b23 compact1
Image: http://beaglebone.org
Raspberry Pi B
•ARM1176JZF-S 700 MHz ARM 11
•512 MiB SDRAM (shared with GPU)
•8 GiB SDHD card
•Raspbian Linux
•Java SE build 1.8.0-b132
#eclipseIoT @rellermeyer
#DevoxxUS
Experiments
Eclipse Equinox
• version 3.11.2.v20161107-1947
• 1.3 MiB
• (R6 framework)
Apache Felix
• version 5.6.2
• 697 kiB
Knopflerfish
• version 7.2.0
• 609kiB / 320kiB compact
Concierge
• version 5.1.0 SNAPSHOT
• 248kiB
#DevoxxUS
Performance – Startup Time
#eclipseIoT @rellermeyer
0
2
4
6
8
10
12
14
16
18
20
Beaglebone	ejre7 Beaglebone	ejre8 Raspberry	Pi
time(s)
VM
Concierge
Equinox
Felix
Knopflerfish
#DevoxxUS
Performance – Service Registry
Stress test
Register 10000 services
• Each one has a random value for the same key
• Range: byte => collisions
Perform 1000 lookups (getServiceReferences) for a random value
• Range: byte
Unregister the 10000 services
Registry
#eclipseIoT @rellermeyer
#DevoxxUS
Performance – Service Registry
0
2000
4000
6000
8000
10000
12000
14000
16000
Beaglebone	ejre7 Beaglebone	ejre8 Raspberry	Pi
time	(ms)
Service	Registration
Concierge
Equinox
Felix
Knopflerfish
#eclipseIoT @rellermeyer
#DevoxxUS
Performance – Service Registry
0
100000
200000
300000
400000
500000
600000
700000
Beaglebone	ejre7 Beaglebone	ejre8 Raspberry	Pi
time	(ms)
Service	Lookup
Concierge
Equinox
Felix
Knopflerfish
#eclipseIoT @rellermeyer
#DevoxxUS
Performance – Service Registry
0
1000
2000
3000
4000
5000
6000
Beaglebone	ejre7 Beaglebone	ejre8 Raspberry	Pi
time	(ms)
Service	Unregistration
Concierge
Equinox
Felix
Knopflerfish
#eclipseIoT @rellermeyer
#DevoxxUS
Performance – Resolver
Generate 1000 “random bundles”
• Can either import or export up to 5 packages
• Choice of 50 packages in total
• For exports: generate a random package version from [1.0.0-21.0.0)
• For import: generate a random import range from the interval.
Install all 1000 bundles
Resolve the bundles
Benchmark turned out to be rather volatile…
#eclipseIoT @rellermeyer
#DevoxxUS
Performance - Resolver
#eclipseIoT @rellermeyer
0
20000
40000
60000
80000
100000
120000
Beaglebone	ejre7 Beaglebone	ejre8 Raspberry	Pi
time(ms)
Installation
Concierge
Equinox
Felix
Knopflerfish
#DevoxxUS
Performance - Resolver
0
10000
20000
30000
40000
50000
60000
Beaglebone	ejre7 Beaglebone	ejre8 Raspberry	Pi
time(ms)
Resolving
Concierge
Equinox
Felix
Knopflerfish
#eclipseIoT @rellermeyer
#DevoxxUS
Eclipse Concierge
Concierge is an OSGi framework
optimized for embedded devices
and the Internet of Things
#eclipseIoT @rellermeyer
http://eclipse.org/concierge
Project
Homepage
https://github.com/eclipse/concierge
Clone it
from here It’s simplicity and usability can help
you with developing complex IoT
applications with ease.
© 2017 IBM Corporation
Mission Badge #6:
SMS Text
Your mission should you
choose to accept it….
Join us at the IBM Booth for
hands-on labs, demos, games
and talk to our developers.
Text Mission2017 to 41411
to get the booth giveaway
and learn more about all the
IBM sessions & speakers.
Enter the raffle by
completing missions
for a chance to win
• a Drone
• TJBot Kit
• VR glasses
#DevoxxUS
Copyright and Trademarks
© IBM Corporation 2017. All Rights Reserved.
IBM, the IBM logo, and ibm.com are trademarks or registered trademarks of
International Business Machines Corp., and registered in many jurisdictions
worldwide.
Other product and service names might be trademarks of IBM or other
companies.
A current list of IBM trademarks is available on the Web – see the IBM
“Copyright and trademark information” page at URL:
www.ibm.com/legal/copytrade.shtml
#eclipseIoT @rellermeyer

Weitere ähnliche Inhalte

Ähnlich wie Lean and Easy IoT Applications with OSGi and Eclipse Concierge

Mainflux - Hyperscalable Unified IoT Platform
Mainflux - Hyperscalable Unified IoT PlatformMainflux - Hyperscalable Unified IoT Platform
Mainflux - Hyperscalable Unified IoT Platform
Sasa Klopanovic
 
Mainflux - Hyperscalable Unified IoT Platform
Mainflux - Hyperscalable Unified IoT PlatformMainflux - Hyperscalable Unified IoT Platform
Mainflux - Hyperscalable Unified IoT Platform
Sasa Klopanovic
 

Ähnlich wie Lean and Easy IoT Applications with OSGi and Eclipse Concierge (20)

Developers’ mDay u Banjoj Luci - Janko Isidorović, Mainflux – Unified IoT Pl...
Developers’ mDay u Banjoj Luci - Janko Isidorović, Mainflux –  Unified IoT Pl...Developers’ mDay u Banjoj Luci - Janko Isidorović, Mainflux –  Unified IoT Pl...
Developers’ mDay u Banjoj Luci - Janko Isidorović, Mainflux – Unified IoT Pl...
 
Developing Distributed Internet of Things Applications Made Easy with Concier...
Developing Distributed Internet of Things Applications Made Easy with Concier...Developing Distributed Internet of Things Applications Made Easy with Concier...
Developing Distributed Internet of Things Applications Made Easy with Concier...
 
Containers: DevOp Enablers of Technical Solutions
Containers: DevOp Enablers of Technical SolutionsContainers: DevOp Enablers of Technical Solutions
Containers: DevOp Enablers of Technical Solutions
 
Cont0519
Cont0519Cont0519
Cont0519
 
Devcon3 : iExec Allowing Scalable, Efficient, and Virtualized Off-chain Execu...
Devcon3 : iExec Allowing Scalable, Efficient, and Virtualized Off-chain Execu...Devcon3 : iExec Allowing Scalable, Efficient, and Virtualized Off-chain Execu...
Devcon3 : iExec Allowing Scalable, Efficient, and Virtualized Off-chain Execu...
 
DockerCon 15 Keynote - Day 2
DockerCon 15 Keynote - Day 2DockerCon 15 Keynote - Day 2
DockerCon 15 Keynote - Day 2
 
Docker adventures in Continuous Delivery - Alex Vranceanu
Docker adventures in Continuous Delivery - Alex VranceanuDocker adventures in Continuous Delivery - Alex Vranceanu
Docker adventures in Continuous Delivery - Alex Vranceanu
 
The NRB Group mainframe day 2021 - Containerisation on Z - Paul Pilotto - Seb...
The NRB Group mainframe day 2021 - Containerisation on Z - Paul Pilotto - Seb...The NRB Group mainframe day 2021 - Containerisation on Z - Paul Pilotto - Seb...
The NRB Group mainframe day 2021 - Containerisation on Z - Paul Pilotto - Seb...
 
DevOpsCon 2015 - DevOps in Mobile Games
DevOpsCon 2015 - DevOps in Mobile GamesDevOpsCon 2015 - DevOps in Mobile Games
DevOpsCon 2015 - DevOps in Mobile Games
 
Getting to the Next Level with Eclipse Concierge - Jan Rellermeyer + Tim Verb...
Getting to the Next Level with Eclipse Concierge - Jan Rellermeyer + Tim Verb...Getting to the Next Level with Eclipse Concierge - Jan Rellermeyer + Tim Verb...
Getting to the Next Level with Eclipse Concierge - Jan Rellermeyer + Tim Verb...
 
DEVNET-1169 CI/CT/CD on a Micro Services Applications using Docker, Salt & Ni...
DEVNET-1169	CI/CT/CD on a Micro Services Applications using Docker, Salt & Ni...DEVNET-1169	CI/CT/CD on a Micro Services Applications using Docker, Salt & Ni...
DEVNET-1169 CI/CT/CD on a Micro Services Applications using Docker, Salt & Ni...
 
DockerCon EU 2015: Day 1 General Session
DockerCon EU 2015: Day 1 General SessionDockerCon EU 2015: Day 1 General Session
DockerCon EU 2015: Day 1 General Session
 
Docker Birthday #5 Meetup Cluj - Presentation
Docker Birthday #5 Meetup Cluj - PresentationDocker Birthday #5 Meetup Cluj - Presentation
Docker Birthday #5 Meetup Cluj - Presentation
 
CICD with Jenkins
CICD with JenkinsCICD with Jenkins
CICD with Jenkins
 
Docker Bday #5, SF Edition: Introduction to Docker
Docker Bday #5, SF Edition: Introduction to DockerDocker Bday #5, SF Edition: Introduction to Docker
Docker Bday #5, SF Edition: Introduction to Docker
 
Cloud to Edge
Cloud to EdgeCloud to Edge
Cloud to Edge
 
Mainflux - Hyperscalable Unified IoT Platform
Mainflux - Hyperscalable Unified IoT PlatformMainflux - Hyperscalable Unified IoT Platform
Mainflux - Hyperscalable Unified IoT Platform
 
Mainflux - Hyperscalable Unified IoT Platform
Mainflux - Hyperscalable Unified IoT PlatformMainflux - Hyperscalable Unified IoT Platform
Mainflux - Hyperscalable Unified IoT Platform
 
Tampere Docker meetup - Happy 5th Birthday Docker
Tampere Docker meetup - Happy 5th Birthday DockerTampere Docker meetup - Happy 5th Birthday Docker
Tampere Docker meetup - Happy 5th Birthday Docker
 
DockerCon SF 2015: Keynote Day 1
DockerCon SF 2015: Keynote Day 1DockerCon SF 2015: Keynote Day 1
DockerCon SF 2015: Keynote Day 1
 

Mehr von Dev_Events

Mehr von Dev_Events (20)

Eclipse OMR: a modern, open-source toolkit for building language runtimes
Eclipse OMR: a modern, open-source toolkit for building language runtimesEclipse OMR: a modern, open-source toolkit for building language runtimes
Eclipse OMR: a modern, open-source toolkit for building language runtimes
 
Eclipse MicroProfile: Accelerating the adoption of Java Microservices
Eclipse MicroProfile: Accelerating the adoption of Java MicroservicesEclipse MicroProfile: Accelerating the adoption of Java Microservices
Eclipse MicroProfile: Accelerating the adoption of Java Microservices
 
From Science Fiction to Science Fact: How AI Will Change Our Approach to Buil...
From Science Fiction to Science Fact: How AI Will Change Our Approach to Buil...From Science Fiction to Science Fact: How AI Will Change Our Approach to Buil...
From Science Fiction to Science Fact: How AI Will Change Our Approach to Buil...
 
Blockchain Hyperledger Lab
Blockchain Hyperledger LabBlockchain Hyperledger Lab
Blockchain Hyperledger Lab
 
Introduction to Blockchain and Hyperledger
Introduction to Blockchain and HyperledgerIntroduction to Blockchain and Hyperledger
Introduction to Blockchain and Hyperledger
 
Eclipse JDT Embraces Java 9 – An Insider’s View
Eclipse JDT Embraces Java 9 – An Insider’s ViewEclipse JDT Embraces Java 9 – An Insider’s View
Eclipse JDT Embraces Java 9 – An Insider’s View
 
Node.js – ask us anything!
Node.js – ask us anything! Node.js – ask us anything!
Node.js – ask us anything!
 
Swift on the Server
Swift on the Server Swift on the Server
Swift on the Server
 
Being serverless and Swift... Is that allowed?
Being serverless and Swift... Is that allowed? Being serverless and Swift... Is that allowed?
Being serverless and Swift... Is that allowed?
 
Secrets of building a debuggable runtime: Learn how language implementors sol...
Secrets of building a debuggable runtime: Learn how language implementors sol...Secrets of building a debuggable runtime: Learn how language implementors sol...
Secrets of building a debuggable runtime: Learn how language implementors sol...
 
Tools in Action: Transforming everyday objects with the power of deeplearning...
Tools in Action: Transforming everyday objects with the power of deeplearning...Tools in Action: Transforming everyday objects with the power of deeplearning...
Tools in Action: Transforming everyday objects with the power of deeplearning...
 
Microservices without Servers
Microservices without ServersMicroservices without Servers
Microservices without Servers
 
The App Evolution
The App EvolutionThe App Evolution
The App Evolution
 
Building Next Generation Applications and Microservices
Building Next Generation Applications and Microservices Building Next Generation Applications and Microservices
Building Next Generation Applications and Microservices
 
Create and Manage APIs with API Connect, Swagger and Bluemix
Create and Manage APIs with API Connect, Swagger and BluemixCreate and Manage APIs with API Connect, Swagger and Bluemix
Create and Manage APIs with API Connect, Swagger and Bluemix
 
OpenWhisk - Serverless Architecture
OpenWhisk - Serverless Architecture OpenWhisk - Serverless Architecture
OpenWhisk - Serverless Architecture
 
Add Custom Model and ORM to Node.js
Add Custom Model and ORM to Node.jsAdd Custom Model and ORM to Node.js
Add Custom Model and ORM to Node.js
 
Adding User Management to Node.js
Adding User Management to Node.jsAdding User Management to Node.js
Adding User Management to Node.js
 
Creating Sentiment Line Chart with Watson
Creating Sentiment Line Chart with Watson Creating Sentiment Line Chart with Watson
Creating Sentiment Line Chart with Watson
 
Containers Lab
Containers Lab Containers Lab
Containers Lab
 

Kürzlich hochgeladen

Kürzlich hochgeladen (20)

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
 
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?
 
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
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
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
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
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...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
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)
 
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...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
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...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 

Lean and Easy IoT Applications with OSGi and Eclipse Concierge

  • 1. #DevoxxUS Lean and Easy IoT Applications with OSGi and Eclipse Concierge Jan S. Rellermeyer, IBM Research #eclipseIoT @rellermeyer
  • 2. #DevoxxUS THE INFORMATION CONTAINED IN THIS PRESENTATION IS PROVIDED FOR INFORMATIONAL PURPOSES ONLY. WHILST EFFORTS WERE MADE TO VERIFY THE COMPLETENESS AND ACCURACY OF THE INFORMATION CONTAINED IN THIS PRESENTATION, IT IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. ALL PERFORMANCE DATA INCLUDED IN THIS PRESENTATION HAVE BEEN GATHERED IN A CONTROLLED ENVIRONMENT. YOUR OWN TEST RESULTS MAY VARY BASED ON HARDWARE, SOFTWARE OR INFRASTRUCTURE DIFFERENCES. ALL DATA INCLUDED IN THIS PRESENTATION ARE MEANT TO BE USED ONLY AS A GUIDE. IN ADDITION, THE INFORMATION CONTAINED IN THIS PRESENTATION IS BASED ON IBM’S CURRENT PRODUCT PLANS AND STRATEGY, WHICH ARE SUBJECT TO CHANGE BY IBM, WITHOUT NOTICE. IBM AND ITS AFFILIATED COMPANIES SHALL NOT BE RESPONSIBLE FOR ANY DAMAGES ARISING OUT OF THE USE OF, OR OTHERWISE RELATED TO, THIS PRESENTATION OR ANY OTHER DOCUMENTATION. NOTHING CONTAINED IN THIS PRESENTATION IS INTENDED TO, OR SHALL HAVE THE EFFECT OF: - CREATING ANY WARRANT OR REPRESENTATION FROM IBM, ITS AFFILIATED COMPANIES OR ITS OR THEIR SUPPLIERS AND/OR LICENSORS Important Disclaimers #eclipseIoT @rellermeyer
  • 3. #DevoxxUS Software Lifecycle Management #eclipseIoT @rellermeyer Module A Module B Module C Module D
  • 4. #DevoxxUS OSGi Module Layer Modules are called Bundles • JAR files with additional metadata Runtime system: The Framework • Lifecycle management Bundles implement isolation and locality • Interaction between bundles is limited • Shared code through package imports • Every bundle is loaded through a separate classloader Monitoring system state through events #eclipseIoT @rellermeyer Module Module Module
  • 5. #DevoxxUS OSGi Framework OSGi Framework BundleA Package 1 Package 2 Package 3 BundleB Package I Package II Exported Package Exported Package Private Package Import Export-Package: Package 1 Export-Package: Package I, Package II Import-Package: Package 1 #eclipseIoT @rellermeyer
  • 6. #DevoxxUS OSGi Service Layer Modules allow for a compositional approach to building applications But: Package dependencies are explicit. Limits the modularity! Solution: Services Idea: Separate the interface from the implementation Module Module Module Interface Implementation Service Service #eclipseIoT @rellermeyer
  • 7. #DevoxxUS OSGi for IoT IoT systems are often dynamic •Sensors and actuators might not always be available •N:M relationship between producers and consumers Event Source Event Listener Service gets registers receives service life-cycle events Service Registry #eclipseIoT @rellermeyer
  • 8. #DevoxxUS Eclipse Concierge Full OSGi core R5 compatibility • Goal achieved Keep a small footprint to work well on embedded devices • 250kiB without debug symbols • 330kiB with debug symbols Remain “readable” • Currently 9 classes Remain backwards-compatible • Java 5 #eclipseIoT @rellermeyer
  • 9. #DevoxxUS Building IoT Applications • Concierge supports Knopflerfish-style xargs file for startup • Enhanced property (variable replacement) and install notation (wildcard support) • Supports start level in scripts (-level <n>) #eclipseIoT @rellermeyer $ java -jar framework/org.eclipse.concierge-5.0.0.*.jar samples/demo.xargs # demo.xargs -Dorg.osgi.framework.system.packages.extra+=javax.xml.parsers # -Drepo=http://www.us.apache.org/dist/felix -Drepo=localRepo # load bundles, use wildcard notation for local files, not for URLs -istart bundles/org.eclipse.concierge.shell-5.0.0.*.jar -istart bundles/org.eclipse.concierge.service.startlevel-5.0.0.*.jar -istart bundles/org.eclipse.concierge.service.packageadmin-5.0.0.*.jar -istart ${repo}/org.apache.felix.httplite.complete-0.1.4.jar -istart ${repo}/org.apache.felix.webconsole-4.2.14-all.jar
  • 10. #DevoxxUS Remote Management • RESTful interface • Exposing the framework and its internal state as resources • Bundles • Services • Easy management of OSGi deployments through REST • Command line tools • Web interfaces • Application-level #eclipseIoT @rellermeyer
  • 11. #DevoxxUS Use Case: Eclipse SmartHome #eclipseIoT @rellermeyer + openHAB2 smarthome-concierge Distribution 160 MB 19 MB OSGi (no Karaf) 3.1 MB 1.6 MB EMF/xText 7 MB 0 MB Java Runtime 32 MB 16 MB (compact3) 12 MB (compact2) Memory footprint ~32 MB ~15 MB Startup time ~40 sec ~30 sec
  • 12. #DevoxxUS Use Case: iMinds IoT Lab #eclipseIoT @rellermeyer
  • 13. #DevoxxUS Use Case: OSGi enRoute OSGi enRoute uses OSGi R6 and bndtools • R6 implementation of Concierge available as a snapshot • OSGi repository hosted at the Concierge website #eclipseIoT @rellermeyer
  • 14. #DevoxxUS Experiments Beaglebone Rev A5 •AM335x 720MHz ARM Cortex-A8 •256 MiB DDR2 RAM •4 GiB microSD card •Angstrom Linux •Java SE Embedded 1.7.0_21-b11 and •Java SE Embedded build 1.8.0_06-b23 compact1 Image: http://beaglebone.org Raspberry Pi B •ARM1176JZF-S 700 MHz ARM 11 •512 MiB SDRAM (shared with GPU) •8 GiB SDHD card •Raspbian Linux •Java SE build 1.8.0-b132 #eclipseIoT @rellermeyer
  • 15. #DevoxxUS Experiments Eclipse Equinox • version 3.11.2.v20161107-1947 • 1.3 MiB • (R6 framework) Apache Felix • version 5.6.2 • 697 kiB Knopflerfish • version 7.2.0 • 609kiB / 320kiB compact Concierge • version 5.1.0 SNAPSHOT • 248kiB
  • 16. #DevoxxUS Performance – Startup Time #eclipseIoT @rellermeyer 0 2 4 6 8 10 12 14 16 18 20 Beaglebone ejre7 Beaglebone ejre8 Raspberry Pi time(s) VM Concierge Equinox Felix Knopflerfish
  • 17. #DevoxxUS Performance – Service Registry Stress test Register 10000 services • Each one has a random value for the same key • Range: byte => collisions Perform 1000 lookups (getServiceReferences) for a random value • Range: byte Unregister the 10000 services Registry #eclipseIoT @rellermeyer
  • 18. #DevoxxUS Performance – Service Registry 0 2000 4000 6000 8000 10000 12000 14000 16000 Beaglebone ejre7 Beaglebone ejre8 Raspberry Pi time (ms) Service Registration Concierge Equinox Felix Knopflerfish #eclipseIoT @rellermeyer
  • 19. #DevoxxUS Performance – Service Registry 0 100000 200000 300000 400000 500000 600000 700000 Beaglebone ejre7 Beaglebone ejre8 Raspberry Pi time (ms) Service Lookup Concierge Equinox Felix Knopflerfish #eclipseIoT @rellermeyer
  • 20. #DevoxxUS Performance – Service Registry 0 1000 2000 3000 4000 5000 6000 Beaglebone ejre7 Beaglebone ejre8 Raspberry Pi time (ms) Service Unregistration Concierge Equinox Felix Knopflerfish #eclipseIoT @rellermeyer
  • 21. #DevoxxUS Performance – Resolver Generate 1000 “random bundles” • Can either import or export up to 5 packages • Choice of 50 packages in total • For exports: generate a random package version from [1.0.0-21.0.0) • For import: generate a random import range from the interval. Install all 1000 bundles Resolve the bundles Benchmark turned out to be rather volatile… #eclipseIoT @rellermeyer
  • 22. #DevoxxUS Performance - Resolver #eclipseIoT @rellermeyer 0 20000 40000 60000 80000 100000 120000 Beaglebone ejre7 Beaglebone ejre8 Raspberry Pi time(ms) Installation Concierge Equinox Felix Knopflerfish
  • 23. #DevoxxUS Performance - Resolver 0 10000 20000 30000 40000 50000 60000 Beaglebone ejre7 Beaglebone ejre8 Raspberry Pi time(ms) Resolving Concierge Equinox Felix Knopflerfish #eclipseIoT @rellermeyer
  • 24. #DevoxxUS Eclipse Concierge Concierge is an OSGi framework optimized for embedded devices and the Internet of Things #eclipseIoT @rellermeyer http://eclipse.org/concierge Project Homepage https://github.com/eclipse/concierge Clone it from here It’s simplicity and usability can help you with developing complex IoT applications with ease.
  • 25. © 2017 IBM Corporation Mission Badge #6: SMS Text Your mission should you choose to accept it…. Join us at the IBM Booth for hands-on labs, demos, games and talk to our developers. Text Mission2017 to 41411 to get the booth giveaway and learn more about all the IBM sessions & speakers. Enter the raffle by completing missions for a chance to win • a Drone • TJBot Kit • VR glasses
  • 26. #DevoxxUS Copyright and Trademarks © IBM Corporation 2017. All Rights Reserved. IBM, the IBM logo, and ibm.com are trademarks or registered trademarks of International Business Machines Corp., and registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web – see the IBM “Copyright and trademark information” page at URL: www.ibm.com/legal/copytrade.shtml #eclipseIoT @rellermeyer