SlideShare a Scribd company logo
Multi-Bundle
                      Scoping in
                        OSGi
                                Glyn Normington


         50 µm lead sulphide
         assemblies each containing
         ~108 nanoparticles


Copyright VMware Inc. 2011. Licensed under the Eclipse Public License
Agenda
•Modules in Java
• Multi-bundle modules
• Scoping mechanisms
• Subsystems
Modules in Java
Modularity
the degree to which a system’s components
may be separated and recombined
the tightness of coupling between components
the degree to which the system architecture
controls the mixing and matching of components
Modularity
the degree to which a system’s components



information
may be separated and recombined
the tightness of coupling between components
the degree to which the system architecture



   hiding
controls the mixing and matching of components
Modules in Java
• Class
• Package
• JAR
• Class loader      }   OSGi bundle

• Module - Java 8
• Larger scale modules?
Multi-Bundle Modules
Information to Hide
• Bundle
• Package
• Generic capability
• Service
Example 1
Feature

 bundle       bundle

 bundle       bundle
Example 2
Scoped App

  bundle       bundle

  bundle       bundle
Example 3
Kernel

bundle       bundle

bundle       bundle
Scoping Mechanisms
Scoping Mechanisms
• x-internal/x-friends
• metadata rewriting
• composite bundle
• framework hooks
• region digraph
Eclipse x-* Directives
• Export-Package directives
• Enforced by framework
•   x-internal

•   x-friends

• Non-standard
• Naming friends is brittle
➡ Standard, maintainable mechanism
Metadata Rewriting
Hide internals:
   • Decorate referents
    • Bundles and packages
    • Generic capabilities
   • Fix references
   • Use service registry hooks
Metadata Rewriting
     in Virgo

     Demo ...
Metadata Rewriting
Issues:
• Suitable for isolated applications only
• Intrusive
• Complicates bundle update
• Can be coded round
• Non-standard
➡ Standard scoping in the framework
Composite Bundle
• OSGi draft spec
• Prototyped in Equinox, deprecated
• Uses framework instance
• Surrogate bundle represents “parent”
• Used in Virgo 2.1 to isolate the kernel
Composite Bundle
Issues:
• Implemented in the framework
• Cannot expose constituent bundles
• Hard to spec portably
➡ Superseded
Framework Hooks
• Part of OSGi 4.3 core
• Control visibility
• Enable framework to be partitioned
• 5 main hooks:
 • resolver hook
 • bundle find/event hooks
 • service find/event hooks
Framework Hooks
Issues:
• Low level
• Consistency of hooks
• Coexistence of sets of hooks
➡ Higher level API needed
Region Digraph
Graph Theory Interlude
Tree
DAG
Digraph
Graph
Region Digraph
•   Framework hook abstraction

•   Bundles partitioned into regions

•   Regions connected by filters

    •   Bundles

    •   Packages

    •   Generic capabilities

    •   Services
Example Digraph
    region A
       p3



            "allow p1"



      p1, p2



    region B
Example Digraph
    region A
                         visible: p1, p3
       p3



            "allow p1"



      p1, p2

                         visible: p1, p2
    region B
Example Digraph 2
region X



      "allow p1, p3"



  p1, p2          "allow p3, p4"     p3, p4



region Y                           region Z
Example Digraph 2
      region X
                         visible: p1, p3



             "allow p1, p3"



         p1, p2          "allow p3, p4"     p3, p4



      region Y                            region Z
visible: p1, p2, p3, p4
Region Digraph
• Equinox bundle
• Runs on standard framework hooks
• Persistent
• JMX
Region Digraph Uses
                                                     user region
• Virgo 3.0 kernel/user region
                                                               p3
                                                              s3, s4
                                                               b3


• Apache Aries “subsystems”                "allow s3"                  "allow p1, s1, b1"
  prototype                           (service of p1 type)




