SlideShare una empresa de Scribd logo
1 de 100
Descargar para leer sin conexión
EclipseCon 2010


                 Isolating Applications in a
                 Collaborative OSGi World
                                     Composite Bundles
                                                Thomas Watson



© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Warning!


                                     Not for the faint of heart!
                                          Lots of details.
                                         No fancy slides.

            (What would you expect from a framework
                         implementer?)



© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
OSGi R4.2 Review
   ●    New Enterprise Specifications
          –    Remote Services
          –    Blueprint
   ●    And more on the way ...
          –    Remote Services Admin
          –    JTA, JMX, JDBC, JNDI, JPA
          –    Web Applications
          –    etc.


© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Forget the High-Level Stuff!
   ●    R4.2 Core framework changes
          –    Service registry hooks
          –    Security enhancements
                  ●   Ordered conditions
                  ●   Fine-grained service and package permissions based on
                      identity of the provider
          –    Bundle tracker
          –    Standard launching and embedding
          –    Composite bundles (provisional spec.)


© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
What can we expect from R4.3 Core?
   ●    Still early in the process
   ●    Early access to draft RFCs
          ●    OSGi API update (RFC 151)
                 –   Use of generics and adaptor patterns
          ●    Composite Bundles (RFC 138)
                 –   Much has changed since the R4.2 provisional spec.
          ●    Generic capabilities and requirements (RFC 154)




© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
What can we expect from R4.3 Core?
   ●    Still early in the process
   ●    Early access to draft RFCs
          ●    OSGi API update (RFC 151)
                 –   Use of generics and adaptor patterns
          ●    Composite Bundles (RFC 138)
                 –   Much has changed since the R4.2 provisional spec.
          ●    Generic capabilities and requirements (RFC 154)




© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Standard Launching & Embedding




© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Framework Implementations
   ●    Bundles are portable
   ●    What about the framework?
          –    Launching and configuring
          –    Controlling its life cycle
          –    Externally interacting with bundles, services, and
               state




© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Standard Launching & Embedding
   ●    Seems like a slam dunk
   ●    What does it give us?
          –    A standard way to create framework instances
          –    A standard API for controlling and interacting with
               framework instances
   ●    What does this help?




© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Standard Launching & Embedding
   ●    Seems like a slam dunk
   ●    What does it give us?
          –    A standard way to create framework instances
          –    A standard API for controlling and interacting with
               framework instances
   ●    What does this help?
          –    Portable scripts and launchers




© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Standard Interfaces


                   public interface FrameworkFactory {
                     Framework newFramework(Map config);
                   }




© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Standard Interfaces


                   public interface FrameworkFactory {
                     Framework newFramework(Map config);
                   }



           public interface Framework extends Bundle {
             void init() throws BundleException;
             FrameworkEvent waitForStop(long timeout)
               throws InterruptedException;
           }


© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Standard Configuration Properties
   ●    org.osgi.framework.bootdelegation
   ●    org.osgi.framework.system.packages
   ●    org.osgi.framework.system.packages.extra
   ●    org.osgi.framework.startlevel.beginning
   ●    org.osgi.framework.storage
   ●    org.osgi.framework.storage.clean
   ●    And others...



© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Out Of Scope
   ●    Multiple framework instances
          –    e.g., no support for sharing/collaboration among
               instances or multiplexing of VM singletons
          –    May or may not work, but implementation
               dependent




© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Multiple Instances
   ●    Pose interesting challenges
   ●    Promise potentially interesting capabilities
   ●    This use case uncovers potential framework
        issues




© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Composite Bundles




© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Framework Limitations
   ●    Applications are either all bundles collaborating
        or an individual bundle
          ●    All global or completely local
   ●    No application/subsystem concept
          ●    Isolation/protection (bundles, services, packages)
          ●    Visibility (bundles, services, packages)
          ●    Grouping (lifecycle)




© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Framework Limitations




                                                                                  Where is the
                                                         Framework                application?
© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Framework Limitations


                                                                                           A3



                                                                                      A2


                                                                              A1
                                                                                   Assume these
                                                                                    belong to an
                                                         Framework                   application
© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Framework Limitations


                                                                                          A3



                                                                                     A2


                                                                              A1
                                                                                       What
                                                                                    if they are
                                                         Framework                 subsystems?
© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Framework Limitations


                                                                                          A3



                                                                                     A2


                                                                              A1
                                                                                   Maybe they
                                                                                   want private
                                                         Framework                  packages
© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Framework Limitations


                                                                                          A3



                                                                                     A2


                                                                              A1

                                                                                   And private
                                                         Framework                  services
© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Framework Limitations


                                                                                           A3



                                                                                      A2


                                                                              A1
                                                                                      Need
                                                                                    subsystem
                                                         Framework                 encapsulation
© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Framework Limitations


                                                                                           A3



                                                                                      A2


                                                                              A1

                                                                                   Private details
                                                         Framework                  are hidden
© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Framework Limitations


                                                                                          A3



                                                                                     A2


                                                                              A1
                                                                                      Public
                                                                                    packages
                                                         Framework                 are exposed
© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Framework Limitations


                                                                                          A3



                                                                                     A2


                                                                              A1
                                                                                     External
                                                                                    packages
                                                         Framework                 are imported
© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Framework Limitations


                                                                                            A3



                                                                                       A2


                                                                              A1

                                                                                   Public services
                                                         Framework                  are exposed
© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Framework Limitations


                                                                                           A3



                                                                                      A2


                                                                              A1
                                                                                   This blob is a
                                                                                    composite
                                                         Framework                    bundle
© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Implementing Composites




© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Composites are composed of
              bundles with resolved states




© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Importing and Exporting Packages

                                                                 Export

                                                                                    export
                                                                                  org.foo.c   C

                          A

                                                                          B

                                                       export
                                                    org.foo.b



                                                Composite Bundle


© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Importing and Exporting Packages

                                                                 Import

                                                                                                export
                                                                                              org.foo.c   C

                          A

                                                                          B
                                 import
                                 org.foo.b
                                                       export                     import
                                                    org.foo.b                     org.foo.c



                                                Composite Bundle


© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Importing and Exporting Packages

                                                               Resolve
                                                                                                export
                                                                                              org.foo.c   C

                          A

                                                                          B
                                 import
                                 org.foo.b
                                                       export                     import
                                                    org.foo.b                     org.foo.c



                                                Composite Bundle


© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Composites are composed of
          bundles that publish and bind to
                     services




© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Publish and Consume Services

                                                                Publish

                                                                                  org.foo.c.CService   C

                                                      org.foo.b.BService
                          A

                                                                          B




                                                Composite Bundle


© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Publish and Consume Services

                                                                  Bind

                                                                                  org.foo.c.CService   C

                                                      org.foo.b.BService
                          A

                                                                          B




                                                Composite Bundle


© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
This looks very similar to a
                            Framework!




© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Implementing Composites


                                                                                             A3



                                                                                        A2


                                                                              A1

                                                                                   Can this blob be a
                                                                                        nested
                                                         Framework                   framework?
© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Implementing Composites
        How are
     imports, exports
       and services
        handled?                                                                       A3



                                                                                       A2



                                                                                  A1

                                                             Nested Framework
                                                         Framework
© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Defining a Sharing Policy




© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Implementing Composites
       To the outside
      this looks like a
       normal bundle                                                                       A3



                                                                                           A2

    C

                                                                                  A1

                                                                                  Bundle
                                                         Framework
© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Implementing Composites
  A representation is
 needed inside for the
   exports, imports                                                                    A3
     and services



                                                                                       A2

    C

                                                                                  A1

                                                             Nested Framework
                                                         Framework
© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Implementing Composites

  A surrogate bundle can
provide this representation                                                                A3




                                                                   Surrogate Bundle
                                                                                           A2

     C

                                                                                      A1

                                                                 Composite
                                                          Framework
 © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Implementing Composites

 The surrogate imports
  packages exported
   by the composite
                                                                                          A3




                                                                  Surrogate Bundle
                                                                                          A2

    C

                                                                                     A1

                                                                Composite
                                                         Framework
© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Implementing Composites

                                                                                          A3
The surrogate exports
 packages imported




                                                                  Surrogate Bundle
  by the composite
                                                                                          A2

    C

                                                                                     A1

                                                                Composite
                                                         Framework
© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Implementing Composites

                                                                                          A3

    The surrogate consumes



                                                                  Surrogate Bundle
   services published outside
        by the composite                                                                  A2

    C

                                                                                     A1

                                                                Composite
                                                         Framework
© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Implementing Composites

                                                                                          A3




                                                                  Surrogate Bundle
      The surrogate
    registers services                                                                    A2
    consumed by the
     composite from
    C
        the outside
                                                                                     A1

                                                                Composite
                                                         Framework
© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Implementing Composites
   ●    Issues with modeling composites as real
        bundles with nested frameworks




© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Implementing Composites
   ●    Issues with modeling composites as real
        bundles with nested frameworks
          ●    Sharing everything through a surrogate creates
               lifecycle issues




© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Implementing Composites

                                                                                          A3

      What happens if



                                                                  Surrogate Bundle
      the composite is
        stopped – the                                                                     A2
          composite
        framework is
    C
          shutdown
                                                                                     A1

                                                                Composite
                                                         Framework
© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Implementing Composites

                                                                                          A3

      What happens if



                                                                  Surrogate Bundle
      the composite is
        stopped – the                                                                     A2
          composite
        framework is
    C
          shutdown
                                                                                     A1

                                                                Composite
                                                         Framework
© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Implementing Composites


                                                                                         But C is still   A3
                                                                                        resolved and
                                                                                       expecting to be
                                                                                         able to load



                                                                  Surrogate Bundle
                                                                                      classes from the
                                                                                     exported package     A2

    C

                                                                                                A1

                                                                Composite
                                                         Framework
© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Implementing Composites
   ●    Issues with modeling composites as real
        bundles with nested frameworks
          ●    Sharing everything through a surrogate creates
               lifecycle issues




© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Implementing Composites
   ●    Issues with modeling composites as real
        bundles with nested frameworks
          ●    Sharing everything through a surrogate creates
               lifecycle issues
          ●    Consumers and Providers loose their identity to the
               composite and surrogate
                 –   No support for Require-Bundle
                 –   ServiceFactory support is limited
                 –   Introspecting system dependencies is combersome.




© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Implementing Composites
       Composite and
       Surrogate must
       proxy all shared                                                                   A3
          resources




                                                                  Surrogate Bundle
                                                                                          A2

    C

                                                                                     A1

                                                                Composite
                                                         Framework
© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Implementing Composites
       Difficulties with
      proxying service
     factories. No way
        to guarantee                                                                      A3
      unique locations
       or bundle IDs




                                                                  Surrogate Bundle
                                                                                          A2

    C

                                                                                     A1

                                                                Composite
                                                         Framework
© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Implementing Composites

                                                                                                            A3




                                                                  Surrogate Bundle
                                                                                                            A2

    C
                                                                                       Exports loose the
                                                                                        identity of their
                                                                                                A1
                                                                                      exporting symbolic
                                                                                       name. Require-
                                                                                     Composite not
                                                                                         Bundle is
                                                                                           possible
                                                         Framework
© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Transparent Sharing Policy




© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Virtualizing Framework Isolation
   ●    Model isolation in a single framework instance




© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Virtualizing Framework Isolation
   ●    Model isolation in a single framework instance
          ●    Each composite has a virtual framework that hides
               outside bundles, services, and packages.




© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Virtualizing Framework Isolation
   ●    Model isolation in a single framework instance
          ●    Each composite has a virtual framework that hides
               outside bundles, services, and packages.
          ●    A sharing policy can be declared
                 –   What is visible to the inside from the outside (imported)
                 –   What is visible to the outside from the inside (exported)




© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Implementing Composites
      A Sharing Policy
         controls the
     visibility of shared                                                              A3
          resources



                                                                                       A2

    C

                                                                                  A1

                                                                Composite
                                                         Framework
© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Implementing Composites
        What is visible
       from the point of
       view of a bundle                                                                A3
        in a composite



                                                                                       A2

    C

                                                                                  A1

                                                                Composite
                                                         Framework
© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Implementing Composites

       What is visible
      from the point of                                                                A3
      view of a bundle
        in the parent


                                                                                       A2

    C

                                                                                  A1

                                                                Composite
                                                         Framework
© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Virtualizing Framework Isolation
   ●    Model isolation in a single framework instance
          ●    Each composite has a virtual framework that hides
               outside bundles, services, and packages.
          ●    A sharing policy can be declared
                 –   What is visible to the inside from the outside (imported)
                 –   What is visible to the outside from the inside (exported)




© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Virtualizing Framework Isolation
   ●    Model isolation in a single framework instance
          ●    Each composite has a virtual framework that hides
               outside bundles, services, and packages.
          ●    A sharing policy can be declared
                 –   What is visible to the inside from the outside (imported)
                 –   What is visible to the outside from the inside (exported)
   ●    Enforce rules to ensure unique bundle
        identification
          ●    All bundle locations and bundle IDs must be unique
          ●    Important for supporting shared service factories

© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Installing a Composite


                                                                        Configure?




© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Installing a Composite


                                                                        Configure?




                                                                           Create?




© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Installing a Composite


                                                                        Configure?




                                      Reference?                           Create?




© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Configure

          String location = “myComposite; composite=true”;
          Map config = HashMap();
          config.put(“...startlevel.beginning”, “25”);

          Map manifest = HashMap();
          manifest.put(“Bundle-SymbolicName”, location);
          manifest.put(“Composite-PackageExportPolicy”, “b”);
          manifest.put(“Composite-PackageImportPolicy”, “c”);
          manifest.put(“Composite-ServiceImportPolicy”,
                   “(objectClass=c.CService)”);
          manifest.put(“Composite-ServiceExportPolicy”,
                   “(objectClass=b.BService)”);
          ...




© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Configure

          String location = “myComposite; composite=true”;
          Map config = HashMap();
          config.put(“...startlevel.beginning”, “25”);

          Map manifest = HashMap();
          manifest.put(“Bundle-SymbolicName”, location);
          manifest.put(“Composite-PackageExportPolicy”, “b”);
          manifest.put(“Composite-PackageImportPolicy”, “c”);
          manifest.put(“Composite-ServiceImportPolicy”,
                                             Framework launching configuration
                   “(objectClass=c.CService)”);
          manifest.put(“Composite-ServiceExportPolicy”,
                   “(objectClass=b.BService)”);
          ...




© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Configure

          String location = “myComposite; composite=true”;
          Map config = HashMap();
                                           Specify the package export policy
          config.put(“...startlevel.beginning”, “25”);

          Map manifest = HashMap();
          manifest.put(“Bundle-SymbolicName”, location);
          manifest.put(“Composite-PackageExportPolicy”, “b”);
          manifest.put(“Composite-PackageImportPolicy”, “c”);
          manifest.put(“Composite-ServiceImportPolicy”,
                   “(objectClass=c.CService)”);
          manifest.put(“Composite-ServiceExportPolicy”,
                   “(objectClass=b.BService)”);
          ...




© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Configure

          String location = “myComposite; composite=true”;
          Map config = HashMap();
          config.put(“...startlevel.beginning”, “25”);
                                                Specify the package import policy
          Map manifest = HashMap();
          manifest.put(“Bundle-SymbolicName”, location);
          manifest.put(“Composite-PackageExportPolicy”, “b”);
          manifest.put(“Composite-PackageImportPolicy”, “c”);
          manifest.put(“Composite-ServiceImportPolicy”,
                   “(objectClass=c.CService)”);
          manifest.put(“Composite-ServiceExportPolicy”,
                   “(objectClass=b.BService)”);
          ...




© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Configure

          String location = “myComposite; composite=true”;
          Map config = HashMap();
          config.put(“...startlevel.beginning”, “25”);

          Map manifest = HashMap();
          manifest.put(“Bundle-SymbolicName”, location); service import policy
                                                 Specify the
          manifest.put(“Composite-PackageExportPolicy”, “b”);
          manifest.put(“Composite-PackageImportPolicy”, “c”);
          manifest.put(“Composite-ServiceImportPolicy”,
                   “(objectClass=c.CService)”);
          manifest.put(“Composite-ServiceExportPolicy”,
                   “(objectClass=b.BService)”);
          ...




© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Configure

          String location = “myComposite; composite=true”;
          Map config = HashMap();
          config.put(“...startlevel.beginning”, “25”);

          Map manifest = HashMap();
          manifest.put(“Bundle-SymbolicName”, location);
          manifest.put(“Composite-PackageExportPolicy”, “b”);
          manifest.put(“Composite-PackageImportPolicy”, service filters to publish
                                                 Specify “c”);
          manifest.put(“Composite-ServiceImportPolicy”,
                   “(objectClass=c.CService)”);
          manifest.put(“Composite-ServiceExportPolicy”,
                   “(objectClass=b.BService)”);
          ...




© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Installing a Composite

                                                        String location = “myComposite”;
                                                        Map config = HashMap();
                                                        Map manifest = HashMap();
                                                        ...




                                      Reference?                           Create?




© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Installing a Composite

                                                        String location = “myComposite”;
                                                        Map config = HashMap();
                                                        Map manifest = HashMap();
                                                        ...

                                                                                        Obtained from the
                                                                                         service registry.

                                      Reference?                       CompositeAdmin.
                                                                         installCompositeBundle(
                                                                                        location,
                                                                                        manifest,
                                                                                        config);




© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Installing a Composite

                                                        String location = “myComposite”;
                                                        Map config = HashMap();
                                                        Map manifest = HashMap();
                                                        ...
              CompositeBundle
               extends Bundle


                CompositeBundle comp                                   CompositeAdmin.
                                                                         installCompositeBundle(
                                                                                        location,
                                                                                        manifest,
                                                                                        config);




© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Empty Installed Composite


Sharing Policy




                                                  Composite Bundle: myComposite
                                                         Framework
© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Managing a Composite


                                         Access?




© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Managing a Composite


                                         Access?                                  Install?




© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Managing a Composite


                                         Access?                                  Install?




                                                                                  Start?




© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Managing a Composite


BundleContext ctxt =
 comp.getSystemBundleContext();                                                   Install?
...




                                                                                  Start?




© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Managing a Composite
                                                                           Bundle a =
                                                                             ctxt.installBundle(
                                                                               “file:a.jar”);
BundleContext ctxt =                                                       Bundle b =
 comp.getSystemBundleContext();                                              ctxt.installBundle(
...                                                                            “file:b.jar”);
                                                                           ...




                                                                                  Start?




© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Managing a Composite
                                                                           Bundle a =
                                                                             ctxt.installBundle(
                                                                               “file:a.jar”);
BundleContext ctxt =                                                       Bundle b =
 comp.getSystemBundleContext();                                              ctxt.installBundle(
...                                                                            “file:b.jar”);
                                                                           ...



                                                                     a.start();
                                                                     b.start();
                                                                     comp.start();
                                                                     ...




© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Resolved Composite

    Sharing Policy



                Import
                  b
                                                                                      export
                                                                                        b      B
    C


                export                                                  Import    A
                  c                                                       c




                                                  Composite Bundle: myComposite
                                                         Framework
© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Active Composite

    Sharing Policy



                                                                                      b.BService


                                                                                               B
    C

                                                                                  A

          c.CService


                                                  Composite Bundle: myComposite
                                                         Framework
© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Demo




© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Isolating SWT and e4 applications

                                              e4                               e4           App
                                             Photo                           Contacts      Console
                                             Demo                             Demo         Web UI


                                                                                     Each Composite
                                                                                    contains their own
                                                                                     stack of bundles
                                                                                    which are isolated
                                                                                     from each other
                                                                   SWT

                                                  Root Framework
© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Isolating SWT and e4 applications

                                              e4                               e4            App
                                             Photo                           Contacts       Console
                                             Demo                             Demo          Web UI


                                                                                    SWT is installed in
                                                                                         the root
                                                                                     framework and
                                                                                     shared with the
                                                                                    composites which
                                                                                       require SWT
                                                                   SWT

                                                  Root Framework
© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Isolating SWT and e4 applications

                                              e4                               e4        App
                                             Photo                           Contacts   Console
                                             Demo                             Demo      Web UI



            Application
          Descriptor and
          Handle services
          are shared with
            the Web UI
                                                                   SWT

                                                  Root Framework
© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Benefits of Composites
   ●    Composite Bundles are persistent
          –    Content of composite is reified when the parent framework
               restarts
          –    Like a normal bundle, the active state is persisted




© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Benefits of Composites
   ●    Composite Bundles are persistent
          –    Content of composite is reified when the parent framework
               restarts
          –    Like a normal bundle, the active state is persisted
   ●    Bundles can be grouped together into one executable unit
          –    Stopping a composite stops all constituent bundles
          –    Starting a composite starts the constituent bundles (which
               are marked for start)




© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Benefits of Composites
   ●    Composite Bundles are persistent
          –    Content of composite is reified when the parent framework
               restarts
          –    Like a normal bundle, the active state is persisted
   ●    Bundles can be grouped together into one executable unit
          –    Stopping a composite stops all constituent bundles
          –    Starting a composite starts the constituent bundles (which
               are marked for start)
   ●    High level of isolation
          –    Strict control over what is imported to and exported from the
               composite.
          –    Sharing is fine grained and transparent
© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Difficulties with Composites
   ●    Low-level API for installing content into
        composites
          –    Equivalent to managing a complete framework




© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Difficulties with Composites
   ●    Low-level API for installing content into
        composites
          –    Equivalent to managing a complete framework
   ●    Limitations for sharing resources
          –    Extenders do not understand composites (DS, Spring,
               Blueprint, Extension Registry, iPOJO)




© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Difficulties with Composites
   ●    Low-level API for installing content into
        composites
          –    Equivalent to managing a complete framework
   ●    Limitations for sharing resources
          –    Extenders do not understand composites (DS, Spring,
               Blueprint, Extension Registry, iPOJO)
          –    Transparent sharing policy
                  ●   Simplifies most things




© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Difficulties with Composites
   ●    Low-level API for installing content into
        composites
          –    Equivalent to managing a complete framework
   ●    Limitations for sharing resources
          –    Extenders do not understand composites (DS, Spring,
               Blueprint, Extension Registry, iPOJO)
          –    Transparent sharing policy
                  ● Simplifies most things
                  ● But violates academic notion of a composite




© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Conclusion
   ●    OSGi R4.3 is shaping up to be a big release
          –    Still early, but some interesting things are far along
          –    OSGi API Updates
          –    Composite Bundles
   ●    Composite Bundles
          –    A powerful way to establish application isolation
          –    Provides a basis for defining subsystems




© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
Legal Notices
   ●    Java and all Java-based trademarks are
        trademarks of Sun Microsystems, Inc. in the
        United States, other countries, or both
   ●    Other company, product, or service names may be
        trademarks or service marks of others




© 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license

Más contenido relacionado

Similar a EclipseCon 2010 OSGi Composite Bundles

Porting a new architecture (NDS32) to open wrt project
Porting a new architecture (NDS32) to open wrt projectPorting a new architecture (NDS32) to open wrt project
Porting a new architecture (NDS32) to open wrt projectMacpaul Lin
 
Whats Next for OSGi? - BJ Hargrave
Whats Next for OSGi? - BJ HargraveWhats Next for OSGi? - BJ Hargrave
Whats Next for OSGi? - BJ Hargravemfrancis
 
Camera Architecture from Failure to Success
Camera Architecture from Failure to SuccessCamera Architecture from Failure to Success
Camera Architecture from Failure to SuccessRyo Jin
 
.NET and Kubernetes: Bringing Legacy .NET Into the Modern World with Pivotal ...
.NET and Kubernetes: Bringing Legacy .NET Into the Modern World with Pivotal ....NET and Kubernetes: Bringing Legacy .NET Into the Modern World with Pivotal ...
.NET and Kubernetes: Bringing Legacy .NET Into the Modern World with Pivotal ...VMware Tanzu
 
IBM Rational Rhapsody and Qt Integration
IBM Rational Rhapsody and Qt IntegrationIBM Rational Rhapsody and Qt Integration
IBM Rational Rhapsody and Qt Integrationgjuljo
 
