Upload
mfrancis
View
16
Download
3
Tags:
Embed Size (px)
Citation preview
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 projects
• Aries, Geronimo, Glassfish, Karaf, Paremus Service Fabric, Virgo, WebSphere
• Best practices...
Application Subsystems
Application
bundle
bundle
bundle
bundle
Scoping:
• No exports
• Automatic imports
Composite Subsystems
Composite
bundle
bundle bundle
bundle
Scoping:
• Configurable exports
• Configurable imports
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
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
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
Dependencies
• Satisfy the requirements of a subsystem
• But not included in the subsystem content
• Automatically installed from a repository
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
Nested Subsystems• So far all subsystems have been children of
the root subsystem
Root
Application
bundlebundle
Feature
bundlebundle
Application
bundlebundle
Nested Subsystems
• Subsystems can be nested to any depth
• Sharing between parent and child is controlled by the child
Nested Subsystems• Features useful for grouping other subsystems
Root
Feature
Application
bundle
bundle
bundle
Application
bundle
bundle
bundle
bundle
Nested Subsystems• Nested features useful for logical grouping
Root
Application
bundlebundle
Feature
bundlebundle
Root
Feature
bundlebundle
Feature
bundlebundle
Nested Subsystems• Nested applications useful for scoping
Root
Application
bundlebundle
Application
bundlebundle
bundle
Aries Subsystems
• This example runs on Virgo 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
Virgo EquivalentsStandard 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 plansPARs, plans, user region
Repository Repository
Deployment Contexts -
Further Information
• OSGi R5 Enterprise Specification
• http://www.osgi.org/Download/Release5
• Aries Subsystems on Virgo Kernel
• https://github.com/glyn/aries-subsystems-on-virgo-kernel
• Virgo User & Programmer Guides
• http://www.eclipse.org/virgo/documentation/