際際滷

際際滷Share a Scribd company logo
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, Glass鍖sh, 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


   Con鍖gurable exports   bundle    bundle



 Con鍖gurable 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 dif鍖cult    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 Speci鍖cation
    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
c_daccac
Fast Pitch Forum (Picnik)
Fast Pitch Forum (Picnik)Fast Pitch Forum (Picnik)
Fast Pitch Forum (Picnik)
Washington Technology Industry Association
Biotechnics.ltd 16.09.2014
Biotechnics.ltd 16.09.2014Biotechnics.ltd 16.09.2014
Biotechnics.ltd 16.09.2014
biotechnics
Zagor - 002 - rijecni duh part 2
Zagor - 002 - rijecni duh part 2Zagor - 002 - rijecni duh part 2
Zagor - 002 - rijecni duh part 2
Blagojce Treneski
Untitled Presentation
Untitled PresentationUntitled Presentation
Untitled Presentation
taylala
Hpa training activity 1.1
Hpa training activity 1.1Hpa training activity 1.1
Hpa training activity 1.1
Kim Jackson
Blackjackets
BlackjacketsBlackjackets
Blackjackets
Henry Bruce
BITC Editorial Calendar
BITC Editorial CalendarBITC Editorial Calendar
BITC Editorial Calendar
Business in the Community
Programmation web1Programmation web1
Programmation web1
Annabi Gihed
Bivalve: Clo誰ssa
Bivalve: Clo誰ssaBivalve: Clo誰ssa
Bivalve: Clo誰ssa
arnaucanto
Biblis Demo 24 4 2010Biblis Demo 24 4 2010
Biblis Demo 24 4 2010
erhard renz
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
towgi81p
Bindhu-Btech-Civil (1)
Bindhu-Btech-Civil (1)Bindhu-Btech-Civil (1)
Bindhu-Btech-Civil (1)
bindhu reddy
Biogas
BiogasBiogas
Biogas
Cibusonline
Bimetallic
BimetallicBimetallic
Bimetallic
Santiago Sanchez
Blackbelt
BlackbeltBlackbelt
Blackbelt
Kukuasu
Darwinsbirthday
DarwinsbirthdayDarwinsbirthday
Darwinsbirthday
Eunice Mokgopha
Biotechnics.ltd 16.09.2014
Biotechnics.ltd 16.09.2014Biotechnics.ltd 16.09.2014
Biotechnics.ltd 16.09.2014
biotechnics
Zagor - 002 - rijecni duh part 2
Zagor - 002 - rijecni duh part 2Zagor - 002 - rijecni duh part 2
Zagor - 002 - rijecni duh part 2
Blagojce Treneski
Untitled Presentation
Untitled PresentationUntitled Presentation
Untitled Presentation
taylala
Hpa training activity 1.1
Hpa training activity 1.1Hpa training activity 1.1
Hpa training activity 1.1
Kim Jackson
Programmation web1Programmation web1
Programmation web1
Annabi Gihed
Bivalve: Clo誰ssa
Bivalve: Clo誰ssaBivalve: Clo誰ssa
Bivalve: Clo誰ssa
arnaucanto
Biblis Demo 24 4 2010Biblis Demo 24 4 2010
Biblis Demo 24 4 2010
erhard renz
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
towgi81p
Bindhu-Btech-Civil (1)
Bindhu-Btech-Civil (1)Bindhu-Btech-Civil (1)
Bindhu-Btech-Civil (1)
bindhu reddy
Blackbelt
BlackbeltBlackbelt
Blackbelt
Kukuasu

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
mfrancis
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...
lseinturier
OSGi & Blueprint
OSGi & BlueprintOSGi & Blueprint
OSGi & Blueprint
Kara Satish Kumar
The New Open Distributed Application Architecture
The New Open Distributed Application ArchitectureThe New Open Distributed Application Architecture
The New Open Distributed Application Architecture
Gordon Haff
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
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
Dileepa Jayakody
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
Anaren, Inc.
The Cloud Concierge
The Cloud ConciergeThe Cloud Concierge
The Cloud Concierge
Bob Rhubart
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
Scheidt & Bachmann
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...
Perforce
Subsystems in the Wild - G Charters
Subsystems in the Wild - G ChartersSubsystems in the Wild - G Charters
Subsystems in the Wild - G Charters
mfrancis
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
Novell
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
GlusterFS
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
Tech talk live alfresco add ons
Tech talk live alfresco add onsTech talk live alfresco add ons
Tech talk live alfresco add ons
Alfresco Software
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
Ceph Community
Continuous Delivery with NetflixOSS
Continuous Delivery with NetflixOSSContinuous Delivery with NetflixOSS
Continuous Delivery with NetflixOSS
Daniel Woods
Practical OSGi Subsystems - Glyn Normington
Practical OSGi Subsystems - Glyn NormingtonPractical OSGi Subsystems - Glyn Normington
Practical OSGi Subsystems - Glyn Normington
mfrancis
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...
lseinturier
The New Open Distributed Application Architecture
The New Open Distributed Application ArchitectureThe New Open Distributed Application Architecture
The New Open Distributed Application Architecture
Gordon Haff
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
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
Dileepa Jayakody
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
Anaren, Inc.
The Cloud Concierge
The Cloud ConciergeThe Cloud Concierge
The Cloud Concierge
Bob Rhubart
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
Scheidt & Bachmann
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...
Perforce
Subsystems in the Wild - G Charters
Subsystems in the Wild - G ChartersSubsystems in the Wild - G Charters
Subsystems in the Wild - G Charters
mfrancis
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
Novell
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
GlusterFS
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
Tech talk live alfresco add ons
Tech talk live alfresco add onsTech talk live alfresco add ons
Tech talk live alfresco add ons
Alfresco Software
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
Ceph Community
Continuous Delivery with NetflixOSS
Continuous Delivery with NetflixOSSContinuous Delivery with NetflixOSS
Continuous Delivery with NetflixOSS
Daniel Woods

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, Glass鍖sh, 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 Con鍖gurable exports bundle bundle Con鍖gurable 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 dif鍖cult 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 Speci鍖cation 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