SlideShare a Scribd company logo
1 of 32
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 projects
 • Aries, Geronimo, Glassfish, Karaf,
    Paremus Service Fabric,Virgo, WebSphere
• Best practices...
Why Subsystems?

• Many bundles
• Named, versioned grouping
• Management
• Scoping
Scoping
• Bundles
• Packages
• Capabilities
• Services
Subsystem Types
Feature Subsystems
                    Feature
Scoping:
               bundle     bundle
• None



               bundle     bundle
Application Subsystems

Scoping:                 Application


• No exports          bundle     bundle



• Automatic imports

                      bundle     bundle
Composite Subsystems

Scoping:                     Composite


•   Configurable exports   bundle    bundle



• Configurable imports

                          bundle    bundle
Subsystem Types in
     Practice
Feature Subsystems
• Useful for grouping dependencies
• More controlled than auto-detection
 • Helps avoid uses constraint failures
• Useful for:
 • Common infrastructure
                                               Feature

                                          bundle     bundle



 • Shared bundles
                                          bundle     bundle
Application Subsystems
• Useful for top layer of the system
• Application or independent parts of an app
• Avoid including infrastructure bundles
 • Reduces sharing                  Application                   Application

 • Makes update more difficult    bundle     bundle             bundle     bundle




 • Can lead to resolution failures
                                                     Feature

                                            bundle             bundle
Composite Subsystems
• Essentially a systems programming feature
• Useful for kernels and special infrastructure
• Not recommended for general, widespread
  application use
  • Complex                                  Composite

  • Can duplicate infrastructure          bundle    bundle




   • extenders
   • management bundles                   bundle    bundle
Composite
Subsystems: Kernels
                Root (kernel)




             Composite (user region)




   bundles      packages          services
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 installed from a repository
Subsystem Content and
   Dependencies in
       Practice
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
Nested Subsystems
• So far all subsystems have been children of
  the root subsystem
                                 Root




               Application                   Application

            bundle     bundle             bundle     bundle




                                Feature

                       bundle             bundle
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                    Application


              bundle      bundle             bundle      bundle




              bundle      bundle             bundle
Nested Subsystems
• Nested features useful for logical grouping
                    Root                                         Root




                                                                Feature


                Application
                                                                             Feature

                                              bundle   bundle       bundle        bundle


                                Feature

  bundle   bundle      bundle        bundle
Nested Subsystems
• Nested applications useful for scoping
                                   Root




            bundle




                                Application




                                                  Application


                     bundle   bundle          bundle       bundle
Getting Started
Trying it out
• Apache Aries support in development
• Some Virgo equivalents available
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 Equivalents
    Standard Function               Virgo Equivalent

          Feature                    Unscoped plan

Application - scoped using a   PAR or scoped plan - scoped
           region                using metadata rewriting
Composite - scoped using a
                                      User region
           region
                                     Nested plans
          Nesting
                                 PARs, plans, user region
        Repository                     Repository

  Deployment Contexts                       -
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 on Virgo Kernel
 •   https://github.com/glyn/aries-subsystems-on-virgo-kernel

• Virgo User & Programmer Guides
 •   http://www.eclipse.org/virgo/documentation/

More Related Content

Viewers also liked (19)

Bixi
BixiBixi
Bixi
 
Fast Pitch Forum (Picnik)
Fast Pitch Forum (Picnik)Fast Pitch Forum (Picnik)
Fast Pitch Forum (Picnik)
 
Biotechnics.ltd 16.09.2014
Biotechnics.ltd 16.09.2014Biotechnics.ltd 16.09.2014
Biotechnics.ltd 16.09.2014
 
Zagor - 002 - rijecni duh part 2
Zagor - 002 - rijecni duh part 2Zagor - 002 - rijecni duh part 2
Zagor - 002 - rijecni duh part 2
 
Untitled Presentation
Untitled PresentationUntitled Presentation
Untitled Presentation
 
Hpa training activity 1.1
Hpa training activity 1.1Hpa training activity 1.1
Hpa training activity 1.1
 
Blackjackets
BlackjacketsBlackjackets
Blackjackets
 
BITC Editorial Calendar
BITC Editorial CalendarBITC Editorial Calendar
BITC Editorial Calendar
 
Programmation web1
Programmation web1Programmation web1
Programmation web1
 
Bivalve: Cloïssa
Bivalve: CloïssaBivalve: Cloïssa
Bivalve: Cloïssa
 
Biblis Demo 24 4 2010
Biblis Demo 24 4 2010Biblis Demo 24 4 2010
Biblis Demo 24 4 2010
 
Binecuvantare 1
Binecuvantare 1Binecuvantare 1
Binecuvantare 1
 
