Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Practical OSGi Subsystems
Glyn Normington
Agenda
• Background
• Subsystem types
• Nested subsystems
• Subsystem content and dependencies
• Getting started
Subsystems
• New in OSGi Enterprise 5.0 spec
• Implementation underway in Apache Aries
• Based on input from several proje...
Why Subsystems?
• Many bundles
• Named, versioned grouping
• Management
• Scoping
Scoping
• Bundles
• Packages
• Capabilities
• Services
Subsystem Types
Feature Subsystems
Feature
bundle
bundle bundle
bundle
Scoping:
• None
Application Subsystems
Application
bundle
bundle
bundle
bundle
Scoping:
• No exports
• Automatic imports
Composite Subsystems
Composite
bundle
bundle bundle
bundle
Scoping:
• Configurable exports
• Configurable imports
Subsystem Types in
Practice
Feature Subsystems
• Useful for grouping dependencies
• More controlled than auto-detection
• Helps avoid uses constraint ...
Application Subsystems
• Useful for top layer of the system
• Application or independent parts of an app
• Avoid including...
Composite Subsystems
• Essentially a systems programming feature
• Useful for kernels and special infrastructure
• Not rec...
Composite
Subsystems: Kernels
Root (kernel)
Composite (user region)
servicespackagesbundles
Subsystem Content and
Dependencies
Subsystem Content
• By value in a subsystem archive
• By reference to a repository
Dependencies
• Satisfy the requirements of a subsystem
• But not included in the subsystem content
• Automatically install...
Subsystem Content and
Dependencies in
Practice
Use of Repositories
• Subsystem archive content
• Easy to deploy
• May limit sharing
• Harder to update
• Repository conte...
Nested Subsystems
Nested Subsystems
• So far all subsystems have been children of
the root subsystem
Root
Application
bundlebundle
Feature
b...
Nested Subsystems
• Subsystems can be nested to any depth
• Sharing between parent and child is
controlled by the child
Nested Subsystems in
Practice
Nested Subsystems
• Features useful for grouping other subsystems
Root
Feature
Application
bundle
bundle
bundle
Applicatio...
Nested Subsystems
• Nested features useful for logical grouping
Root
Application
bundlebundle
Feature
bundlebundle
Root
Fe...
Nested Subsystems
• Nested applications useful for scoping
Root
Application
bundlebundle
Application
bundlebundle
bundle
Getting Started
Trying it out
• Apache Aries support in development
• SomeVirgo equivalents available
Aries Subsystems
• This example runs onVirgo Kernel
• (Live demo)
• You can run it yourself in 5 minutes
• https://github....
Virgo Equivalents
Standard Function Virgo Equivalent
Feature Unscoped plan
Application - scoped using a
region
PAR or scop...
Thanks
I am indebted to John Ross for his help with
Aries Subsystems
Further Information
• OSGi R5 Enterprise Specification
• http://www.osgi.org/Download/Release5
• Aries Subsystems onVirgo K...
Upcoming SlideShare
Loading in …5
×

Practical OSGi Subsystems - Glyn Normington

263 views

Published on

OSGi Community Event 2012

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Practical OSGi Subsystems - Glyn Normington

  1. 1. Practical OSGi Subsystems Glyn Normington
  2. 2. Agenda • Background • Subsystem types • Nested subsystems • Subsystem content and dependencies • Getting started
  3. 3. Subsystems • New in OSGi Enterprise 5.0 spec • Implementation underway in Apache Aries • Based on input from several projects • Aries, Geronimo, Glassfish, Karaf, Paremus Service Fabric,Virgo,WebSphere • Best practices...
  4. 4. Why Subsystems? • Many bundles • Named, versioned grouping • Management • Scoping
  5. 5. Scoping • Bundles • Packages • Capabilities • Services
  6. 6. Subsystem Types
  7. 7. Feature Subsystems Feature bundle bundle bundle bundle Scoping: • None
  8. 8. Application Subsystems Application bundle bundle bundle bundle Scoping: • No exports • Automatic imports
  9. 9. Composite Subsystems Composite bundle bundle bundle bundle Scoping: • Configurable exports • Configurable imports
  10. 10. Subsystem Types in Practice
  11. 11. Feature Subsystems • Useful for grouping dependencies • More controlled than auto-detection • Helps avoid uses constraint failures • Useful for: • Common infrastructure • Shared bundles Feature bundle bundle bundle bundle
  12. 12. Application Subsystems • Useful for top layer of the system • Application or independent parts of an app • Avoid including infrastructure bundles • Reduces sharing • Makes update more difficult • Can lead to resolution failures Application bundlebundle Feature bundlebundle Application bundlebundle
  13. 13. Composite Subsystems • Essentially a systems programming feature • Useful for kernels and special infrastructure • Not recommended for general, widespread application use • Complex • Can duplicate infrastructure • extenders • management bundles Composite bundle bundle bundle bundle
  14. 14. Composite Subsystems: Kernels Root (kernel) Composite (user region) servicespackagesbundles
  15. 15. Subsystem Content and Dependencies
  16. 16. Subsystem Content • By value in a subsystem archive • By reference to a repository
  17. 17. Dependencies • Satisfy the requirements of a subsystem • But not included in the subsystem content • Automatically installed from a repository
  18. 18. Subsystem Content and Dependencies in Practice
  19. 19. Use of Repositories • Subsystem archive content • Easy to deploy • May limit sharing • Harder to update • Repository content • Convenient during development • Avoids bloated archives • Generally preferable
  20. 20. Nested Subsystems
  21. 21. Nested Subsystems • So far all subsystems have been children of the root subsystem Root Application bundlebundle Feature bundlebundle Application bundlebundle
  22. 22. Nested Subsystems • Subsystems can be nested to any depth • Sharing between parent and child is controlled by the child
  23. 23. Nested Subsystems in Practice
  24. 24. Nested Subsystems • Features useful for grouping other subsystems Root Feature Application bundle bundle bundle Application bundle bundle bundle bundle
  25. 25. Nested Subsystems • Nested features useful for logical grouping Root Application bundlebundle Feature bundlebundle Root Feature bundlebundle Feature bundlebundle
  26. 26. Nested Subsystems • Nested applications useful for scoping Root Application bundlebundle Application bundlebundle bundle
  27. 27. Getting Started
  28. 28. Trying it out • Apache Aries support in development • SomeVirgo equivalents available
  29. 29. Aries Subsystems • This example runs onVirgo Kernel • (Live demo) • You can run it yourself in 5 minutes • https://github.com/glyn/aries-subsystems- on-virgo-kernel • README.md contains full instructions
  30. 30. Virgo Equivalents Standard Function Virgo Equivalent Feature Unscoped plan Application - scoped using a region PAR or scoped plan - scoped using metadata rewriting Composite - scoped using a region User region Nesting Nested plans PARs, plans, user region Repository Repository Deployment Contexts -
  31. 31. Thanks I am indebted to John Ross for his help with Aries Subsystems
  32. 32. Further Information • OSGi R5 Enterprise Specification • http://www.osgi.org/Download/Release5 • Aries Subsystems onVirgo Kernel • https://github.com/glyn/aries-subsystems-on-virgo-kernel • Virgo User & Programmer Guides • http://www.eclipse.org/virgo/documentation/

×