Concierge: Bringing OSGi (Back) to Embedded Devices

1,775 views

Published on

JavaOne 2013 Talk on bringing OSGi back to embedded devices through Concierge, a new version of the optimized OSGi core framework implementation.

Published in: Technology, Business
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,775
On SlideShare
0
From Embeds
0
Number of Embeds
77
Actions
Shares
0
Downloads
46
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

Concierge: Bringing OSGi (Back) to Embedded Devices

  1. 1. © 2013 IBM Corporation Concierge: Bringing OSGi (Back) to Embedded Devices Jan S. Rellermeyer, IBM Research Jan S. Rellermeyer 24 Sep 2013
  2. 2. 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. 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. Mobile Transforms Embedded Systems Image: www.honeywell.com Image: www.nest.com Image: www.nikon.com Image: www.apple.com
  5. 5. Continuous Platform Experience 5 Cloud SoftwareStack Embedded Device Image: http://www.raspberrypi.org ESSC
  6. 6. 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
  7. 7. 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?
  8. 8. 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 – Inter-bundle calls through services – Monitoring system state through events
  9. 9. The Lifecycle of a Bundle  Management: Install / Start / Stop / Uninstall bundles at runtime.  OSGi keeps track of dependencies  What happens if a Bundle is uninstalled? From the OSGi Core Specifications
  10. 10. The 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 • Packages can be versioned • OSGi encourages semantic versioning of bundles and packages
  11. 11. OSGi Services: Reducing Coupling  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 Interface Implementation Module Module Module Service Service
  12. 12. The Service Registry  The OSGi framework maintains a central service registry  Bundles can register their own services and retrieve services provided by other bundles  Services can be registered with a set of properties – Additional description of the service, can be used to model constraints or do “best fit matching”  No runtime overhead for using services after lookup! Registry
  13. 13. OSGi Services  Composition at runtime  Loosely-coupled interaction through services  The system is dynamic 13
  14. 14. 14 Concierge  Question: What is the (minimum) overhead of OSGi?  My answer: 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
  15. 15. 15 Consistency across Platforms iPAQ 3870 Linux Familiar 0.8 SA-1110 CPU 64 MB RAM SableVM Zaurus 5500G Linux Embedix SA-1110 CPU 64 MB RAM Sun cvm Nokia 9300i SymbianOS TI OMAP 1510 CPU 80 MB RAM IBM J9 iPAQ 5550 Windows Mobile PXA255 CPU 128 MB RAM IBM J9 LinkSys NSLU2 Unslung IXP420 CPU 32 MB RAM JamVM
  16. 16. 16 Performance influence of the final modifier
  17. 17. 17 Evaluation (Small Devices)
  18. 18. Example: The BUG Platform 18  Embedded Linux Device  Runs Java (PhoneME) and OSGi  Pluggable hardware modules  Registers OSGi services  Applications are OSGi bundles Image: http://www.buglabs.com
  19. 19. OSGi R3  OSGi R3: “unique” bundles and packages 19 my.bundle.one my.bundle.two exports my.package imports
  20. 20. OSGi R4  OSGi R4: multiple versions, class spaces  Fragments  Require-Bundle 20 my.bundle.one 1.0 my.bundle.two exports my.package; version 1.0 imports my.bundle.one 2.0 exports my.package; version 2.0
  21. 21. OSGi R5  OSGi R5: generic requirements and capabilities  Many hooks into the framework to manipulate the observed state 21 my.bundle.one 1.0 my.bundle.two Provide capability foo.bar{a=10, b=[1,2,3]} Require capability foo.bar filter=(!(a>10))
  22. 22. Generic vs. Optimized 22 Packages Bundles Generic Capabilities
  23. 23. Concierge goes Eclipse  Targets:  Full OSGi core R5 compatibility  Keep a small footprint to work well on embedded devices – Currently < 350kB footprint  Remain “readable” – Currently 9 classes  Remain backwards-compatible  Being a sandbox for innovation around OSGi 23 Image: http://www.eclipse.org
  24. 24. Demo  BeagleBone  AM335x 720MHz ARM Cortex-A8  256MB DDR2 RAM  4GB microSD card  runs Angstrom Linux Distribution  Java SE Embedded 1.7.0_21-b11  Concierge R5 alpha 24 Image: http://www.beaglebone.org
  25. 25. REST Interface  Designed for the cloud  Very useful for embedded systems as well  Examples – GET http://my_host/framework/bundles/representations – POST http://my_host/framework/bundles – GET http://my_host/framework/bundle/5/state – GET http://my_host/framework/services/(objectClass=org.osgi.*)/representations/  This is work in progress (RFC 182)  http://www.osgi.org/download/osgi-early-draft-2013-03.pdf 25
  26. 26. Location Transparency: Remote Service Invocation 26
  27. 27. Juggle  Model critical functionality as services –Module with hardware-accelerated service –Co-Module with dynamically accelerated service  “Juggle” with the accelerators 27
  28. 28. Juggle Prototype System  Xilinx Virtex-II Pro  PPC 440 core, 300 MHz  256 MB DDR SRAM  Linux 2.6.35 (patched)  JVM –IcedTea Zero, IcedTea Cacao, or IBM J9  OSGi Framework – Concierge  Juggle – Adds support for loading and managing co-bundles – Manages the FPGA and the reprogramming 28 Image: http://www.xilinx.com
  29. 29. Evaluation  PRR of about 16% of the chip real estate  Reprogramming time: 11 – 25 msec. (Literature: max. 30 msec)  Switching the socket bridge: 3 msec.  Initial load time for a hardware accelerated bundle: ~ 100 msec.  Initial load time for a co-bundle: < 1sec 29
  30. 30. Evaluation: Triple-DES 30
  31. 31. TDES with hardware acceleration 31
  32. 32. © Copyright IBM Corporation 2013. All rights reserved. The information contained in these materials is provided for informational purposes only, and is provided AS IS without warranty of any kind, express or implied. IBM shall not be responsible for any damages arising out of the use of, or otherwise related to, these materials. Nothing contained in these materials is intended to, nor shall have the effect of, creating any warranties or representations from IBM or its suppliers or licensors, or altering the terms and conditions of the applicable license agreement governing the use of IBM software. References in these materials to IBM products, programs, or services do not imply that they will be available in all countries in which IBM operates. Product release dates and/or capabilities referenced in these materials may change at any time at IBM’s sole discretion based on market opportunities or other factors, and are not intended to be a commitment to future product or feature availability in any way. IBM, the IBM logo, Rational, the Rational logo, Telelogic, the Telelogic logo, and other IBM products and services are trademarks of the International Business Machines Corporation, in the United States, other countries or both. Other company, product, or service names may be trademarks or service marks of others.
  33. 33. Legal Disclaimer • © IBM Corporation 2013. All Rights Reserved. • The information contained in this publication is provided for informational purposes only. While efforts were made to verify the completeness and accuracy of the information contained in this publication, it is provided AS IS without warranty of any kind, express or implied. In addition, this information is based on IBM’s current product plans and strategy, which are subject to change by IBM without notice. IBM shall not be responsible for any damages arising out of the use of, or otherwise related to, this publication or any other materials. Nothing contained in this publication is intended to, nor shall have the effect of, creating any warranties or representations from IBM or its suppliers or licensors, or altering the terms and conditions of the applicable license agreement governing the use of IBM software. • References in this presentation to IBM products, programs, or services do not imply that they will be available in all countries in which IBM operates. Product release dates and/or capabilities referenced in this presentation may change at any time at IBM’s sole discretion based on market opportunities or other factors, and are not intended to be a commitment to future product or feature availability in any way. Nothing contained in these materials is intended to, nor shall have the effect of, stating or implying that any activities undertaken by you will result in any specific sales, revenue growth or other results. • Performance is based on measurements and projections using standard IBM benchmarks in a controlled environment. The actual throughput or performance that any user will experience will vary depending upon many factors, including considerations such as the amount of multiprogramming in the user's job stream, the I/O configuration, the storage configuration, and the workload processed. Therefore, no assurance can be given that an individual user will achieve results similar to those stated here. • IBM and the IBM logo are trademarks of International Business Machines Corporation in the United States, other countries, or both. • Java and all Java-based trademarks are trademarks of Oracle Corporation, Inc. in the United States, other countries, or both. • Microsoft and Windows are trademarks of Microsoft Corporation in the United States, other countries, or both. • Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both. Other company, product, or service names may be trademarks or service marks of others.

×