Binbin
BinbinBinbin
Binbin
 
Topic Twelve Paul's Life and Letters
Topic Twelve Paul's Life and LettersTopic Twelve Paul's Life and Letters
Topic Twelve Paul's Life and Letters
 
Bindhu-Btech-Civil (1)
Bindhu-Btech-Civil (1)Bindhu-Btech-Civil (1)
Bindhu-Btech-Civil (1)
 
Biogas
BiogasBiogas
Biogas
 
Bimetallic
BimetallicBimetallic
Bimetallic
 
Blackbelt
BlackbeltBlackbelt
Blackbelt
 
Darwinsbirthday
DarwinsbirthdayDarwinsbirthday
Darwinsbirthday
 

Similar to Practical OSGi Subsystems

Building a server platform with os gi
Building a server platform with os giBuilding a server platform with os gi
Building a server platform with os gi
Dileepa Jayakody
 
Patterns for Building High Performance Applications in Cloud - CloudConnect2012
Patterns for Building High Performance Applications in Cloud - CloudConnect2012Patterns for Building High Performance Applications in Cloud - CloudConnect2012
Patterns for Building High Performance Applications in Cloud - CloudConnect2012
Munish Gupta
 
Conole vilnius 3_nov
Conole vilnius 3_novConole vilnius 3_nov
Conole vilnius 3_nov
grainne
 
Building a Modular Server Platform with OSGi - Harshana Eranga Martin, Dileep...
Building a Modular Server Platform with OSGi - Harshana Eranga Martin, Dileep...Building a Modular Server Platform with OSGi - Harshana Eranga Martin, Dileep...
Building a Modular Server Platform with OSGi - Harshana Eranga Martin, Dileep...
mfrancis
 
VMware - Snapshot sessions - Deploy and manage tomorrow's applications today
VMware - Snapshot sessions  - Deploy and manage tomorrow's applications todayVMware - Snapshot sessions  - Deploy and manage tomorrow's applications today
VMware - Snapshot sessions - Deploy and manage tomorrow's applications today
AnnSteyaert_vmware
 

Similar to Practical OSGi Subsystems (20)

Practical OSGi Subsystems - Glyn Normington
Practical OSGi Subsystems - Glyn NormingtonPractical OSGi Subsystems - Glyn Normington
Practical OSGi Subsystems - Glyn Normington
 
Software Engineering of Component-Based Systems-of-Systems: A Reference Frame...
Software Engineering of Component-Based Systems-of-Systems: A Reference Frame...Software Engineering of Component-Based Systems-of-Systems: A Reference Frame...
Software Engineering of Component-Based Systems-of-Systems: A Reference Frame...
 
OSGi & Blueprint
OSGi & BlueprintOSGi & Blueprint
OSGi & Blueprint
 
The New Open Distributed Application Architecture
The New Open Distributed Application ArchitectureThe New Open Distributed Application Architecture
The New Open Distributed Application Architecture
 
Building a server platform with os gi
Building a server platform with os giBuilding a server platform with os gi
Building a server platform with os gi
 
Patterns for Building High Performance Applications in Cloud - CloudConnect2012
Patterns for Building High Performance Applications in Cloud - CloudConnect2012Patterns for Building High Performance Applications in Cloud - CloudConnect2012
Patterns for Building High Performance Applications in Cloud - CloudConnect2012
 
Conole vilnius 3_nov
Conole vilnius 3_novConole vilnius 3_nov
Conole vilnius 3_nov
 
Building a Modular Server Platform with OSGi - Harshana Eranga Martin, Dileep...
Building a Modular Server Platform with OSGi - Harshana Eranga Martin, Dileep...Building a Modular Server Platform with OSGi - Harshana Eranga Martin, Dileep...
Building a Modular Server Platform with OSGi - Harshana Eranga Martin, Dileep...
 
Building a Modular Server Platform with OSGi
Building a Modular Server Platform with OSGiBuilding a Modular Server Platform with OSGi
Building a Modular Server Platform with OSGi
 
The A2530x24xx AIR Module for ZigBee Standard Applications
The A2530x24xx AIR Module for ZigBee Standard ApplicationsThe A2530x24xx AIR Module for ZigBee Standard Applications
The A2530x24xx AIR Module for ZigBee Standard Applications
 
The Cloud Concierge
The Cloud ConciergeThe Cloud Concierge
The Cloud Concierge
 
S/W Design and Modularity using Maven
S/W Design and Modularity using MavenS/W Design and Modularity using Maven
S/W Design and Modularity using Maven
 