• Standalone:                                                 p1, p2
                                                              s1, s2
                                                              b1, b2
   “We're using [the region digraph]                         kernel
   essentially for a fully multi-tenant
   plugin system to Web applications.”
                          Robert Sauer
Region Digraph in Virgo
       Demo ...
Region Digraph API
public interface RegionDigraph ... {

	 Region createRegion(String regionName) throws BundleException;

    RegionFilterBuilder createRegionFilterBuilder();

    ...
}

public interface Region {

	 void connectRegion(Region headRegion, RegionFilter filter)
    throws BundleException;

    ...
}
Region Digraph
Issues:
• Too low level for application use
• Non-standard
➡ Standard, high-level programming model
Subsystems
Why Subsystems?
5 projects have multi-bundle constructs
• Poor portability
• Inconsistent terminology
• Diverse function
➡ Standard
Subsystems
• OSGi Enterprise Expert Group
• Scoping based on composite bundles
  framework hooks
• Public draft available (“RFC 152”)
What is a Subsystem?
• Group of constituents with dependencies
 • Constituents: bundles, subsystems, ...
 • Dependencies: loosely coupled pre-reqs
• Named and versioned
• Defined lifecycle
Subsystem Scoping

Subsystem type     Scoping

   application   contents hidden

   composite      configurable

    feature           none
Example 1

 Application


  Feature
Example 2
 Feature A


 Feature C


 Feature B
Example 3

Application A

Application B

Composite C
Scoping and Regions
Subsystem scoping can be
• defined in terms of
• implemented using
a region digraph
Complex Scoping 1
  App3

         FeatureQ
         FeatureR
         FeatureP

     CompositeC
Region Digraph
         Region A3
     App3   FeatureQ
              FeatureR
              FeatureP
                            App3

                                   FeatureQ
                                   FeatureR
Region C      CompositeC           FeatureP

                               CompositeC
Complex Scoping 2
        Root
    Application A
    Application B
    Composite C

    Composite D
    Application E
Region Digraph
         Root


App A   Comp D   App E
                             Root
                         Application A
                         Application B

App V   Comp C           Composite C

                         Composite D
                         Application E
Dependencies
        FeatureX

App1                App2

        FeatureY

       CompositeF
Installing Dependencies
                    Root
  "accept
transitive"


                 CompositeF



          App1                App2
Installing Dependencies
                  Root
  "accept
transitive"


               CompositeF



App1          App2   FeatureX   FeatureY
Region Digraph
Region    Region F     Region
 A1                     A2
          FeatureX

App1                   App2
          FeatureY

          CompositeF                    FeatureX

                                App1                App2

                                        FeatureY

                                       CompositeF
Conclusion
Modularity in Java:
• Class, package, JAR, class loader
• Modules in Java 8
• Larger modules?
Modularity in OSGi:
• Bundles
• Multi-bundle modules
• Subsystems
Further Information
•   Public draft of subsystems (RFC 152)
    •   http://www.osgi.org/Download/File?url=/download/osgi-early-draft-2011-09.pdf


•   Region digraph
    •   http://underlap.blogspot.com/2011/05/equinox-digraph-ready-for-use.html


•   Eclipse Virgo and the region digraph
    •   https://bugs.eclipse.org/bugs/show_bug.cgi?id=330776


•   Apache Aries use of region digraph
    •   https://issues.apache.org/jira/browse/ARIES-644


•   Multi-module modules and Java 8
    •   http://mail.openjdk.java.net/pipermail/jigsaw-dev/2011-October/001564.html
Thanks to...
• Wikipedia image courtesy of Wikipedia.org
• Field of Flowers by Paul Podsiadlo and Elena
  Shevchenko, courtesy of Argonne National
  Laboratory

More Related Content

Viewers also liked

Desayuno cinco dias 2
Desayuno cinco dias 2Desayuno cinco dias 2
Desayuno cinco dias 2
Deusto Business School
 