The NRB Group mainframe day 2021 - IBM Z-Strategy & Roadmap - Adam John Sturg...
The NRB Group mainframe day 2021 - IBM Z-Strategy & Roadmap - Adam John Sturg...The NRB Group mainframe day 2021 - IBM Z-Strategy & Roadmap - Adam John Sturg...
The NRB Group mainframe day 2021 - IBM Z-Strategy & Roadmap - Adam John Sturg...NRB
 
z/OS V2.4 Preview: z/OS Container Extensions - Running Linux on Z docker cont...
z/OS V2.4 Preview: z/OS Container Extensions - Running Linux on Z docker cont...z/OS V2.4 Preview: z/OS Container Extensions - Running Linux on Z docker cont...
z/OS V2.4 Preview: z/OS Container Extensions - Running Linux on Z docker cont...zOSCommserver
 
EclipseCon Europe 2012 - Big Models
EclipseCon Europe 2012 - Big ModelsEclipseCon Europe 2012 - Big Models
EclipseCon Europe 2012 - Big ModelsChristof Hammel
 
X plat dev - part ii publish
X plat dev - part ii publishX plat dev - part ii publish
X plat dev - part ii publishTekObserver
 
Networking Concepts and Tools for the Cloud
Networking Concepts and Tools for the CloudNetworking Concepts and Tools for the Cloud
Networking Concepts and Tools for the CloudAlex Amies
 
Koen vosters improving-yoursp_solutiondesign-spsbe13
Koen vosters improving-yoursp_solutiondesign-spsbe13Koen vosters improving-yoursp_solutiondesign-spsbe13
Koen vosters improving-yoursp_solutiondesign-spsbe13BIWUG
 
We4IT LCTY 2013 - Infra-Man - Deep Dive into IBM Sametime - Advanced Video Te...
We4IT LCTY 2013 - Infra-Man - Deep Dive into IBM Sametime - Advanced Video Te...We4IT LCTY 2013 - Infra-Man - Deep Dive into IBM Sametime - Advanced Video Te...
We4IT LCTY 2013 - Infra-Man - Deep Dive into IBM Sametime - Advanced Video Te...We4IT Group
 
Session dédiée à l'analyse de la qualité du code Java - Cyril Picat - Februar...
Session dédiée à l'analyse de la qualité du code Java - Cyril Picat - Februar...Session dédiée à l'analyse de la qualité du code Java - Cyril Picat - Februar...
Session dédiée à l'analyse de la qualité du code Java - Cyril Picat - Februar...JUG Lausanne
 
NTT Docomo's Challenge looking ahead the world pf 5G × OpenStack - OpenStack最...
NTT Docomo's Challenge looking ahead the world pf 5G × OpenStack - OpenStack最...NTT Docomo's Challenge looking ahead the world pf 5G × OpenStack - OpenStack最...
NTT Docomo's Challenge looking ahead the world pf 5G × OpenStack - OpenStack最...VirtualTech Japan Inc.
 

Similar a EclipseCon 2010 OSGi Composite Bundles (20)

Porting a new architecture (NDS32) to open wrt project
Porting a new architecture (NDS32) to open wrt projectPorting a new architecture (NDS32) to open wrt project
Porting a new architecture (NDS32) to open wrt project
 
Android Development Tutorial V3
Android Development Tutorial   V3Android Development Tutorial   V3
Android Development Tutorial V3
 
Android Internals
Android InternalsAndroid Internals
Android Internals
 
Introduction of c# day1
Introduction of c# day1Introduction of c# day1
Introduction of c# day1
 
Sa*ple
Sa*pleSa*ple
Sa*ple
 
Whats Next for OSGi? - BJ Hargrave
Whats Next for OSGi? - BJ HargraveWhats Next for OSGi? - BJ Hargrave
Whats Next for OSGi? - BJ Hargrave
 
Camera Architecture from Failure to Success
Camera Architecture from Failure to SuccessCamera Architecture from Failure to Success
Camera Architecture from Failure to Success
 
.NET and Kubernetes: Bringing Legacy .NET Into the Modern World with Pivotal ...
.NET and Kubernetes: Bringing Legacy .NET Into the Modern World with Pivotal ....NET and Kubernetes: Bringing Legacy .NET Into the Modern World with Pivotal ...
.NET and Kubernetes: Bringing Legacy .NET Into the Modern World with Pivotal ...
 
IBM Rational Rhapsody and Qt Integration
IBM Rational Rhapsody and Qt IntegrationIBM Rational Rhapsody and Qt Integration
IBM Rational Rhapsody and Qt Integration
 
The NRB Group mainframe day 2021 - IBM Z-Strategy & Roadmap - Adam John Sturg...
The NRB Group mainframe day 2021 - IBM Z-Strategy & Roadmap - Adam John Sturg...The NRB Group mainframe day 2021 - IBM Z-Strategy & Roadmap - Adam John Sturg...
The NRB Group mainframe day 2021 - IBM Z-Strategy & Roadmap - Adam John Sturg...
 
z/OS V2.4 Preview: z/OS Container Extensions - Running Linux on Z docker cont...
z/OS V2.4 Preview: z/OS Container Extensions - Running Linux on Z docker cont...z/OS V2.4 Preview: z/OS Container Extensions - Running Linux on Z docker cont...
z/OS V2.4 Preview: z/OS Container Extensions - Running Linux on Z docker cont...
 
ISC HPCW talks
ISC HPCW talksISC HPCW talks
ISC HPCW talks
 
EclipseCon Europe 2012 - Big Models
EclipseCon Europe 2012 - Big ModelsEclipseCon Europe 2012 - Big Models
EclipseCon Europe 2012 - Big Models
 
X plat dev - part ii publish
X plat dev - part ii publishX plat dev - part ii publish
X plat dev - part ii publish
 
Networking Concepts and Tools for the Cloud
Networking Concepts and Tools for the CloudNetworking Concepts and Tools for the Cloud
Networking Concepts and Tools for the Cloud
 
Koen vosters improving-yoursp_solutiondesign-spsbe13
Koen vosters improving-yoursp_solutiondesign-spsbe13Koen vosters improving-yoursp_solutiondesign-spsbe13
Koen vosters improving-yoursp_solutiondesign-spsbe13
 