Code Reuse Made Easy: Uncovering the Hidden Gems of Corporate and Open Source...
Code Reuse Made Easy: Uncovering the Hidden Gems of Corporate and Open Source...Code Reuse Made Easy: Uncovering the Hidden Gems of Corporate and Open Source...
Code Reuse Made Easy: Uncovering the Hidden Gems of Corporate and Open Source...
 
Subsystems in the Wild - G Charters
Subsystems in the Wild - G ChartersSubsystems in the Wild - G Charters
Subsystems in the Wild - G Charters
 
Configure, Pack and Distribute: An RPM Creation Workshop
Configure, Pack and Distribute: An RPM Creation WorkshopConfigure, Pack and Distribute: An RPM Creation Workshop
Configure, Pack and Distribute: An RPM Creation Workshop
 
Gluster Webinar: Introduction to GlusterFS v3.3
Gluster Webinar: Introduction to GlusterFS v3.3Gluster Webinar: Introduction to GlusterFS v3.3
Gluster Webinar: Introduction to GlusterFS v3.3
 
VMware - Snapshot sessions - Deploy and manage tomorrow's applications today
VMware - Snapshot sessions  - Deploy and manage tomorrow's applications todayVMware - Snapshot sessions  - Deploy and manage tomorrow's applications today
VMware - Snapshot sessions - Deploy and manage tomorrow's applications today
 
Tech talk live alfresco add ons
Tech talk live alfresco add onsTech talk live alfresco add ons
Tech talk live alfresco add ons
 
End of RAID as we know it with Ceph Replication
End of RAID as we know it with Ceph ReplicationEnd of RAID as we know it with Ceph Replication
End of RAID as we know it with Ceph Replication
 
Continuous Delivery with NetflixOSS
Continuous Delivery with NetflixOSSContinuous Delivery with NetflixOSS
Continuous Delivery with NetflixOSS
 

Practical OSGi Subsystems

  • 1. Practical OSGi Subsystems Glyn Normington
  • 2. Agenda • Background • Subsystem types • Nested subsystems • Subsystem content and dependencies • Getting started
  • 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. Why Subsystems? • Many bundles • Named, versioned grouping • Management • Scoping
  • 5. Scoping • Bundles • Packages • Capabilities • Services
  • 7. Feature Subsystems Feature Scoping: bundle bundle • None bundle bundle
  • 8. Application Subsystems Scoping: Application • No exports bundle bundle • Automatic imports bundle bundle
  • 9. Composite Subsystems Scoping: Composite • Configurable exports bundle bundle • Configurable imports bundle bundle
  • 10. Subsystem Types in Practice
  • 11. Feature Subsystems • Useful for grouping dependencies • More controlled than auto-detection • Helps avoid uses constraint failures • Useful for: • Common infrastructure Feature bundle bundle • Shared bundles 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 Application Application • Makes update more difficult bundle bundle bundle bundle • Can lead to resolution failures Feature bundle bundle
  • 13. Composite Subsystems • Essentially a systems programming feature • Useful for kernels and special infrastructure • Not recommended for general, widespread application use • Complex Composite • Can duplicate infrastructure bundle bundle • extenders • management bundles bundle bundle
  • 14. Composite Subsystems: Kernels Root (kernel) Composite (user region) bundles packages services
  • 15. Subsystem Content and Dependencies
  • 16. Subsystem Content • By value in a subsystem archive • By reference to a repository
  • 17. Dependencies • Satisfy the requirements of a subsystem • But not included in the subsystem content • Automatically installed from a repository
  • 18. Subsystem Content and Dependencies in Practice
  • 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 Application bundle bundle bundle bundle Feature bundle bundle
  • 22. Nested Subsystems • Subsystems can be nested to any depth • Sharing between parent and child is controlled by the child
  • 24. Nested Subsystems • Features useful for grouping other subsystems Root Feature Application Application bundle bundle bundle bundle bundle bundle bundle
  • 25. Nested Subsystems • Nested features useful for logical grouping Root Root Feature Application Feature bundle bundle bundle bundle Feature bundle bundle bundle bundle
  • 26. Nested Subsystems • Nested applications useful for scoping Root bundle Application Application bundle bundle bundle bundle
  • 28. Trying it out • Apache Aries support in development • Some Virgo equivalents available
  • 29. 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
  • 30. Virgo Equivalents Standard Function Virgo Equivalent Feature Unscoped plan Application - scoped using a PAR or scoped plan - scoped region using metadata rewriting Composite - scoped using a User region region Nested plans Nesting PARs, plans, user region Repository Repository Deployment Contexts -
  • 31. Thanks I am indebted to John Ross for his help with Aries Subsystems
  • 32. 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/

Editor's Notes

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n