Battle Of Small Thinking
Battle Of Small ThinkingBattle Of Small Thinking
Battle Of Small Thinkinggabi4
 
Vanessa Capogreco Full Resume 2015
Vanessa Capogreco Full Resume 2015Vanessa Capogreco Full Resume 2015
Vanessa Capogreco Full Resume 2015
Vanessa Capogreco
 
Untitled Presentation
Untitled PresentationUntitled Presentation
Untitled Presentation
Gail-Anne G. Vizzarri
 
Experimento 1
Experimento 1Experimento 1
Experimento 1
wiledi
 
Sistemas de información, organizaciones y estrategia
Sistemas de información, organizaciones y estrategiaSistemas de información, organizaciones y estrategia
Sistemas de información, organizaciones y estrategia
Oscar David Vallecillo Rojas
 
If you die in VR do you die
If you die in VR do you dieIf you die in VR do you die
If you die in VR do you die
haaris123
 
BX2Exhibits
BX2ExhibitsBX2Exhibits
TEST
TESTTEST
TEST
giganx
 
Ruzan Minasyan
Ruzan Minasyan Ruzan Minasyan
Ruzan Minasyan
Gohar Gasparyan
 
Going deeper, seeing further another pdf
Going deeper, seeing further another pdfGoing deeper, seeing further another pdf
Going deeper, seeing further another pdf
jdwyer25
 
FINAL (5)
FINAL (5)FINAL (5)
FINAL (5)
David Grossfeld
 
Sabin nemeş – pictor din cluj 2
Sabin nemeş – pictor din cluj 2Sabin nemeş – pictor din cluj 2
Sabin nemeş – pictor din cluj 2
Claudiu Nemeş
 
Guiondecortometrajedelasexualidadenadolecentes
GuiondecortometrajedelasexualidadenadolecentesGuiondecortometrajedelasexualidadenadolecentes
Guiondecortometrajedelasexualidadenadolecentes
Cinthya Ramos Huitron
 
Administración Financiera Madrid
Administración Financiera MadridAdministración Financiera Madrid
Administración Financiera Madrid
fernandina95
 
Cronologia base de datos
Cronologia base de datosCronologia base de datos
Cronologia base de datos
Aime Rodriguez
 
What is Design Thinking? (Tim Brown, 2008)
What is Design Thinking? (Tim Brown, 2008)What is Design Thinking? (Tim Brown, 2008)
What is Design Thinking? (Tim Brown, 2008)
Léo H.
 

Viewers also liked (18)

Desayuno cinco dias 2
Desayuno cinco dias 2Desayuno cinco dias 2
Desayuno cinco dias 2
 
Battle Of Small Thinking
Battle Of Small ThinkingBattle Of Small Thinking
Battle Of Small Thinking
 
Vanessa Capogreco Full Resume 2015
Vanessa Capogreco Full Resume 2015Vanessa Capogreco Full Resume 2015
Vanessa Capogreco Full Resume 2015
 
Untitled Presentation
Untitled PresentationUntitled Presentation
Untitled Presentation
 
Experimento 1
Experimento 1Experimento 1
Experimento 1
 
Index_IJoDS_V2_N1 (1)
Index_IJoDS_V2_N1 (1)Index_IJoDS_V2_N1 (1)
Index_IJoDS_V2_N1 (1)
 
Sistemas de información, organizaciones y estrategia
Sistemas de información, organizaciones y estrategiaSistemas de información, organizaciones y estrategia
Sistemas de información, organizaciones y estrategia
 
If you die in VR do you die
If you die in VR do you dieIf you die in VR do you die
If you die in VR do you die
 
BX2Exhibits
BX2ExhibitsBX2Exhibits
BX2Exhibits
 
TEST
TESTTEST
TEST
 
Ruzan Minasyan
Ruzan Minasyan Ruzan Minasyan
Ruzan Minasyan
 