We4IT LCTY 2013 - Infra-Man - Deep Dive into IBM Sametime - Advanced Video Te...
We4IT LCTY 2013 - Infra-Man - Deep Dive into IBM Sametime - Advanced Video Te...We4IT LCTY 2013 - Infra-Man - Deep Dive into IBM Sametime - Advanced Video Te...
We4IT LCTY 2013 - Infra-Man - Deep Dive into IBM Sametime - Advanced Video Te...
 
Session dédiée à l'analyse de la qualité du code Java - Cyril Picat - Februar...
Session dédiée à l'analyse de la qualité du code Java - Cyril Picat - Februar...Session dédiée à l'analyse de la qualité du code Java - Cyril Picat - Februar...
Session dédiée à l'analyse de la qualité du code Java - Cyril Picat - Februar...
 
Networking with Linux on System z
Networking with Linux on System zNetworking with Linux on System z
Networking with Linux on System z
 
NTT Docomo's Challenge looking ahead the world pf 5G × OpenStack - OpenStack最...
NTT Docomo's Challenge looking ahead the world pf 5G × OpenStack - OpenStack最...NTT Docomo's Challenge looking ahead the world pf 5G × OpenStack - OpenStack最...
NTT Docomo's Challenge looking ahead the world pf 5G × OpenStack - OpenStack最...
 

Último

Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 

Último (20)

Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 

