Contenu connexe
Similaire à Eclipse Con2010 Composites (20)
Eclipse Con2010 Composites
- 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
- 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
- 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
- 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
- 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