Going deeper, seeing further another pdf
Going deeper, seeing further another pdfGoing deeper, seeing further another pdf
Going deeper, seeing further another pdf
 
FINAL (5)
FINAL (5)FINAL (5)
FINAL (5)
 
Sabin nemeş – pictor din cluj 2
Sabin nemeş – pictor din cluj 2Sabin nemeş – pictor din cluj 2
Sabin nemeş – pictor din cluj 2
 
Guiondecortometrajedelasexualidadenadolecentes
GuiondecortometrajedelasexualidadenadolecentesGuiondecortometrajedelasexualidadenadolecentes
Guiondecortometrajedelasexualidadenadolecentes
 
Administración Financiera Madrid
Administración Financiera MadridAdministración Financiera Madrid
Administración Financiera Madrid
 
Cronologia base de datos
Cronologia base de datosCronologia base de datos
Cronologia base de datos
 
What is Design Thinking? (Tim Brown, 2008)
What is Design Thinking? (Tim Brown, 2008)What is Design Thinking? (Tim Brown, 2008)
What is Design Thinking? (Tim Brown, 2008)
 

Similar to Multi-bundle Scoping in OSGi

Eclipse Virgo
Eclipse VirgoEclipse Virgo
Eclipse Virgo
glynnormington
 
EclipseCon Europe 2011 Virgo 3.0
EclipseCon Europe 2011 Virgo 3.0EclipseCon Europe 2011 Virgo 3.0
EclipseCon Europe 2011 Virgo 3.0
Christopher Frost
 
Creating a Service Platform for .NET - Clément Escoffier, University of Grenoble
Creating a Service Platform for .NET - Clément Escoffier, University of GrenobleCreating a Service Platform for .NET - Clément Escoffier, University of Grenoble
Creating a Service Platform for .NET - Clément Escoffier, University of Grenoble
mfrancis
 
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.
 
K8s Pod Scheduling - Deep Dive. By Tsahi Duek.
K8s Pod Scheduling - Deep Dive. By Tsahi Duek.K8s Pod Scheduling - Deep Dive. By Tsahi Duek.
K8s Pod Scheduling - Deep Dive. By Tsahi Duek.
Cloud Native Day Tel Aviv
 
Data Diffing Based Software Architecture Patterns
Data Diffing Based Software Architecture PatternsData Diffing Based Software Architecture Patterns
Data Diffing Based Software Architecture Patterns
Huahai Yang
 
CloudFest Denver Windows Azure Design Patterns
CloudFest Denver Windows Azure Design PatternsCloudFest Denver Windows Azure Design Patterns
CloudFest Denver Windows Azure Design Patterns
David Pallmann
 
Rook - cloud-native storage
Rook - cloud-native storageRook - cloud-native storage
Rook - cloud-native storage
Karol Chrapek
 
meetPHP#8 - PHP startups prototypes
meetPHP#8 - PHP startups prototypesmeetPHP#8 - PHP startups prototypes
meetPHP#8 - PHP startups prototypes
Max Małecki
 
Framework Engineering
Framework EngineeringFramework Engineering
Framework Engineering
YoungSu Son
 
Docker Swarm and Traefik 2.0
Docker Swarm and Traefik 2.0Docker Swarm and Traefik 2.0
Docker Swarm and Traefik 2.0
Jakub Hajek
 
The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
 The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ... The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
Josef Adersberger
 
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
QAware GmbH
 
Velocity-EHF for Android
Velocity-EHF for AndroidVelocity-EHF for Android
Velocity-EHF for Android
michaeljfawcett
 
Go語言開發APM微服務在Kubernetes之經驗分享
Go語言開發APM微服務在Kubernetes之經驗分享Go語言開發APM微服務在Kubernetes之經驗分享
Go語言開發APM微服務在Kubernetes之經驗分享
Te-Yen Liu
 
Solaris cluster roadshow day 1 sales overview
Solaris cluster roadshow day 1 sales overviewSolaris cluster roadshow day 1 sales overview
Solaris cluster roadshow day 1 sales overview
xKinAnx
 
