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...
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. 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. 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
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
21. Nested Subsystems
• So far all subsystems have been children of
the root subsystem
Root
Application
bundlebundle
Feature
bundlebundle
Application
bundlebundle
28. Trying it out
• Apache Aries support in development
• SomeVirgo equivalents available
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. 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 -