Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.

Concierge - Bringing OSGi (back) to Embedded Devices

Virtual IoT Meetup 06-02-2016

http://www.meetup.com/Virtual-IoT/events/230989464

https://www.youtube.com/watch?v=ZveMqDbMm0c

  • Soyez le premier à commenter

Concierge - Bringing OSGi (back) to Embedded Devices

  1. 1. © 2016 IBM Corporation IoT Virtual Meetup June 2nd 2016 Concierge – Bringing OSGi (back) to Embedded Devices Jan S. Rellermeyer
  2. 2. © 2016 IBM Corporation Embedded Devices Typically fixed-function devices Limited user interface ISA OS Software typically closely tied to the hardware 2 Image: www.eeweb.com
  3. 3. © 2016 IBM Corporation Embedded Devices Are Evolving We see a new class of embedded systems emerging Advanced processors Larger set of capabilities Enhanced user interface / user experience Open platforms for a software ecosystem 3 Image: www.apple.com
  4. 4. © 2016 IBM Corporation OSGi Dynamic Module System for the Java Runtime Original domain: Home Gateway Multiple software packages need to co-exist on the same machine Long-running software Periodic maintenance and updates requires Ideally with minimal downtime and no interruption of unrelated software packages 6 • Java on the Embedded Device • Pros: • bridges heterogeneity • can run the same code in the cloud or on the device • Cons: • updates and maintenance
  5. 5. © 2016 IBM Corporation Module Management Traditional Java: The mystical class path java –cp commons‐X.jar:foo.jar:bar.jar my.application.MainClass Which module contains the main class? What are the dependencies between foo.jar and bar.jar? What happens if bar.jar is upgraded to bar-1.01.jar? 7
  6. 6. © 2016 IBM Corporation 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 8
  7. 7. © 2016 IBM Corporation Concierge Question: What is the (minimum) overhead of OSGi? The “old” Concierge: OSGi R3 core implementation developed during my PhD at ETH Zurich optimized for mobile and embedded devices, has a footprint of only 86kB People found the source code readable and understandable: 7 Java classes + 7 inner classes. [J.S. Rellermeyer and G. Alonso: Concierge – A Service Platform for Resource-Constrained Devices. In: EuroSys 2007]. Image: http://www.linksys.com 13
  8. 8. © 2016 IBM Corporation Eclipse Concierge Goals:  Full OSGi core R5 compatibility  Keep a small footprint to work well on embedded devices  Remain “readable”  Remain backwards-compatible  Java 5  Java 1.4?  Being a sandbox for innovation around OSGi 14 Image: http://raspberrypi.org
  9. 9. © 2016 IBM Corporation 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 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 17 Image: http://beaglebone.org
  10. 10. © 2016 IBM Corporation OSGi Frameworks Eclipse Equinox • version 3.10.101.v20150820-1432 • 1.3 MiB • (R6 framework) Apache Felix • version 5.4.0 • 675 kiB Knopflerfish • version 7.2.0 • 609kiB / 320kiB compact Concierge • version 5.0.0 • 245kiB 18
  11. 11. © 2016 IBM Corporation Resolver 24 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…
  12. 12. © 2016 IBM Corporation Usability What does Usability mean for an OSGi framework? Don’t be annoying… Stay close to the (core) standard Every OSGi framework has some extra functionality Concierge has a built-in log service Discrepancies between compile time and run time behavior is what makes OSGi challenging Log service in the framework => correlate application behavior with framework events 27
  13. 13. © 2016 IBM Corporation XargsFileLauncher $ 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 • Concierge supports Knopflerfish styled xargs file for startup • Enhanced property (variable replacement) and install notation (wildcard support) • Supports start level in scripts (-level <n>) 28
  14. 14. © 2016 IBM Corporation 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 • REST service implementation will appear in Concierge 5.1 29
  15. 15. © 2016 IBM Corporation What’s next? Several work streams • R6 compatibility • More auxiliary bundles • EventAdmin • Remote services? • Remote management based on REST interface • Help other projects with transitioning to Concierge
  16. 16. © 2016 IBM Corporation32 Copyright and Trademarks © IBM Corporation 2016. 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

×