12 Factor App: Best Practices for JVM Deployment
12 Factor App: Best Practices for JVM Deployment12 Factor App: Best Practices for JVM Deployment
12 Factor App: Best Practices for JVM Deployment
Joe Kutner
 
HA and DR for Cloud Workloads
HA and DR for Cloud WorkloadsHA and DR for Cloud Workloads
HA and DR for Cloud Workloads
swamybabu
 
Apache Geode Meetup, London
Apache Geode Meetup, LondonApache Geode Meetup, London
Apache Geode Meetup, London
Apache Geode
 
[Hic2011] using hadoop lucene-solr-for-large-scale-search by systex
[Hic2011] using hadoop lucene-solr-for-large-scale-search by systex[Hic2011] using hadoop lucene-solr-for-large-scale-search by systex
[Hic2011] using hadoop lucene-solr-for-large-scale-search by systex
James Chen
 

Similar to Multi-bundle Scoping in OSGi (20)

Eclipse Virgo
Eclipse VirgoEclipse Virgo
Eclipse Virgo
 
EclipseCon Europe 2011 Virgo 3.0
EclipseCon Europe 2011 Virgo 3.0EclipseCon Europe 2011 Virgo 3.0
EclipseCon Europe 2011 Virgo 3.0
 
Creating a Service Platform for .NET - Clément Escoffier, University of Grenoble
Creating a Service Platform for .NET - Clément Escoffier, University of GrenobleCreating a Service Platform for .NET - Clément Escoffier, University of Grenoble
Creating a Service Platform for .NET - Clément Escoffier, University of Grenoble
 
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
 
K8s Pod Scheduling - Deep Dive. By Tsahi Duek.
K8s Pod Scheduling - Deep Dive. By Tsahi Duek.K8s Pod Scheduling - Deep Dive. By Tsahi Duek.
K8s Pod Scheduling - Deep Dive. By Tsahi Duek.
 
Data Diffing Based Software Architecture Patterns
Data Diffing Based Software Architecture PatternsData Diffing Based Software Architecture Patterns
Data Diffing Based Software Architecture Patterns
 
CloudFest Denver Windows Azure Design Patterns
CloudFest Denver Windows Azure Design PatternsCloudFest Denver Windows Azure Design Patterns
CloudFest Denver Windows Azure Design Patterns
 
Rook - cloud-native storage
Rook - cloud-native storageRook - cloud-native storage
Rook - cloud-native storage
 
meetPHP#8 - PHP startups prototypes
meetPHP#8 - PHP startups prototypesmeetPHP#8 - PHP startups prototypes
meetPHP#8 - PHP startups prototypes
 
Framework Engineering
Framework EngineeringFramework Engineering
Framework Engineering
 
Docker Swarm and Traefik 2.0
Docker Swarm and Traefik 2.0Docker Swarm and Traefik 2.0
Docker Swarm and Traefik 2.0
 
The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
 The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ... The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
The Good, the Bad and the Ugly of Migrating Hundreds of Legacy Applications ...
 
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
Migrating Hundreds of Legacy Applications to Kubernetes - The Good, the Bad, ...
 
Velocity-EHF for Android
Velocity-EHF for AndroidVelocity-EHF for Android
Velocity-EHF for Android
 
Go語言開發APM微服務在Kubernetes之經驗分享
Go語言開發APM微服務在Kubernetes之經驗分享Go語言開發APM微服務在Kubernetes之經驗分享
Go語言開發APM微服務在Kubernetes之經驗分享
 
Solaris cluster roadshow day 1 sales overview
Solaris cluster roadshow day 1 sales overviewSolaris cluster roadshow day 1 sales overview
Solaris cluster roadshow day 1 sales overview
 