EclipseCon 2010 OSGi Composite Bundles

  • 1. EclipseCon 2010 Isolating Applications in a Collaborative OSGi World Composite Bundles Thomas Watson © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 2. Warning! Not for the faint of heart! Lots of details. No fancy slides. (What would you expect from a framework implementer?) © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 3. OSGi R4.2 Review ● New Enterprise Specifications – Remote Services – Blueprint ● And more on the way ... – Remote Services Admin – JTA, JMX, JDBC, JNDI, JPA – Web Applications – etc. © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 4. Forget the High-Level Stuff! ● R4.2 Core framework changes – Service registry hooks – Security enhancements ● Ordered conditions ● Fine-grained service and package permissions based on identity of the provider – Bundle tracker – Standard launching and embedding – Composite bundles (provisional spec.) © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 5. What can we expect from R4.3 Core? ● Still early in the process ● Early access to draft RFCs ● OSGi API update (RFC 151) – Use of generics and adaptor patterns ● Composite Bundles (RFC 138) – Much has changed since the R4.2 provisional spec. ● Generic capabilities and requirements (RFC 154) © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 6. What can we expect from R4.3 Core? ● Still early in the process ● Early access to draft RFCs ● OSGi API update (RFC 151) – Use of generics and adaptor patterns ● Composite Bundles (RFC 138) – Much has changed since the R4.2 provisional spec. ● Generic capabilities and requirements (RFC 154) © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 7. Standard Launching & Embedding © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 8. Framework Implementations ● Bundles are portable ● What about the framework? – Launching and configuring – Controlling its life cycle – Externally interacting with bundles, services, and state © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 9. Standard Launching & Embedding ● Seems like a slam dunk ● What does it give us? – A standard way to create framework instances – A standard API for controlling and interacting with framework instances ● What does this help? © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 10. Standard Launching & Embedding ● Seems like a slam dunk ● What does it give us? – A standard way to create framework instances – A standard API for controlling and interacting with framework instances ● What does this help? – Portable scripts and launchers © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 11. Standard Interfaces public interface FrameworkFactory { Framework newFramework(Map config); } © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 12. Standard Interfaces public interface FrameworkFactory { Framework newFramework(Map config); } public interface Framework extends Bundle { void init() throws BundleException; FrameworkEvent waitForStop(long timeout) throws InterruptedException; } © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 13. Standard Configuration Properties ● org.osgi.framework.bootdelegation ● org.osgi.framework.system.packages ● org.osgi.framework.system.packages.extra ● org.osgi.framework.startlevel.beginning ● org.osgi.framework.storage ● org.osgi.framework.storage.clean ● And others... © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 14. Out Of Scope ● Multiple framework instances – e.g., no support for sharing/collaboration among instances or multiplexing of VM singletons – May or may not work, but implementation dependent © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 15. Multiple Instances ● Pose interesting challenges ● Promise potentially interesting capabilities ● This use case uncovers potential framework issues © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 16. Composite Bundles © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 17. Framework Limitations ● Applications are either all bundles collaborating or an individual bundle ● All global or completely local ● No application/subsystem concept ● Isolation/protection (bundles, services, packages) ● Visibility (bundles, services, packages) ● Grouping (lifecycle) © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 18. Framework Limitations Where is the Framework application? © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 19. Framework Limitations A3 A2 A1 Assume these belong to an Framework application © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 20. Framework Limitations A3 A2 A1 What if they are Framework subsystems? © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 21. Framework Limitations A3 A2 A1 Maybe they want private Framework packages © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 22. Framework Limitations A3 A2 A1 And private Framework services © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 23. Framework Limitations A3 A2 A1 Need subsystem Framework encapsulation © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 24. Framework Limitations A3 A2 A1 Private details Framework are hidden © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 25. Framework Limitations A3 A2 A1 Public packages Framework are exposed © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 26. Framework Limitations A3 A2 A1 External packages Framework are imported © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 27. Framework Limitations A3 A2 A1 Public services Framework are exposed © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 28. Framework Limitations A3 A2 A1 This blob is a composite Framework bundle © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 29. Implementing Composites © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 30. Composites are composed of bundles with resolved states © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 31. Importing and Exporting Packages Export export org.foo.c C A B export org.foo.b Composite Bundle © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 32. Importing and Exporting Packages Import export org.foo.c C A B import org.foo.b export import org.foo.b org.foo.c Composite Bundle © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 33. Importing and Exporting Packages Resolve export org.foo.c C A B import org.foo.b export import org.foo.b org.foo.c Composite Bundle © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 34. Composites are composed of bundles that publish and bind to services © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 35. Publish and Consume Services Publish org.foo.c.CService C org.foo.b.BService A B Composite Bundle © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 36. Publish and Consume Services Bind org.foo.c.CService C org.foo.b.BService A B Composite Bundle © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 37. This looks very similar to a Framework! © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 38. Implementing Composites A3 A2 A1 Can this blob be a nested Framework framework? © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 39. Implementing Composites How are imports, exports and services handled? A3 A2 A1 Nested Framework Framework © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 40. Defining a Sharing Policy © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 41. Implementing Composites To the outside this looks like a normal bundle A3 A2 C A1 Bundle Framework © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 42. Implementing Composites A representation is needed inside for the exports, imports A3 and services A2 C A1 Nested Framework Framework © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 43. Implementing Composites A surrogate bundle can provide this representation A3 Surrogate Bundle A2 C A1 Composite Framework © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 44. Implementing Composites The surrogate imports packages exported by the composite A3 Surrogate Bundle A2 C A1 Composite Framework © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 45. Implementing Composites A3 The surrogate exports packages imported Surrogate Bundle by the composite A2 C A1 Composite Framework © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 46. Implementing Composites A3 The surrogate consumes Surrogate Bundle services published outside by the composite A2 C A1 Composite Framework © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 47. Implementing Composites A3 Surrogate Bundle The surrogate registers services A2 consumed by the composite from C the outside A1 Composite Framework © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 48. Implementing Composites ● Issues with modeling composites as real bundles with nested frameworks © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 49. Implementing Composites ● Issues with modeling composites as real bundles with nested frameworks ● Sharing everything through a surrogate creates lifecycle issues © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 50. Implementing Composites A3 What happens if Surrogate Bundle the composite is stopped – the A2 composite framework is C shutdown A1 Composite Framework © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 51. Implementing Composites A3 What happens if Surrogate Bundle the composite is stopped – the A2 composite framework is C shutdown A1 Composite Framework © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 52. Implementing Composites But C is still A3 resolved and expecting to be able to load Surrogate Bundle classes from the exported package A2 C A1 Composite Framework © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 53. Implementing Composites ● Issues with modeling composites as real bundles with nested frameworks ● Sharing everything through a surrogate creates lifecycle issues © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 54. Implementing Composites ● Issues with modeling composites as real bundles with nested frameworks ● Sharing everything through a surrogate creates lifecycle issues ● Consumers and Providers loose their identity to the composite and surrogate – No support for Require-Bundle – ServiceFactory support is limited – Introspecting system dependencies is combersome. © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 55. Implementing Composites Composite and Surrogate must proxy all shared A3 resources Surrogate Bundle A2 C A1 Composite Framework © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 56. Implementing Composites Difficulties with proxying service factories. No way to guarantee A3 unique locations or bundle IDs Surrogate Bundle A2 C A1 Composite Framework © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 57. Implementing Composites A3 Surrogate Bundle A2 C Exports loose the identity of their A1 exporting symbolic name. Require- Composite not Bundle is possible Framework © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 58. Transparent Sharing Policy © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 59. Virtualizing Framework Isolation ● Model isolation in a single framework instance © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 60. Virtualizing Framework Isolation ● Model isolation in a single framework instance ● Each composite has a virtual framework that hides outside bundles, services, and packages. © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 61. Virtualizing Framework Isolation ● Model isolation in a single framework instance ● Each composite has a virtual framework that hides outside bundles, services, and packages. ● A sharing policy can be declared – What is visible to the inside from the outside (imported) – What is visible to the outside from the inside (exported) © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 62. Implementing Composites A Sharing Policy controls the visibility of shared A3 resources A2 C A1 Composite Framework © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 63. Implementing Composites What is visible from the point of view of a bundle A3 in a composite A2 C A1 Composite Framework © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 64. Implementing Composites What is visible from the point of A3 view of a bundle in the parent A2 C A1 Composite Framework © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 65. Virtualizing Framework Isolation ● Model isolation in a single framework instance ● Each composite has a virtual framework that hides outside bundles, services, and packages. ● A sharing policy can be declared – What is visible to the inside from the outside (imported) – What is visible to the outside from the inside (exported) © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 66. Virtualizing Framework Isolation ● Model isolation in a single framework instance ● Each composite has a virtual framework that hides outside bundles, services, and packages. ● A sharing policy can be declared – What is visible to the inside from the outside (imported) – What is visible to the outside from the inside (exported) ● Enforce rules to ensure unique bundle identification ● All bundle locations and bundle IDs must be unique ● Important for supporting shared service factories © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 67. Installing a Composite Configure? © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 68. Installing a Composite Configure? Create? © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 69. Installing a Composite Configure? Reference? Create? © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 70. Configure String location = “myComposite; composite=true”; Map config = HashMap(); config.put(“...startlevel.beginning”, “25”); Map manifest = HashMap(); manifest.put(“Bundle-SymbolicName”, location); manifest.put(“Composite-PackageExportPolicy”, “b”); manifest.put(“Composite-PackageImportPolicy”, “c”); manifest.put(“Composite-ServiceImportPolicy”, “(objectClass=c.CService)”); manifest.put(“Composite-ServiceExportPolicy”, “(objectClass=b.BService)”); ... © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 71. Configure String location = “myComposite; composite=true”; Map config = HashMap(); config.put(“...startlevel.beginning”, “25”); Map manifest = HashMap(); manifest.put(“Bundle-SymbolicName”, location); manifest.put(“Composite-PackageExportPolicy”, “b”); manifest.put(“Composite-PackageImportPolicy”, “c”); manifest.put(“Composite-ServiceImportPolicy”, Framework launching configuration “(objectClass=c.CService)”); manifest.put(“Composite-ServiceExportPolicy”, “(objectClass=b.BService)”); ... © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 72. Configure String location = “myComposite; composite=true”; Map config = HashMap(); Specify the package export policy config.put(“...startlevel.beginning”, “25”); Map manifest = HashMap(); manifest.put(“Bundle-SymbolicName”, location); manifest.put(“Composite-PackageExportPolicy”, “b”); manifest.put(“Composite-PackageImportPolicy”, “c”); manifest.put(“Composite-ServiceImportPolicy”, “(objectClass=c.CService)”); manifest.put(“Composite-ServiceExportPolicy”, “(objectClass=b.BService)”); ... © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 73. Configure String location = “myComposite; composite=true”; Map config = HashMap(); config.put(“...startlevel.beginning”, “25”); Specify the package import policy Map manifest = HashMap(); manifest.put(“Bundle-SymbolicName”, location); manifest.put(“Composite-PackageExportPolicy”, “b”); manifest.put(“Composite-PackageImportPolicy”, “c”); manifest.put(“Composite-ServiceImportPolicy”, “(objectClass=c.CService)”); manifest.put(“Composite-ServiceExportPolicy”, “(objectClass=b.BService)”); ... © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 74. Configure String location = “myComposite; composite=true”; Map config = HashMap(); config.put(“...startlevel.beginning”, “25”); Map manifest = HashMap(); manifest.put(“Bundle-SymbolicName”, location); service import policy Specify the manifest.put(“Composite-PackageExportPolicy”, “b”); manifest.put(“Composite-PackageImportPolicy”, “c”); manifest.put(“Composite-ServiceImportPolicy”, “(objectClass=c.CService)”); manifest.put(“Composite-ServiceExportPolicy”, “(objectClass=b.BService)”); ... © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 75. Configure String location = “myComposite; composite=true”; Map config = HashMap(); config.put(“...startlevel.beginning”, “25”); Map manifest = HashMap(); manifest.put(“Bundle-SymbolicName”, location); manifest.put(“Composite-PackageExportPolicy”, “b”); manifest.put(“Composite-PackageImportPolicy”, service filters to publish Specify “c”); manifest.put(“Composite-ServiceImportPolicy”, “(objectClass=c.CService)”); manifest.put(“Composite-ServiceExportPolicy”, “(objectClass=b.BService)”); ... © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 76. Installing a Composite String location = “myComposite”; Map config = HashMap(); Map manifest = HashMap(); ... Reference? Create? © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 77. Installing a Composite String location = “myComposite”; Map config = HashMap(); Map manifest = HashMap(); ... Obtained from the service registry. Reference? CompositeAdmin. installCompositeBundle( location, manifest, config); © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 78. Installing a Composite String location = “myComposite”; Map config = HashMap(); Map manifest = HashMap(); ... CompositeBundle extends Bundle CompositeBundle comp CompositeAdmin. installCompositeBundle( location, manifest, config); © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 79. Empty Installed Composite Sharing Policy Composite Bundle: myComposite Framework © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 80. Managing a Composite Access? © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 81. Managing a Composite Access? Install? © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 82. Managing a Composite Access? Install? Start? © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 83. Managing a Composite BundleContext ctxt = comp.getSystemBundleContext(); Install? ... Start? © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 84. Managing a Composite Bundle a = ctxt.installBundle( “file:a.jar”); BundleContext ctxt = Bundle b = comp.getSystemBundleContext(); ctxt.installBundle( ... “file:b.jar”); ... Start? © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 85. Managing a Composite Bundle a = ctxt.installBundle( “file:a.jar”); BundleContext ctxt = Bundle b = comp.getSystemBundleContext(); ctxt.installBundle( ... “file:b.jar”); ... a.start(); b.start(); comp.start(); ... © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 86. Resolved Composite Sharing Policy Import b export b B C export Import A c c Composite Bundle: myComposite Framework © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 87. Active Composite Sharing Policy b.BService B C A c.CService Composite Bundle: myComposite Framework © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 88. Demo © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 89. Isolating SWT and e4 applications e4 e4 App Photo Contacts Console Demo Demo Web UI Each Composite contains their own stack of bundles which are isolated from each other SWT Root Framework © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 90. Isolating SWT and e4 applications e4 e4 App Photo Contacts Console Demo Demo Web UI SWT is installed in the root framework and shared with the composites which require SWT SWT Root Framework © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 91. Isolating SWT and e4 applications e4 e4 App Photo Contacts Console Demo Demo Web UI Application Descriptor and Handle services are shared with the Web UI SWT Root Framework © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 92. Benefits of Composites ● Composite Bundles are persistent – Content of composite is reified when the parent framework restarts – Like a normal bundle, the active state is persisted © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 93. Benefits of Composites ● Composite Bundles are persistent – Content of composite is reified when the parent framework restarts – Like a normal bundle, the active state is persisted ● Bundles can be grouped together into one executable unit – Stopping a composite stops all constituent bundles – Starting a composite starts the constituent bundles (which are marked for start) © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 94. Benefits of Composites ● Composite Bundles are persistent – Content of composite is reified when the parent framework restarts – Like a normal bundle, the active state is persisted ● Bundles can be grouped together into one executable unit – Stopping a composite stops all constituent bundles – Starting a composite starts the constituent bundles (which are marked for start) ● High level of isolation – Strict control over what is imported to and exported from the composite. – Sharing is fine grained and transparent © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 95. Difficulties with Composites ● Low-level API for installing content into composites – Equivalent to managing a complete framework © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 96. Difficulties with Composites ● Low-level API for installing content into composites – Equivalent to managing a complete framework ● Limitations for sharing resources – Extenders do not understand composites (DS, Spring, Blueprint, Extension Registry, iPOJO) © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 97. Difficulties with Composites ● Low-level API for installing content into composites – Equivalent to managing a complete framework ● Limitations for sharing resources – Extenders do not understand composites (DS, Spring, Blueprint, Extension Registry, iPOJO) – Transparent sharing policy ● Simplifies most things © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 98. Difficulties with Composites ● Low-level API for installing content into composites – Equivalent to managing a complete framework ● Limitations for sharing resources – Extenders do not understand composites (DS, Spring, Blueprint, Extension Registry, iPOJO) – Transparent sharing policy ● Simplifies most things ● But violates academic notion of a composite © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 99. Conclusion ● OSGi R4.3 is shaping up to be a big release – Still early, but some interesting things are far along – OSGi API Updates – Composite Bundles ● Composite Bundles – A powerful way to establish application isolation – Provides a basis for defining subsystems © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license
  • 100. Legal Notices ● Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both ● Other company, product, or service names may be trademarks or service marks of others © 2010 by IBM Corp.; Licensed under the Creative Commons Att. Nc Nd 2.5 license