12 Factor App: Best Practices for JVM Deployment
12 Factor App: Best Practices for JVM Deployment12 Factor App: Best Practices for JVM Deployment
12 Factor App: Best Practices for JVM Deployment
 
HA and DR for Cloud Workloads
HA and DR for Cloud WorkloadsHA and DR for Cloud Workloads
HA and DR for Cloud Workloads
 
Apache Geode Meetup, London
Apache Geode Meetup, LondonApache Geode Meetup, London
Apache Geode Meetup, London
 
[Hic2011] using hadoop lucene-solr-for-large-scale-search by systex
[Hic2011] using hadoop lucene-solr-for-large-scale-search by systex[Hic2011] using hadoop lucene-solr-for-large-scale-search by systex
[Hic2011] using hadoop lucene-solr-for-large-scale-search by systex
 

Recently uploaded

Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
David Brossard
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
Claudio Di Ciccio
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
Zilliz
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdfAI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
Techgropse Pvt.Ltd.
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 

Recently uploaded (20)

Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdfAI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 

Multi-bundle Scoping in OSGi

  • 1. Multi-Bundle Scoping in OSGi Glyn Normington 50 µm lead sulphide assemblies each containing ~108 nanoparticles Copyright VMware Inc. 2011. Licensed under the Eclipse Public License
  • 2. Agenda •Modules in Java • Multi-bundle modules • Scoping mechanisms • Subsystems
  • 4. Modularity the degree to which a system’s components may be separated and recombined the tightness of coupling between components the degree to which the system architecture controls the mixing and matching of components
  • 5. Modularity the degree to which a system’s components information may be separated and recombined the tightness of coupling between components the degree to which the system architecture hiding controls the mixing and matching of components
  • 6. Modules in Java • Class • Package • JAR • Class loader } OSGi bundle • Module - Java 8 • Larger scale modules?
  • 8. Information to Hide • Bundle • Package • Generic capability • Service
  • 9. Example 1 Feature bundle bundle bundle bundle
  • 10. Example 2 Scoped App bundle bundle bundle bundle
  • 11. Example 3 Kernel bundle bundle bundle bundle
  • 13. Scoping Mechanisms • x-internal/x-friends • metadata rewriting • composite bundle • framework hooks • region digraph
  • 14. Eclipse x-* Directives • Export-Package directives • Enforced by framework • x-internal • x-friends • Non-standard • Naming friends is brittle ➡ Standard, maintainable mechanism
  • 15. Metadata Rewriting Hide internals: • Decorate referents • Bundles and packages • Generic capabilities • Fix references • Use service registry hooks
  • 16. Metadata Rewriting in Virgo Demo ...
  • 17. Metadata Rewriting Issues: • Suitable for isolated applications only • Intrusive • Complicates bundle update • Can be coded round • Non-standard ➡ Standard scoping in the framework
  • 18. Composite Bundle • OSGi draft spec • Prototyped in Equinox, deprecated • Uses framework instance • Surrogate bundle represents “parent” • Used in Virgo 2.1 to isolate the kernel
  • 19. Composite Bundle Issues: • Implemented in the framework • Cannot expose constituent bundles • Hard to spec portably ➡ Superseded
  • 20. Framework Hooks • Part of OSGi 4.3 core • Control visibility • Enable framework to be partitioned • 5 main hooks: • resolver hook • bundle find/event hooks • service find/event hooks
  • 21. Framework Hooks Issues: • Low level • Consistency of hooks • Coexistence of sets of hooks ➡ Higher level API needed
  • 24. Tree
  • 25. DAG
  • 27. Graph
  • 28. Region Digraph • Framework hook abstraction • Bundles partitioned into regions • Regions connected by filters • Bundles • Packages • Generic capabilities • Services
  • 29. Example Digraph region A p3 "allow p1" p1, p2 region B
  • 30. Example Digraph region A visible: p1, p3 p3 "allow p1" p1, p2 visible: p1, p2 region B
  • 31. Example Digraph 2 region X "allow p1, p3" p1, p2 "allow p3, p4" p3, p4 region Y region Z
  • 32. Example Digraph 2 region X visible: p1, p3 "allow p1, p3" p1, p2 "allow p3, p4" p3, p4 region Y region Z visible: p1, p2, p3, p4
  • 33. Region Digraph • Equinox bundle • Runs on standard framework hooks • Persistent • JMX
  • 34. Region Digraph Uses user region • Virgo 3.0 kernel/user region p3 s3, s4 b3 • Apache Aries “subsystems” "allow s3" "allow p1, s1, b1" prototype (service of p1 type) • Standalone: p1, p2 s1, s2 b1, b2 “We're using [the region digraph] kernel essentially for a fully multi-tenant plugin system to Web applications.” Robert Sauer
  • 35. Region Digraph in Virgo Demo ...
  • 36. Region Digraph API public interface RegionDigraph ... { Region createRegion(String regionName) throws BundleException; RegionFilterBuilder createRegionFilterBuilder(); ... } public interface Region { void connectRegion(Region headRegion, RegionFilter filter) throws BundleException; ... }
  • 37. Region Digraph Issues: • Too low level for application use • Non-standard ➡ Standard, high-level programming model
  • 39. Why Subsystems? 5 projects have multi-bundle constructs • Poor portability • Inconsistent terminology • Diverse function ➡ Standard
  • 40. Subsystems • OSGi Enterprise Expert Group • Scoping based on composite bundles framework hooks • Public draft available (“RFC 152”)
  • 41. What is a Subsystem? • Group of constituents with dependencies • Constituents: bundles, subsystems, ... • Dependencies: loosely coupled pre-reqs • Named and versioned • Defined lifecycle
  • 42. Subsystem Scoping Subsystem type Scoping application contents hidden composite configurable feature none
  • 44. Example 2 Feature A Feature C Feature B
  • 46. Scoping and Regions Subsystem scoping can be • defined in terms of • implemented using a region digraph
  • 47. Complex Scoping 1 App3 FeatureQ FeatureR FeatureP CompositeC
  • 48. Region Digraph Region A3 App3 FeatureQ FeatureR FeatureP App3 FeatureQ FeatureR Region C CompositeC FeatureP CompositeC
  • 49. Complex Scoping 2 Root Application A Application B Composite C Composite D Application E
  • 50. Region Digraph Root App A Comp D App E Root Application A Application B App V Comp C Composite C Composite D Application E
  • 51. Dependencies FeatureX App1 App2 FeatureY CompositeF
  • 52. Installing Dependencies Root "accept transitive" CompositeF App1 App2
  • 53. Installing Dependencies Root "accept transitive" CompositeF App1 App2 FeatureX FeatureY
  • 54. Region Digraph Region Region F Region A1 A2 FeatureX App1 App2 FeatureY CompositeF FeatureX App1 App2 FeatureY CompositeF
  • 55. Conclusion Modularity in Java: • Class, package, JAR, class loader • Modules in Java 8 • Larger modules? Modularity in OSGi: • Bundles • Multi-bundle modules • Subsystems
  • 56. Further Information • Public draft of subsystems (RFC 152) • http://www.osgi.org/Download/File?url=/download/osgi-early-draft-2011-09.pdf • Region digraph • http://underlap.blogspot.com/2011/05/equinox-digraph-ready-for-use.html • Eclipse Virgo and the region digraph • https://bugs.eclipse.org/bugs/show_bug.cgi?id=330776 • Apache Aries use of region digraph • https://issues.apache.org/jira/browse/ARIES-644 • Multi-module modules and Java 8 • http://mail.openjdk.java.net/pipermail/jigsaw-dev/2011-October/001564.html
  • 57. Thanks to... • Wikipedia image courtesy of Wikipedia.org • Field of Flowers by Paul Podsiadlo and Elena Shevchenko, courtesy of Argonne National Laboratory