SlideShare une entreprise Scribd logo
1  sur  58
Télécharger pour lire hors ligne
New Modularity Features of
the OSGi R4 Service
Platform
Richard S. HallRichard S. Hall
Motivation
Improving Upon Success
OSGi Success as a Modularity FrameworkOSGi Success as a Modularity Framework
•• OSGi framework is increasingly used as aOSGi framework is increasingly used as a
modularity mechanism for Javamodularity mechanism for Java
–– Provides logical and physical system structuringProvides logical and physical system structuring
•• Has benefits for development and deploymentHas benefits for development and deployment
–– Provides sophisticated dynamic module lifeProvides sophisticated dynamic module life--cyclecycle
managementmanagement
•• Simplifies creation of dynamicallySimplifies creation of dynamically extensible systemsextensible systems
–– Where system components can be added, removed, or rebound at runWhere system components can be added, removed, or rebound at run
time while the system as a whole continues to functiontime while the system as a whole continues to function
•• However, modularity was not the original goal...However, modularity was not the original goal...
•• ““(Desirable) property of a system, such that(Desirable) property of a system, such that
individual components can be examined, modifiedindividual components can be examined, modified
and maintained independently of the remainder ofand maintained independently of the remainder of
the system. Objective is that changes in one part ofthe system. Objective is that changes in one part of
a system should not lead to unexpected behavior ina system should not lead to unexpected behavior in
other parts.other parts.””
(www.maths.bath.ac.uk/~jap/MATH0015/glossary.html)(www.maths.bath.ac.uk/~jap/MATH0015/glossary.html)
•• Different types of modularityDifferent types of modularity
–– LogicalLogical
•• Useful during development to decompose and/or structure theUseful during development to decompose and/or structure the
systemsystem
–– PhysicalPhysical
•• Useful after development to simplify deploymentUseful after development to simplify deployment
and maintenanceand maintenance
What is Modularity?What is Modularity?
Why Care About Modularity?Why Care About Modularity?
•• Simplifies the creation of large, complex systemsSimplifies the creation of large, complex systems
–– Improves robustnessImproves robustness
–– Eases problem diagnosisEases problem diagnosis
–– Enables splitting work among independent teamsEnables splitting work among independent teams
•• Simplifies the deployment and maintenance ofSimplifies the deployment and maintenance of
systemssystems
•• Simplifies aspects of extensible and dynamicSimplifies aspects of extensible and dynamic
systemssystems
•• Java needs improvement in this areaJava needs improvement in this area
–– Java currently lags .NET in support for modularityJava currently lags .NET in support for modularity
–– OSGi specification deals with many of theseOSGi specification deals with many of these
issues and can fill that gapissues and can fill that gap
Java & OSGi R3
Modularity Support & Limitations
Standard Java Modularity MechanismsStandard Java Modularity Mechanisms
•• ClassesClasses
–– Provide logical static scoping via access modifiers (i.e.,Provide logical static scoping via access modifiers (i.e.,
publicpublic,, protectedprotected,, privateprivate))
•• PackagesPackages
–– Provide logical static scoping viaProvide logical static scoping via package privatespackage privates
–– Namespace mechanism, avoids name clashesNamespace mechanism, avoids name clashes
•• Java Archive (JAR) filesJava Archive (JAR) files
–– Provide form of physical modularityProvide form of physical modularity
•• May contain applications, extensions, or servicesMay contain applications, extensions, or services
•• May declare dependenciesMay declare dependencies
•• May contain package version and sealing informationMay contain package version and sealing information
•• Class loadersClass loaders
–– Enable runEnable run--time code loadingtime code loading
–– Provide logical dynamic scopingProvide logical dynamic scoping
Standard Java Modularity Limitations (1)Standard Java Modularity Limitations (1)
•• Limited scoping mechanismsLimited scoping mechanisms
–– No module access modifierNo module access modifier
•• Simplistic version handlingSimplistic version handling
–– Class path is first version foundClass path is first version found
–– JAR files assume backwards compatibility at bestJAR files assume backwards compatibility at best
•• Implicit dependenciesImplicit dependencies
–– Dependencies are implicit in class path orderingDependencies are implicit in class path ordering
–– JAR files add improvements for extensions, but cannotJAR files add improvements for extensions, but cannot
control visibilitycontrol visibility
•• Split packages by defaultSplit packages by default
–– Class path approach searches until if finds, which canClass path approach searches until if finds, which can
lead to shadowing or mixing of versionslead to shadowing or mixing of versions
–– JAR files can provide sealingJAR files can provide sealing
Standard Java Modularity Limitations (2)Standard Java Modularity Limitations (2)
•• LowLow--level support for dynamicslevel support for dynamics
–– Class loaders are complicated to useClass loaders are complicated to use
•• Unsophisticated consistency modelUnsophisticated consistency model
–– Cuts across previous issues, it is difficult to ensure classCuts across previous issues, it is difficult to ensure class
space consistencyspace consistency
•• Missing module conceptMissing module concept
–– Classes too fine grained, packages too simplistic, classClasses too fine grained, packages too simplistic, class
loaders too low levelloaders too low level
–– JAR files are best candidates, but still inadequateJAR files are best candidates, but still inadequate
–– Modularity is a secondModularity is a second--class concept as opposed to theclass concept as opposed to the
.NET platform.NET platform
•• In .NET, Assembly usage is enforced with explicitIn .NET, Assembly usage is enforced with explicit
versioning rules and sharing occurs via the Globalversioning rules and sharing occurs via the Global
Assembly CacheAssembly Cache
OSGi R3 ModularityOSGi R3 Modularity
•• Improves upon standard Java modularityImproves upon standard Java modularity
–– DefinesDefines bundlebundle, a logical and physical modularity unit, a logical and physical modularity unit
•• Explicit dependenciesExplicit dependencies
•• Explicit versioningExplicit versioning
•• Internal class path conceptInternal class path concept
•• Code isolationCode isolation
•• Packaging formatPackaging format
–– Defines dynamic bundle life cycleDefines dynamic bundle life cycle
•• Possible to install, update, and uninstall code at run timePossible to install, update, and uninstall code at run time
•• Replaces lowReplaces low--level class loaderslevel class loaders
OSGi R3 Modularity Issues (1)OSGi R3 Modularity Issues (1)
•• Package sharing is only globalPackage sharing is only global
–– Cannot have multiple shared versionsCannot have multiple shared versions
•• Simplistic versioning semanticsSimplistic versioning semantics
–– Always backwards compatibleAlways backwards compatible
•• Not intended for sharing implementation packagesNot intended for sharing implementation packages
–– Only for specification packages, which was why theOnly for specification packages, which was why the
version model is simpleversion model is simple
•• Provider selection is always anonymousProvider selection is always anonymous
–– No way to influence selectionNo way to influence selection
OSGi R3 Modularity Issues (2)OSGi R3 Modularity Issues (2)
•• Simplistic consistency modelSimplistic consistency model
–– Consistency model based on single inConsistency model based on single in--use versionuse version
–– No way to declare dependencies among packagesNo way to declare dependencies among packages
•• CoarseCoarse--grained package visibility rulesgrained package visibility rules
–– Classes in a package are either completely visible toClasses in a package are either completely visible to
everyone or hiddeneveryone or hidden
•• Module content is not extensibleModule content is not extensible
–– All content of the logical module must be included in theAll content of the logical module must be included in the
physical modulephysical module
•• Package dependencies are not always appropriatePackage dependencies are not always appropriate
–– Package metadata is cumbersome in large,Package metadata is cumbersome in large,
complex systems, tightly coupled subsystemscomplex systems, tightly coupled subsystems
and in less structured legacy systemsand in less structured legacy systems
OSGi R4 Framework
Modularity Support for the Future
Modularity RequirementsModularity Requirements
•• Backwards compatible with OSGi R3Backwards compatible with OSGi R3
•• Defined in terms of Java packagesDefined in terms of Java packages
–– WellWell--defined concept in Javadefined concept in Java
–– Maps nicely to class loadersMaps nicely to class loaders
•• Explicitly defined boundariesExplicitly defined boundaries
•• Explicitly defined dependenciesExplicitly defined dependencies
•• Support for versioning and multiSupport for versioning and multi--versionsversions
•• Flexible, must supportFlexible, must support
–– Small to large systemsSmall to large systems
–– Static to dynamic systemsStatic to dynamic systems
Related WorkRelated Work
•• Module mechanismsModule mechanisms
–– MJ: A Rational Module System for Java and itsMJ: A Rational Module System for Java and its
Applications (J. Corwin et alApplications (J. Corwin et al –– IBM)IBM)
–– Mechanisms for Secure Modular Programming in JavaMechanisms for Secure Modular Programming in Java
(L. Bauer et al(L. Bauer et al –– Princeton University)Princeton University)
–– Units: Cool Modules for HOT Languages (M. Flatt andUnits: Cool Modules for HOT Languages (M. Flatt and
M. FelleisenM. Felleisen –– Rice University)Rice University)
–– Evolving Software with Extensible Modules (M. ZengerEvolving Software with Extensible Modules (M. Zenger ––
ÉÉcole Polytechnique Fcole Polytechnique Fééddéérale de Lausanne)rale de Lausanne)
•• Component and extensible frameworksComponent and extensible frameworks
–– EJB, Eclipse, NetBeansEJB, Eclipse, NetBeans
•• Microsoft .NETMicrosoft .NET
–– Assemblies and Global Assembly CacheAssemblies and Global Assembly Cache
OSGi R4 Modularity (1)OSGi R4 Modularity (1)
•• Limitation: Package sharing is only globalLimitation: Package sharing is only global
OSGi R4 Modularity (1)OSGi R4 Modularity (1)
•• Limitation: Package sharing is only globalLimitation: Package sharing is only global
•• MultiMulti--version supportversion support
–– Possible to have more than one version of a sharedPossible to have more than one version of a shared
package in memory at the same timepackage in memory at the same time
–– General change of philosophy to the prior OSGiGeneral change of philosophy to the prior OSGi
specificationsspecifications
–– Has deep impact on service aspects as well asHas deep impact on service aspects as well as
modularitymodularity
•• For a given bundle, the service registry is implicitly partitionFor a given bundle, the service registry is implicitly partitioneded
according to the package versions visible to itaccording to the package versions visible to it
•• Impact on services not explored further in this presentationImpact on services not explored further in this presentation
OSGi R4 Modularity (2)OSGi R4 Modularity (2)
•• Limitation: Simplistic versioning semanticsLimitation: Simplistic versioning semantics
OSGi R4 Modularity (2)OSGi R4 Modularity (2)
•• Limitation: Simplistic versioning semanticsLimitation: Simplistic versioning semantics
•• Import version rangesImport version ranges
–– Exporters still export a precise version, but importersExporters still export a precise version, but importers
may specify an open or closed version rangemay specify an open or closed version range
–– Eliminates existing backwards compatibility assumptionEliminates existing backwards compatibility assumption
OSGi R4 Modularity (2)OSGi R4 Modularity (2)
•• Limitation: Simplistic versioning semanticsLimitation: Simplistic versioning semantics
•• Import version rangesImport version ranges
–– Exporters still export a precise version, but importersExporters still export a precise version, but importers
may specify an open or closed version rangemay specify an open or closed version range
–– Eliminates existing backwards compatibility assumptionEliminates existing backwards compatibility assumption
Import-Package: foo; version=“[1.0.0,1.5.0)”
OSGi R4 Modularity (2)OSGi R4 Modularity (2)
•• Limitation: Simplistic versioning semanticsLimitation: Simplistic versioning semantics
•• Import version rangesImport version ranges
–– Exporters still export a precise version, but importersExporters still export a precise version, but importers
may specify an open or closed version rangemay specify an open or closed version range
–– Eliminates existing backwards compatibility assumptionEliminates existing backwards compatibility assumption
•• Limitation: Not intended for sharing implementationLimitation: Not intended for sharing implementation
packagespackages
Import-Package: foo; version=“[1.0.0,1.5.0)”
OSGi R4 Modularity (2)OSGi R4 Modularity (2)
•• Limitation: Simplistic versioning semanticsLimitation: Simplistic versioning semantics
•• Import version rangesImport version ranges
–– Exporters still export a precise version, but importersExporters still export a precise version, but importers
may specify an open or closed version rangemay specify an open or closed version range
–– Eliminates existing backwards compatibility assumptionEliminates existing backwards compatibility assumption
•• Limitation: Not intended for sharing implementationLimitation: Not intended for sharing implementation
packagespackages
• Multi-version sharing and importing version ranges
make implementation package sharing possible
Import-Package: foo; version=“[1.0.0,1.5.0)”
OSGi R4 Modularity (3)OSGi R4 Modularity (3)
•• Limitation: Provider selection is always anonymousLimitation: Provider selection is always anonymous
OSGi R4 Modularity (3)OSGi R4 Modularity (3)
•• Limitation: Provider selection is always anonymousLimitation: Provider selection is always anonymous
•• Arbitrary export/import attributesArbitrary export/import attributes
–– Exporters may attach arbitrary attributes to their exports,Exporters may attach arbitrary attributes to their exports,
importers can match against these arbitrary attributesimporters can match against these arbitrary attributes
•• Exporters may declare attributes as mandatoryExporters may declare attributes as mandatory
–– Mandatory attributes provide simple means to limit package visibMandatory attributes provide simple means to limit package visibilityility
–– Importers influence package selection using arbitraryImporters influence package selection using arbitrary
attribute matchingattribute matching
OSGi R4 Modularity (3)OSGi R4 Modularity (3)
•• Limitation: Provider selection is always anonymousLimitation: Provider selection is always anonymous
•• Arbitrary export/import attributesArbitrary export/import attributes
–– Exporters may attach arbitrary attributes to their exports,Exporters may attach arbitrary attributes to their exports,
importers can match against these arbitrary attributesimporters can match against these arbitrary attributes
•• Exporters may declare attributes as mandatoryExporters may declare attributes as mandatory
–– Mandatory attributes provide simple means to limit package visibMandatory attributes provide simple means to limit package visibilityility
–– Importers influence package selection using arbitraryImporters influence package selection using arbitrary
attribute matchingattribute matching
Export-Package: foo;
version=“1.0.0”;
myattr=“myvalue”
Export-Package: foo;
version=“1.0.0”
A
foo
(myattr=“myvalue”) Bfoo
OSGi R4 Modularity (3)OSGi R4 Modularity (3)
•• Limitation: Provider selection is always anonymousLimitation: Provider selection is always anonymous
•• Arbitrary export/import attributesArbitrary export/import attributes
–– Exporters may attach arbitrary attributes to their exports,Exporters may attach arbitrary attributes to their exports,
importers can match against these arbitrary attributesimporters can match against these arbitrary attributes
•• Exporters may declare attributes as mandatoryExporters may declare attributes as mandatory
–– Mandatory attributes provide simple means to limit package visibMandatory attributes provide simple means to limit package visibilityility
–– Importers influence package selection using arbitraryImporters influence package selection using arbitrary
attribute matchingattribute matching
A
foo
(myattr=myvalue) BfooCfoo
Import-Package: foo;
version=“1.0.0”;
myattr=“myvalue”
OSGi R4 Modularity (3)OSGi R4 Modularity (3)
•• Limitation: Provider selection is always anonymousLimitation: Provider selection is always anonymous
•• Arbitrary export/import attributesArbitrary export/import attributes
–– Exporters may attach arbitrary attributes to their exports,Exporters may attach arbitrary attributes to their exports,
importers can match against these arbitrary attributesimporters can match against these arbitrary attributes
•• Exporters may declare attributes as mandatoryExporters may declare attributes as mandatory
–– Mandatory attributes provide simple means to limit package visibMandatory attributes provide simple means to limit package visibilityility
–– Importers influence package selection using arbitraryImporters influence package selection using arbitrary
attribute matchingattribute matching
A
foo
(myattr=myvalue)
Import-Package: foo;
version=“1.0.0”;
myattr=“myvalue”
Cfoo Bfoo
OSGi R4 Modularity (4)OSGi R4 Modularity (4)
•• Limitation: Simplistic consistency modelLimitation: Simplistic consistency model
OSGi R4 Modularity (4)OSGi R4 Modularity (4)
•• Limitation: Simplistic consistency modelLimitation: Simplistic consistency model
•• Sophisticated package consistency modelSophisticated package consistency model
–– Exporters may declare packageExporters may declare package ““usesuses”” dependenciesdependencies
•• Exported packages express dependencies on imported orExported packages express dependencies on imported or
other exported packages, which constrain the resolve processother exported packages, which constrain the resolve process
–– The framework must ensure that importers do not violateThe framework must ensure that importers do not violate
constraints implied byconstraints implied by ““usesuses”” dependenciesdependencies
OSGi R4 Modularity (4)OSGi R4 Modularity (4)
•• Limitation: Simplistic consistency modelLimitation: Simplistic consistency model
•• Sophisticated package consistency modelSophisticated package consistency model
–– Exporters may declare packageExporters may declare package ““usesuses”” dependenciesdependencies
•• Exported packages express dependencies on imported orExported packages express dependencies on imported or
other exported packages, which constrain the resolve processother exported packages, which constrain the resolve process
–– The framework must ensure that importers do not violateThe framework must ensure that importers do not violate
constraints implied byconstraints implied by ““usesuses”” dependenciesdependencies
DfooA foo
Export-Package: foo Export-Package: foo
OSGi R4 Modularity (4)OSGi R4 Modularity (4)
•• Limitation: Simplistic consistency modelLimitation: Simplistic consistency model
•• Sophisticated package consistency modelSophisticated package consistency model
–– Exporters may declare packageExporters may declare package ““usesuses”” dependenciesdependencies
•• Exported packages express dependencies on imported orExported packages express dependencies on imported or
other exported packages, which constrain the resolve processother exported packages, which constrain the resolve process
–– The framework must ensure that importers do not violateThe framework must ensure that importers do not violate
constraints implied byconstraints implied by ““usesuses”” dependenciesdependencies
DfooA foo C foobar
Import-Package: foo, bar
OSGi R4 Modularity (4)OSGi R4 Modularity (4)
•• Limitation: Simplistic consistency modelLimitation: Simplistic consistency model
•• Sophisticated package consistency modelSophisticated package consistency model
–– Exporters may declare packageExporters may declare package ““usesuses”” dependenciesdependencies
•• Exported packages express dependencies on imported orExported packages express dependencies on imported or
other exported packages, which constrain the resolve processother exported packages, which constrain the resolve process
–– The framework must ensure that importers do not violateThe framework must ensure that importers do not violate
constraints implied byconstraints implied by ““usesuses”” dependenciesdependencies
DfooA foo B barfoo
Import-Package: foo
Export-Package: bar;
uses:=“foo”
C foobar
OSGi R4 Modularity (4)OSGi R4 Modularity (4)
•• Limitation: Simplistic consistency modelLimitation: Simplistic consistency model
•• Sophisticated package consistency modelSophisticated package consistency model
–– Exporters may declare packageExporters may declare package ““usesuses”” dependenciesdependencies
•• Exported packages express dependencies on imported orExported packages express dependencies on imported or
other exported packages, which constrain the resolve processother exported packages, which constrain the resolve process
–– The framework must ensure that importers do not violateThe framework must ensure that importers do not violate
constraints implied byconstraints implied by ““usesuses”” dependenciesdependencies
DfooA foo C foobarB barfoo
Import-Package: foo
Export-Package: bar;
uses:=“foo”
OSGi R4 Modularity (4)OSGi R4 Modularity (4)
•• Limitation: Simplistic consistency modelLimitation: Simplistic consistency model
•• Sophisticated package consistency modelSophisticated package consistency model
–– Exporters may declare packageExporters may declare package ““usesuses”” dependenciesdependencies
•• Exported packages express dependencies on imported orExported packages express dependencies on imported or
other exported packages, which constrain the resolve processother exported packages, which constrain the resolve process
–– The framework must ensure that importers do not violateThe framework must ensure that importers do not violate
constraints implied byconstraints implied by ““usesuses”” dependenciesdependencies
DfooA foo C foobarB barfoo
Import-Package: foo
Export-Package: bar;
uses:=“foo”
OSGi R4 Modularity (4)OSGi R4 Modularity (4)
•• Limitation: Simplistic consistency modelLimitation: Simplistic consistency model
•• Sophisticated package consistency modelSophisticated package consistency model
–– Exporters may declare packageExporters may declare package ““usesuses”” dependenciesdependencies
•• Exported packages express dependencies on imported orExported packages express dependencies on imported or
other exported packages, which constrain the resolve processother exported packages, which constrain the resolve process
–– The framework must ensure that importers do not violateThe framework must ensure that importers do not violate
constraints implied byconstraints implied by ““usesuses”” dependenciesdependencies
DfooA foo C foobarB barfoo
Import-Package: foo
Export-Package: bar;
uses:=“foo”
OSGi R4 Modularity (4)OSGi R4 Modularity (4)
•• Limitation: Simplistic consistency modelLimitation: Simplistic consistency model
•• Sophisticated package consistency modelSophisticated package consistency model
–– Exporters may declare packageExporters may declare package ““usesuses”” dependenciesdependencies
•• Exported packages express dependencies on imported orExported packages express dependencies on imported or
other exported packages, which constrain the resolve processother exported packages, which constrain the resolve process
–– The framework must ensure that importers do not violateThe framework must ensure that importers do not violate
constraints implied byconstraints implied by ““usesuses”” dependenciesdependencies
DfooA foo C foobarB barfoo
Import-Package: foo
Export-Package: bar;
uses:=“foo”
OSGi R4 Modularity (5)OSGi R4 Modularity (5)
•• Limitation: CoarseLimitation: Coarse--grained package visibility rulesgrained package visibility rules
OSGi R4 Modularity (5)OSGi R4 Modularity (5)
•• Limitation: CoarseLimitation: Coarse--grained package visibility rulesgrained package visibility rules
•• Package filteringPackage filtering
–– Exporters may declare that certain classes areExporters may declare that certain classes are
included/excluded from the exported packageincluded/excluded from the exported package
OSGi R4 Modularity (5)OSGi R4 Modularity (5)
•• Limitation: CoarseLimitation: Coarse--grained package visibility rulesgrained package visibility rules
•• Package filteringPackage filtering
–– Exporters may declare that certain classes areExporters may declare that certain classes are
included/excluded from the exported packageincluded/excluded from the exported package
foo
friend=“yes”
(include:=”*”)
foo
(exclude:=”*Impl”)
A
Export-Package: foo;
exclude:=“*Impl”,
foo; friend=“yes”;
mandatory:=“friend”
OSGi R4 Modularity (5)OSGi R4 Modularity (5)
•• Limitation: CoarseLimitation: Coarse--grained package visibility rulesgrained package visibility rules
•• Package filteringPackage filtering
–– Exporters may declare that certain classes areExporters may declare that certain classes are
included/excluded from the exported packageincluded/excluded from the exported package
foo
(exclude:=“*Impl”)
A CfooB foo
Import-Package: foo;
friend=“yes”
Import-Package: foo
foo
friend=“yes”
(include:=”*”)
OSGi R4 Modularity (5)OSGi R4 Modularity (5)
•• Limitation: CoarseLimitation: Coarse--grained package visibility rulesgrained package visibility rules
•• Package filteringPackage filtering
–– Exporters may declare that certain classes areExporters may declare that certain classes are
included/excluded from the exported packageincluded/excluded from the exported package
A
Import-Package: foo
CfooB foo
foo
friend=“yes”
(include:=”*”)
foo
(exclude:=”*Impl”)
Import-Package: foo;
friend=“yes”
OSGi R4 Modularity (5)OSGi R4 Modularity (5)
•• Limitation: CoarseLimitation: Coarse--grained package visibility rulesgrained package visibility rules
•• Package filteringPackage filtering
–– Exporters may declare that certain classes areExporters may declare that certain classes are
included/excluded from the exported packageincluded/excluded from the exported package
A
Import-Package: foo
CfooB foo
foo
friend=“yes”
(include:=”*”)
foo
(exclude:=”*Impl”)
Import-Package: foo;
friend=“yes”
OSGi R4 Modularity (6)OSGi R4 Modularity (6)
•• Limitation: Module content is not extensibleLimitation: Module content is not extensible
OSGi R4 Modularity (6)OSGi R4 Modularity (6)
•• Limitation: Module content is not extensibleLimitation: Module content is not extensible
•• Bundle fragmentsBundle fragments
–– A special bundle that attaches to a host bundle and usesA special bundle that attaches to a host bundle and uses
the same class loaderthe same class loader
•• Conceptually becomes part of the host bundleConceptually becomes part of the host bundle
OSGi R4 Modularity (6)OSGi R4 Modularity (6)
•• Limitation: Module content is not extensibleLimitation: Module content is not extensible
•• Bundle fragmentsBundle fragments
–– A special bundle that attaches to a host bundle and usesA special bundle that attaches to a host bundle and uses
the same class loaderthe same class loader
•• Conceptually becomes part of the host bundleConceptually becomes part of the host bundle
fooAbaz barBwoz
Fragment-Host: B
Export-Package: foo
Import-Package: baz
Bundle-SymbolicName: B
Export-Package: bar
Import-Package: woz
fooAbaz
OSGi R4 Modularity (6)OSGi R4 Modularity (6)
•• Limitation: Module content is not extensibleLimitation: Module content is not extensible
•• Bundle fragmentsBundle fragments
–– A special bundle that attaches to a host bundle and usesA special bundle that attaches to a host bundle and uses
the same class loaderthe same class loader
•• Conceptually becomes part of the host bundleConceptually becomes part of the host bundle
barBwoz
OSGi R4 Modularity (6)OSGi R4 Modularity (6)
•• Limitation: Module content is not extensibleLimitation: Module content is not extensible
•• Bundle fragmentsBundle fragments
–– A special bundle that attaches to a host bundle and usesA special bundle that attaches to a host bundle and uses
the same class loaderthe same class loader
•• Conceptually becomes part of the host bundleConceptually becomes part of the host bundle
barBwoz
fooAbaz
OSGi R4 Modularity (6)OSGi R4 Modularity (6)
•• Limitation: Module content is not extensibleLimitation: Module content is not extensible
•• Bundle fragmentsBundle fragments
–– A special bundle that attaches to a host bundle and usesA special bundle that attaches to a host bundle and uses
the same class loaderthe same class loader
•• Conceptually becomes part of the host bundleConceptually becomes part of the host bundle
barBwoz
fooAbaz
OSGi R4 Modularity (6)OSGi R4 Modularity (6)
•• Limitation: Module content is not extensibleLimitation: Module content is not extensible
•• Bundle fragmentsBundle fragments
–– A special bundle that attaches to a host bundle and usesA special bundle that attaches to a host bundle and uses
the same class loaderthe same class loader
•• Conceptually becomes part of the host bundleConceptually becomes part of the host bundle
bar
foo
B
fooAbaz
woz
baz
OSGi R4 Modularity (7)OSGi R4 Modularity (7)
•• Limitation: Package dependencies are not alwaysLimitation: Package dependencies are not always
appropriateappropriate
OSGi R4 Modularity (7)OSGi R4 Modularity (7)
•• Limitation: Package dependencies are not alwaysLimitation: Package dependencies are not always
appropriateappropriate
•• Bundle dependenciesBundle dependencies
–– Import everything that another, specific bundle exportsImport everything that another, specific bundle exports
–– Allows reAllows re--exportingexporting
OSGi R4 Modularity (7)OSGi R4 Modularity (7)
•• Limitation: Package dependencies are not alwaysLimitation: Package dependencies are not always
appropriateappropriate
•• Bundle dependenciesBundle dependencies
–– Import everything that another, specific bundle exportsImport everything that another, specific bundle exports
–– Allows reAllows re--exportingexporting
B barfoo
bar
A
Require-Bundle: A
Export-Package: bar
Bundle-SymbolicName: A
Export-Package: bar, foo
OSGi R4 Modularity (7)OSGi R4 Modularity (7)
•• Limitation: Package dependencies are not alwaysLimitation: Package dependencies are not always
appropriateappropriate
•• Bundle dependenciesBundle dependencies
–– Import everything that another, specific bundle exportsImport everything that another, specific bundle exports
–– Allows reAllows re--exportingexporting
foo
bar
A
Require-Bundle: A
Export-Package: bar
Bundle-SymbolicName: A
Export-Package: bar, foo
B bar
Example OSGi R4 Bundle ManifestExample OSGi R4 Bundle Manifest
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.foo.simplebundle
Bundle-Activator: org.foo.Activator
Bundle-ClassPath: .,org/foo/embedded.jar
Bundle-NativeCode:
libfoo.so; osname=Linux; processor=x86,
foo.dll; osname=Windows 98; processor=x86
Import-Package:
javax.servlet; version=“[2.0.0,2.4.0)”;
resolution:=“optional”
Export-Package:
org.foo.service; version=1.1; vendor=“org.foo”;
exclude:=“*Impl”,
org.foo.service.bar; version=1.1;
uses:=“org.foo.service”
ChallengesChallenges
•• Manage the complexityManage the complexity
–– Maintain conceptual integrityMaintain conceptual integrity
–– Keep the simple cases simpleKeep the simple cases simple
–– Complexity should only be visible when it is requiredComplexity should only be visible when it is required
–– Avoid bloat to support small devicesAvoid bloat to support small devices
ChallengesChallenges
•• Manage the complexityManage the complexity
–– Maintain conceptual integrityMaintain conceptual integrity
–– Keep the simple cases simpleKeep the simple cases simple
–– Complexity should only be visible when it is requiredComplexity should only be visible when it is required
–– Avoid bloat to support small devicesAvoid bloat to support small devices
TheThe ““good newsgood news”” is that these changes generallyis that these changes generally
only affect the dependency resolving algorithmonly affect the dependency resolving algorithm
ConclusionsConclusions
•• Java needs improved modularity supportJava needs improved modularity support
–– We need to stop reWe need to stop re--inventing the wheelinventing the wheel
–– Improve application structureImprove application structure
–– Simplify deployment and management especially inSimplify deployment and management especially in
technological areas where deployment is inherenttechnological areas where deployment is inherent
•• e.g., component orientation, extensible systems, and servicee.g., component orientation, extensible systems, and service
orientation (to some degree)orientation (to some degree)
•• OSGi R1/R2/R3 were all steps in the right directionOSGi R1/R2/R3 were all steps in the right direction
•• OSGi R4 goes even further in providingOSGi R4 goes even further in providing
sophisticated Java modularitysophisticated Java modularity
–– OSGi technology is cited in JSR 277, an initiative by SunOSGi technology is cited in JSR 277, an initiative by Sun
to define a module system for Java, whose expert groupto define a module system for Java, whose expert group
includes OSGi membersincludes OSGi members
Questions?

Contenu connexe

En vedette

Die Zukunft spricht Domino! - ICS.UG 2016
Die Zukunft spricht Domino! - ICS.UG 2016Die Zukunft spricht Domino! - ICS.UG 2016
Die Zukunft spricht Domino! - ICS.UG 2016ICS User Group
 
Globale Standards im Web of Things
Globale Standards im Web of ThingsGlobale Standards im Web of Things
Globale Standards im Web of ThingsGeorg Rehm
 
Globalization of production and women in asia
Globalization of production and women in asiaGlobalization of production and women in asia
Globalization of production and women in asiaBurnee Bok
 
Rediscovering Modularity - .NET Edition
Rediscovering Modularity - .NET EditionRediscovering Modularity - .NET Edition
Rediscovering Modularity - .NET EditionChris Chedgey
 
Economic benefit of standardization
Economic benefit of standardizationEconomic benefit of standardization
Economic benefit of standardizationSabeen Ahad
 
ApacheCon Core: Service Discovery in OSGi: Beyond the JVM using Docker and Co...
ApacheCon Core: Service Discovery in OSGi: Beyond the JVM using Docker and Co...ApacheCon Core: Service Discovery in OSGi: Beyond the JVM using Docker and Co...
ApacheCon Core: Service Discovery in OSGi: Beyond the JVM using Docker and Co...Frank Lyaruu
 
Utilizing the open ntf domino api
Utilizing the open ntf domino apiUtilizing the open ntf domino api
Utilizing the open ntf domino apiOliver Busse
 
Introducing the Embedded Rich Client Platform (eRCP) - Jim Robbins, IBM
Introducing the Embedded Rich Client Platform (eRCP) - Jim Robbins, IBMIntroducing the Embedded Rich Client Platform (eRCP) - Jim Robbins, IBM
Introducing the Embedded Rich Client Platform (eRCP) - Jim Robbins, IBMmfrancis
 
VC activities in EMEA - Thierry Nicolle, IBM
VC activities in EMEA - Thierry Nicolle, IBMVC activities in EMEA - Thierry Nicolle, IBM
VC activities in EMEA - Thierry Nicolle, IBMmfrancis
 
SAP Ventures Overview - Paul Jozefak, SAP Ventures
SAP Ventures Overview - Paul Jozefak, SAP VenturesSAP Ventures Overview - Paul Jozefak, SAP Ventures
SAP Ventures Overview - Paul Jozefak, SAP Venturesmfrancis
 
Mike Ormond: Silverlight for Windows Phone 7 (UK TechDays)
Mike Ormond: Silverlight for Windows Phone 7 (UK TechDays)Mike Ormond: Silverlight for Windows Phone 7 (UK TechDays)
Mike Ormond: Silverlight for Windows Phone 7 (UK TechDays)ukdpe
 
CSS3 With A Safety Net - Sudweb 2012
CSS3 With A Safety Net - Sudweb 2012CSS3 With A Safety Net - Sudweb 2012
CSS3 With A Safety Net - Sudweb 2012Peter Gasston
 
Windows Azure - Ericnel
Windows Azure  -  EricnelWindows Azure  -  Ericnel
Windows Azure - Ericnelukdpe
 
A Sensational Exposé With Bewildering Demonstrations
A Sensational Exposé With Bewildering DemonstrationsA Sensational Exposé With Bewildering Demonstrations
A Sensational Exposé With Bewildering DemonstrationsPeter Gasston
 
DS, BP, EJB, CDI, WTF!? - Graham Charters
DS, BP, EJB, CDI, WTF!? - Graham ChartersDS, BP, EJB, CDI, WTF!? - Graham Charters
DS, BP, EJB, CDI, WTF!? - Graham Chartersmfrancis
 
Virtual Machines and the Metaphysics of Science
 Virtual Machines and the Metaphysics of Science  Virtual Machines and the Metaphysics of Science
Virtual Machines and the Metaphysics of Science Aaron Sloman
 
Daidalos Pervasive Services and the OSGi Framework - Christoph Kuhmünch, Res...
Daidalos Pervasive Services and the OSGi Framework - Christoph Kuhmünch, Res...Daidalos Pervasive Services and the OSGi Framework - Christoph Kuhmünch, Res...
Daidalos Pervasive Services and the OSGi Framework - Christoph Kuhmünch, Res...mfrancis
 
Class Reloading in Ruby on Rails: The Whole Story
Class Reloading in Ruby on Rails: The Whole StoryClass Reloading in Ruby on Rails: The Whole Story
Class Reloading in Ruby on Rails: The Whole StoryXavier Noria
 
What's vision for, and how does it work? From Marr (and earlier)to Gibson and...
What's vision for, and how does it work? From Marr (and earlier)to Gibson and...What's vision for, and how does it work? From Marr (and earlier)to Gibson and...
What's vision for, and how does it work? From Marr (and earlier)to Gibson and...Aaron Sloman
 
Ontologies for baby animals and robots From "baby stuff" to the world of adul...
Ontologies for baby animals and robots From "baby stuff" to the world of adul...Ontologies for baby animals and robots From "baby stuff" to the world of adul...
Ontologies for baby animals and robots From "baby stuff" to the world of adul...Aaron Sloman
 

En vedette (20)

Die Zukunft spricht Domino! - ICS.UG 2016
Die Zukunft spricht Domino! - ICS.UG 2016Die Zukunft spricht Domino! - ICS.UG 2016
Die Zukunft spricht Domino! - ICS.UG 2016
 
Globale Standards im Web of Things
Globale Standards im Web of ThingsGlobale Standards im Web of Things
Globale Standards im Web of Things
 
Globalization of production and women in asia
Globalization of production and women in asiaGlobalization of production and women in asia
Globalization of production and women in asia
 
Rediscovering Modularity - .NET Edition
Rediscovering Modularity - .NET EditionRediscovering Modularity - .NET Edition
Rediscovering Modularity - .NET Edition
 
Economic benefit of standardization
Economic benefit of standardizationEconomic benefit of standardization
Economic benefit of standardization
 
ApacheCon Core: Service Discovery in OSGi: Beyond the JVM using Docker and Co...
ApacheCon Core: Service Discovery in OSGi: Beyond the JVM using Docker and Co...ApacheCon Core: Service Discovery in OSGi: Beyond the JVM using Docker and Co...
ApacheCon Core: Service Discovery in OSGi: Beyond the JVM using Docker and Co...
 
Utilizing the open ntf domino api
Utilizing the open ntf domino apiUtilizing the open ntf domino api
Utilizing the open ntf domino api
 
Introducing the Embedded Rich Client Platform (eRCP) - Jim Robbins, IBM
Introducing the Embedded Rich Client Platform (eRCP) - Jim Robbins, IBMIntroducing the Embedded Rich Client Platform (eRCP) - Jim Robbins, IBM
Introducing the Embedded Rich Client Platform (eRCP) - Jim Robbins, IBM
 
VC activities in EMEA - Thierry Nicolle, IBM
VC activities in EMEA - Thierry Nicolle, IBMVC activities in EMEA - Thierry Nicolle, IBM
VC activities in EMEA - Thierry Nicolle, IBM
 
SAP Ventures Overview - Paul Jozefak, SAP Ventures
SAP Ventures Overview - Paul Jozefak, SAP VenturesSAP Ventures Overview - Paul Jozefak, SAP Ventures
SAP Ventures Overview - Paul Jozefak, SAP Ventures
 
Mike Ormond: Silverlight for Windows Phone 7 (UK TechDays)
Mike Ormond: Silverlight for Windows Phone 7 (UK TechDays)Mike Ormond: Silverlight for Windows Phone 7 (UK TechDays)
Mike Ormond: Silverlight for Windows Phone 7 (UK TechDays)
 
CSS3 With A Safety Net - Sudweb 2012
CSS3 With A Safety Net - Sudweb 2012CSS3 With A Safety Net - Sudweb 2012
CSS3 With A Safety Net - Sudweb 2012
 
Windows Azure - Ericnel
Windows Azure  -  EricnelWindows Azure  -  Ericnel
Windows Azure - Ericnel
 
A Sensational Exposé With Bewildering Demonstrations
A Sensational Exposé With Bewildering DemonstrationsA Sensational Exposé With Bewildering Demonstrations
A Sensational Exposé With Bewildering Demonstrations
 
DS, BP, EJB, CDI, WTF!? - Graham Charters
DS, BP, EJB, CDI, WTF!? - Graham ChartersDS, BP, EJB, CDI, WTF!? - Graham Charters
DS, BP, EJB, CDI, WTF!? - Graham Charters
 
Virtual Machines and the Metaphysics of Science
 Virtual Machines and the Metaphysics of Science  Virtual Machines and the Metaphysics of Science
Virtual Machines and the Metaphysics of Science
 
Daidalos Pervasive Services and the OSGi Framework - Christoph Kuhmünch, Res...
Daidalos Pervasive Services and the OSGi Framework - Christoph Kuhmünch, Res...Daidalos Pervasive Services and the OSGi Framework - Christoph Kuhmünch, Res...
Daidalos Pervasive Services and the OSGi Framework - Christoph Kuhmünch, Res...
 
Class Reloading in Ruby on Rails: The Whole Story
Class Reloading in Ruby on Rails: The Whole StoryClass Reloading in Ruby on Rails: The Whole Story
Class Reloading in Ruby on Rails: The Whole Story
 
What's vision for, and how does it work? From Marr (and earlier)to Gibson and...
What's vision for, and how does it work? From Marr (and earlier)to Gibson and...What's vision for, and how does it work? From Marr (and earlier)to Gibson and...
What's vision for, and how does it work? From Marr (and earlier)to Gibson and...
 
Ontologies for baby animals and robots From "baby stuff" to the world of adul...
Ontologies for baby animals and robots From "baby stuff" to the world of adul...Ontologies for baby animals and robots From "baby stuff" to the world of adul...
Ontologies for baby animals and robots From "baby stuff" to the world of adul...
 

Similaire à OSGi R4 Framework Improves Java Modularity with Flexible Package Dependencies

OSGi Service Platform Release 4 Overview - BJ Hargrave, IBM & Peter Kriens, a...
OSGi Service Platform Release 4 Overview - BJ Hargrave, IBM & Peter Kriens, a...OSGi Service Platform Release 4 Overview - BJ Hargrave, IBM & Peter Kriens, a...
OSGi Service Platform Release 4 Overview - BJ Hargrave, IBM & Peter Kriens, a...mfrancis
 
Using the OSGi Application Model on Mobile Devices with CLDC JVM - Dimitar Va...
Using the OSGi Application Model on Mobile Devices with CLDC JVM - Dimitar Va...Using the OSGi Application Model on Mobile Devices with CLDC JVM - Dimitar Va...
Using the OSGi Application Model on Mobile Devices with CLDC JVM - Dimitar Va...mfrancis
 
Jax london 2011
Jax london 2011Jax london 2011
Jax london 2011njbartlett
 
Java Core | Java 8 and OSGi Modularisation | Tim Ellison & Neil Bartlett
Java Core | Java 8 and OSGi Modularisation | Tim Ellison & Neil BartlettJava Core | Java 8 and OSGi Modularisation | Tim Ellison & Neil Bartlett
Java Core | Java 8 and OSGi Modularisation | Tim Ellison & Neil BartlettJAX London
 
OpenJDK Penrose Presentation (JavaOne 2012)
OpenJDK Penrose Presentation (JavaOne 2012)OpenJDK Penrose Presentation (JavaOne 2012)
OpenJDK Penrose Presentation (JavaOne 2012)David Bosschaert
 
Java Modularity with OSGi
Java Modularity with OSGiJava Modularity with OSGi
Java Modularity with OSGiIlya Rybak
 
Calling All Modularity Solutions: A Comparative Study from eBay
Calling All Modularity Solutions: A Comparative Study from eBayCalling All Modularity Solutions: A Comparative Study from eBay
Calling All Modularity Solutions: A Comparative Study from eBayTony Ng
 
Calling all modularity solutions
Calling all modularity solutionsCalling all modularity solutions
Calling all modularity solutionsSangjin Lee
 
Create *real* modular Java applications - a brief introduction -
Create *real* modular Java applications - a brief introduction -Create *real* modular Java applications - a brief introduction -
Create *real* modular Java applications - a brief introduction -Jeffrey Groneberg
 
Modularity of The Java Platform Javaday (http://javaday.org.ua/)
Modularity of The Java Platform Javaday (http://javaday.org.ua/)Modularity of The Java Platform Javaday (http://javaday.org.ua/)
Modularity of The Java Platform Javaday (http://javaday.org.ua/)Martin Toshev
 
Guidelines to Improve the Robustness of the OSGi Framework and Its Services A...
Guidelines to Improve the Robustness of the OSGi Framework and Its Services A...Guidelines to Improve the Robustness of the OSGi Framework and Its Services A...
Guidelines to Improve the Robustness of the OSGi Framework and Its Services A...mfrancis
 
As7 jbug j_boss_modules_yang yong
As7 jbug j_boss_modules_yang yongAs7 jbug j_boss_modules_yang yong
As7 jbug j_boss_modules_yang yongjbossug
 
Gradle 2.breaking stereotypes.
Gradle 2.breaking stereotypes.Gradle 2.breaking stereotypes.
Gradle 2.breaking stereotypes.Stfalcon Meetups
 
OSGi in Action Chapter 1 and 2
OSGi in Action Chapter 1 and 2OSGi in Action Chapter 1 and 2
OSGi in Action Chapter 1 and 2pjhInovex
 
Extending Magnolia CMS with ModeShape
Extending Magnolia CMS with ModeShapeExtending Magnolia CMS with ModeShape
Extending Magnolia CMS with ModeShapebkraft
 
Building Secure OSGi Applications
Building Secure OSGi ApplicationsBuilding Secure OSGi Applications
Building Secure OSGi ApplicationsMarcel Offermans
 

Similaire à OSGi R4 Framework Improves Java Modularity with Flexible Package Dependencies (20)

OSGi Service Platform Release 4 Overview - BJ Hargrave, IBM & Peter Kriens, a...
OSGi Service Platform Release 4 Overview - BJ Hargrave, IBM & Peter Kriens, a...OSGi Service Platform Release 4 Overview - BJ Hargrave, IBM & Peter Kriens, a...
OSGi Service Platform Release 4 Overview - BJ Hargrave, IBM & Peter Kriens, a...
 
Using the OSGi Application Model on Mobile Devices with CLDC JVM - Dimitar Va...
Using the OSGi Application Model on Mobile Devices with CLDC JVM - Dimitar Va...Using the OSGi Application Model on Mobile Devices with CLDC JVM - Dimitar Va...
Using the OSGi Application Model on Mobile Devices with CLDC JVM - Dimitar Va...
 
Jax london 2011
Jax london 2011Jax london 2011
Jax london 2011
 
Java Core | Java 8 and OSGi Modularisation | Tim Ellison & Neil Bartlett
Java Core | Java 8 and OSGi Modularisation | Tim Ellison & Neil BartlettJava Core | Java 8 and OSGi Modularisation | Tim Ellison & Neil Bartlett
Java Core | Java 8 and OSGi Modularisation | Tim Ellison & Neil Bartlett
 
OSGi & Blueprint
OSGi & BlueprintOSGi & Blueprint
OSGi & Blueprint
 
OpenJDK Penrose Presentation (JavaOne 2012)
OpenJDK Penrose Presentation (JavaOne 2012)OpenJDK Penrose Presentation (JavaOne 2012)
OpenJDK Penrose Presentation (JavaOne 2012)
 
OSGi introduction
OSGi introductionOSGi introduction
OSGi introduction
 
Java Modularity with OSGi
Java Modularity with OSGiJava Modularity with OSGi
Java Modularity with OSGi
 
Calling All Modularity Solutions: A Comparative Study from eBay
Calling All Modularity Solutions: A Comparative Study from eBayCalling All Modularity Solutions: A Comparative Study from eBay
Calling All Modularity Solutions: A Comparative Study from eBay
 
Calling all modularity solutions
Calling all modularity solutionsCalling all modularity solutions
Calling all modularity solutions
 
Create *real* modular Java applications - a brief introduction -
Create *real* modular Java applications - a brief introduction -Create *real* modular Java applications - a brief introduction -
Create *real* modular Java applications - a brief introduction -
 
Modularity of The Java Platform Javaday (http://javaday.org.ua/)
Modularity of The Java Platform Javaday (http://javaday.org.ua/)Modularity of The Java Platform Javaday (http://javaday.org.ua/)
Modularity of The Java Platform Javaday (http://javaday.org.ua/)
 
Guidelines to Improve the Robustness of the OSGi Framework and Its Services A...
Guidelines to Improve the Robustness of the OSGi Framework and Its Services A...Guidelines to Improve the Robustness of the OSGi Framework and Its Services A...
Guidelines to Improve the Robustness of the OSGi Framework and Its Services A...
 
Java 9, JShell, and Modularity
Java 9, JShell, and ModularityJava 9, JShell, and Modularity
Java 9, JShell, and Modularity
 
As7 jbug j_boss_modules_yang yong
As7 jbug j_boss_modules_yang yongAs7 jbug j_boss_modules_yang yong
As7 jbug j_boss_modules_yang yong
 
Java introduction
Java introductionJava introduction
Java introduction
 
Gradle 2.breaking stereotypes.
Gradle 2.breaking stereotypes.Gradle 2.breaking stereotypes.
Gradle 2.breaking stereotypes.
 
OSGi in Action Chapter 1 and 2
OSGi in Action Chapter 1 and 2OSGi in Action Chapter 1 and 2
OSGi in Action Chapter 1 and 2
 
Extending Magnolia CMS with ModeShape
Extending Magnolia CMS with ModeShapeExtending Magnolia CMS with ModeShape
Extending Magnolia CMS with ModeShape
 
Building Secure OSGi Applications
Building Secure OSGi ApplicationsBuilding Secure OSGi Applications
Building Secure OSGi Applications
 

Plus de mfrancis

Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...mfrancis
 
OSGi and Java 9+ - BJ Hargrave (IBM)
OSGi and Java 9+ - BJ Hargrave (IBM)OSGi and Java 9+ - BJ Hargrave (IBM)
OSGi and Java 9+ - BJ Hargrave (IBM)mfrancis
 
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)mfrancis
 
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank LyaruuOSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruumfrancis
 
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...mfrancis
 
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...mfrancis
 
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...mfrancis
 
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)mfrancis
 
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...mfrancis
 
OSGi CDI Integration Specification - Ray Augé (Liferay)
OSGi CDI Integration Specification - Ray Augé (Liferay)OSGi CDI Integration Specification - Ray Augé (Liferay)
OSGi CDI Integration Specification - Ray Augé (Liferay)mfrancis
 
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...mfrancis
 
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...mfrancis
 
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...mfrancis
 
Popular patterns revisited on OSGi - Christian Schneider (Adobe)
Popular patterns revisited on OSGi - Christian Schneider (Adobe)Popular patterns revisited on OSGi - Christian Schneider (Adobe)
Popular patterns revisited on OSGi - Christian Schneider (Adobe)mfrancis
 
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)mfrancis
 
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)mfrancis
 
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...mfrancis
 
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)mfrancis
 
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...mfrancis
 
How to connect your OSGi application - Dirk Fauth (Bosch)
How to connect your OSGi application - Dirk Fauth (Bosch)How to connect your OSGi application - Dirk Fauth (Bosch)
How to connect your OSGi application - Dirk Fauth (Bosch)mfrancis
 

Plus de mfrancis (20)

Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
 
OSGi and Java 9+ - BJ Hargrave (IBM)
OSGi and Java 9+ - BJ Hargrave (IBM)OSGi and Java 9+ - BJ Hargrave (IBM)
OSGi and Java 9+ - BJ Hargrave (IBM)
 
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
 
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank LyaruuOSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
 
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
 
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
 
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
 
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
 
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
 
OSGi CDI Integration Specification - Ray Augé (Liferay)
OSGi CDI Integration Specification - Ray Augé (Liferay)OSGi CDI Integration Specification - Ray Augé (Liferay)
OSGi CDI Integration Specification - Ray Augé (Liferay)
 
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
 
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
 
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
 
Popular patterns revisited on OSGi - Christian Schneider (Adobe)
Popular patterns revisited on OSGi - Christian Schneider (Adobe)Popular patterns revisited on OSGi - Christian Schneider (Adobe)
Popular patterns revisited on OSGi - Christian Schneider (Adobe)
 
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
 
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
 
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
 
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
 
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
 
How to connect your OSGi application - Dirk Fauth (Bosch)
How to connect your OSGi application - Dirk Fauth (Bosch)How to connect your OSGi application - Dirk Fauth (Bosch)
How to connect your OSGi application - Dirk Fauth (Bosch)
 

Dernier

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 

Dernier (20)

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 

OSGi R4 Framework Improves Java Modularity with Flexible Package Dependencies

  • 1. New Modularity Features of the OSGi R4 Service Platform Richard S. HallRichard S. Hall
  • 3. OSGi Success as a Modularity FrameworkOSGi Success as a Modularity Framework •• OSGi framework is increasingly used as aOSGi framework is increasingly used as a modularity mechanism for Javamodularity mechanism for Java –– Provides logical and physical system structuringProvides logical and physical system structuring •• Has benefits for development and deploymentHas benefits for development and deployment –– Provides sophisticated dynamic module lifeProvides sophisticated dynamic module life--cyclecycle managementmanagement •• Simplifies creation of dynamicallySimplifies creation of dynamically extensible systemsextensible systems –– Where system components can be added, removed, or rebound at runWhere system components can be added, removed, or rebound at run time while the system as a whole continues to functiontime while the system as a whole continues to function •• However, modularity was not the original goal...However, modularity was not the original goal...
  • 4. •• ““(Desirable) property of a system, such that(Desirable) property of a system, such that individual components can be examined, modifiedindividual components can be examined, modified and maintained independently of the remainder ofand maintained independently of the remainder of the system. Objective is that changes in one part ofthe system. Objective is that changes in one part of a system should not lead to unexpected behavior ina system should not lead to unexpected behavior in other parts.other parts.”” (www.maths.bath.ac.uk/~jap/MATH0015/glossary.html)(www.maths.bath.ac.uk/~jap/MATH0015/glossary.html) •• Different types of modularityDifferent types of modularity –– LogicalLogical •• Useful during development to decompose and/or structure theUseful during development to decompose and/or structure the systemsystem –– PhysicalPhysical •• Useful after development to simplify deploymentUseful after development to simplify deployment and maintenanceand maintenance What is Modularity?What is Modularity?
  • 5. Why Care About Modularity?Why Care About Modularity? •• Simplifies the creation of large, complex systemsSimplifies the creation of large, complex systems –– Improves robustnessImproves robustness –– Eases problem diagnosisEases problem diagnosis –– Enables splitting work among independent teamsEnables splitting work among independent teams •• Simplifies the deployment and maintenance ofSimplifies the deployment and maintenance of systemssystems •• Simplifies aspects of extensible and dynamicSimplifies aspects of extensible and dynamic systemssystems •• Java needs improvement in this areaJava needs improvement in this area –– Java currently lags .NET in support for modularityJava currently lags .NET in support for modularity –– OSGi specification deals with many of theseOSGi specification deals with many of these issues and can fill that gapissues and can fill that gap
  • 6. Java & OSGi R3 Modularity Support & Limitations
  • 7. Standard Java Modularity MechanismsStandard Java Modularity Mechanisms •• ClassesClasses –– Provide logical static scoping via access modifiers (i.e.,Provide logical static scoping via access modifiers (i.e., publicpublic,, protectedprotected,, privateprivate)) •• PackagesPackages –– Provide logical static scoping viaProvide logical static scoping via package privatespackage privates –– Namespace mechanism, avoids name clashesNamespace mechanism, avoids name clashes •• Java Archive (JAR) filesJava Archive (JAR) files –– Provide form of physical modularityProvide form of physical modularity •• May contain applications, extensions, or servicesMay contain applications, extensions, or services •• May declare dependenciesMay declare dependencies •• May contain package version and sealing informationMay contain package version and sealing information •• Class loadersClass loaders –– Enable runEnable run--time code loadingtime code loading –– Provide logical dynamic scopingProvide logical dynamic scoping
  • 8. Standard Java Modularity Limitations (1)Standard Java Modularity Limitations (1) •• Limited scoping mechanismsLimited scoping mechanisms –– No module access modifierNo module access modifier •• Simplistic version handlingSimplistic version handling –– Class path is first version foundClass path is first version found –– JAR files assume backwards compatibility at bestJAR files assume backwards compatibility at best •• Implicit dependenciesImplicit dependencies –– Dependencies are implicit in class path orderingDependencies are implicit in class path ordering –– JAR files add improvements for extensions, but cannotJAR files add improvements for extensions, but cannot control visibilitycontrol visibility •• Split packages by defaultSplit packages by default –– Class path approach searches until if finds, which canClass path approach searches until if finds, which can lead to shadowing or mixing of versionslead to shadowing or mixing of versions –– JAR files can provide sealingJAR files can provide sealing
  • 9. Standard Java Modularity Limitations (2)Standard Java Modularity Limitations (2) •• LowLow--level support for dynamicslevel support for dynamics –– Class loaders are complicated to useClass loaders are complicated to use •• Unsophisticated consistency modelUnsophisticated consistency model –– Cuts across previous issues, it is difficult to ensure classCuts across previous issues, it is difficult to ensure class space consistencyspace consistency •• Missing module conceptMissing module concept –– Classes too fine grained, packages too simplistic, classClasses too fine grained, packages too simplistic, class loaders too low levelloaders too low level –– JAR files are best candidates, but still inadequateJAR files are best candidates, but still inadequate –– Modularity is a secondModularity is a second--class concept as opposed to theclass concept as opposed to the .NET platform.NET platform •• In .NET, Assembly usage is enforced with explicitIn .NET, Assembly usage is enforced with explicit versioning rules and sharing occurs via the Globalversioning rules and sharing occurs via the Global Assembly CacheAssembly Cache
  • 10. OSGi R3 ModularityOSGi R3 Modularity •• Improves upon standard Java modularityImproves upon standard Java modularity –– DefinesDefines bundlebundle, a logical and physical modularity unit, a logical and physical modularity unit •• Explicit dependenciesExplicit dependencies •• Explicit versioningExplicit versioning •• Internal class path conceptInternal class path concept •• Code isolationCode isolation •• Packaging formatPackaging format –– Defines dynamic bundle life cycleDefines dynamic bundle life cycle •• Possible to install, update, and uninstall code at run timePossible to install, update, and uninstall code at run time •• Replaces lowReplaces low--level class loaderslevel class loaders
  • 11. OSGi R3 Modularity Issues (1)OSGi R3 Modularity Issues (1) •• Package sharing is only globalPackage sharing is only global –– Cannot have multiple shared versionsCannot have multiple shared versions •• Simplistic versioning semanticsSimplistic versioning semantics –– Always backwards compatibleAlways backwards compatible •• Not intended for sharing implementation packagesNot intended for sharing implementation packages –– Only for specification packages, which was why theOnly for specification packages, which was why the version model is simpleversion model is simple •• Provider selection is always anonymousProvider selection is always anonymous –– No way to influence selectionNo way to influence selection
  • 12. OSGi R3 Modularity Issues (2)OSGi R3 Modularity Issues (2) •• Simplistic consistency modelSimplistic consistency model –– Consistency model based on single inConsistency model based on single in--use versionuse version –– No way to declare dependencies among packagesNo way to declare dependencies among packages •• CoarseCoarse--grained package visibility rulesgrained package visibility rules –– Classes in a package are either completely visible toClasses in a package are either completely visible to everyone or hiddeneveryone or hidden •• Module content is not extensibleModule content is not extensible –– All content of the logical module must be included in theAll content of the logical module must be included in the physical modulephysical module •• Package dependencies are not always appropriatePackage dependencies are not always appropriate –– Package metadata is cumbersome in large,Package metadata is cumbersome in large, complex systems, tightly coupled subsystemscomplex systems, tightly coupled subsystems and in less structured legacy systemsand in less structured legacy systems
  • 13. OSGi R4 Framework Modularity Support for the Future
  • 14. Modularity RequirementsModularity Requirements •• Backwards compatible with OSGi R3Backwards compatible with OSGi R3 •• Defined in terms of Java packagesDefined in terms of Java packages –– WellWell--defined concept in Javadefined concept in Java –– Maps nicely to class loadersMaps nicely to class loaders •• Explicitly defined boundariesExplicitly defined boundaries •• Explicitly defined dependenciesExplicitly defined dependencies •• Support for versioning and multiSupport for versioning and multi--versionsversions •• Flexible, must supportFlexible, must support –– Small to large systemsSmall to large systems –– Static to dynamic systemsStatic to dynamic systems
  • 15. Related WorkRelated Work •• Module mechanismsModule mechanisms –– MJ: A Rational Module System for Java and itsMJ: A Rational Module System for Java and its Applications (J. Corwin et alApplications (J. Corwin et al –– IBM)IBM) –– Mechanisms for Secure Modular Programming in JavaMechanisms for Secure Modular Programming in Java (L. Bauer et al(L. Bauer et al –– Princeton University)Princeton University) –– Units: Cool Modules for HOT Languages (M. Flatt andUnits: Cool Modules for HOT Languages (M. Flatt and M. FelleisenM. Felleisen –– Rice University)Rice University) –– Evolving Software with Extensible Modules (M. ZengerEvolving Software with Extensible Modules (M. Zenger –– ÉÉcole Polytechnique Fcole Polytechnique Fééddéérale de Lausanne)rale de Lausanne) •• Component and extensible frameworksComponent and extensible frameworks –– EJB, Eclipse, NetBeansEJB, Eclipse, NetBeans •• Microsoft .NETMicrosoft .NET –– Assemblies and Global Assembly CacheAssemblies and Global Assembly Cache
  • 16. OSGi R4 Modularity (1)OSGi R4 Modularity (1) •• Limitation: Package sharing is only globalLimitation: Package sharing is only global
  • 17. OSGi R4 Modularity (1)OSGi R4 Modularity (1) •• Limitation: Package sharing is only globalLimitation: Package sharing is only global •• MultiMulti--version supportversion support –– Possible to have more than one version of a sharedPossible to have more than one version of a shared package in memory at the same timepackage in memory at the same time –– General change of philosophy to the prior OSGiGeneral change of philosophy to the prior OSGi specificationsspecifications –– Has deep impact on service aspects as well asHas deep impact on service aspects as well as modularitymodularity •• For a given bundle, the service registry is implicitly partitionFor a given bundle, the service registry is implicitly partitioneded according to the package versions visible to itaccording to the package versions visible to it •• Impact on services not explored further in this presentationImpact on services not explored further in this presentation
  • 18. OSGi R4 Modularity (2)OSGi R4 Modularity (2) •• Limitation: Simplistic versioning semanticsLimitation: Simplistic versioning semantics
  • 19. OSGi R4 Modularity (2)OSGi R4 Modularity (2) •• Limitation: Simplistic versioning semanticsLimitation: Simplistic versioning semantics •• Import version rangesImport version ranges –– Exporters still export a precise version, but importersExporters still export a precise version, but importers may specify an open or closed version rangemay specify an open or closed version range –– Eliminates existing backwards compatibility assumptionEliminates existing backwards compatibility assumption
  • 20. OSGi R4 Modularity (2)OSGi R4 Modularity (2) •• Limitation: Simplistic versioning semanticsLimitation: Simplistic versioning semantics •• Import version rangesImport version ranges –– Exporters still export a precise version, but importersExporters still export a precise version, but importers may specify an open or closed version rangemay specify an open or closed version range –– Eliminates existing backwards compatibility assumptionEliminates existing backwards compatibility assumption Import-Package: foo; version=“[1.0.0,1.5.0)”
  • 21. OSGi R4 Modularity (2)OSGi R4 Modularity (2) •• Limitation: Simplistic versioning semanticsLimitation: Simplistic versioning semantics •• Import version rangesImport version ranges –– Exporters still export a precise version, but importersExporters still export a precise version, but importers may specify an open or closed version rangemay specify an open or closed version range –– Eliminates existing backwards compatibility assumptionEliminates existing backwards compatibility assumption •• Limitation: Not intended for sharing implementationLimitation: Not intended for sharing implementation packagespackages Import-Package: foo; version=“[1.0.0,1.5.0)”
  • 22. OSGi R4 Modularity (2)OSGi R4 Modularity (2) •• Limitation: Simplistic versioning semanticsLimitation: Simplistic versioning semantics •• Import version rangesImport version ranges –– Exporters still export a precise version, but importersExporters still export a precise version, but importers may specify an open or closed version rangemay specify an open or closed version range –– Eliminates existing backwards compatibility assumptionEliminates existing backwards compatibility assumption •• Limitation: Not intended for sharing implementationLimitation: Not intended for sharing implementation packagespackages • Multi-version sharing and importing version ranges make implementation package sharing possible Import-Package: foo; version=“[1.0.0,1.5.0)”
  • 23. OSGi R4 Modularity (3)OSGi R4 Modularity (3) •• Limitation: Provider selection is always anonymousLimitation: Provider selection is always anonymous
  • 24. OSGi R4 Modularity (3)OSGi R4 Modularity (3) •• Limitation: Provider selection is always anonymousLimitation: Provider selection is always anonymous •• Arbitrary export/import attributesArbitrary export/import attributes –– Exporters may attach arbitrary attributes to their exports,Exporters may attach arbitrary attributes to their exports, importers can match against these arbitrary attributesimporters can match against these arbitrary attributes •• Exporters may declare attributes as mandatoryExporters may declare attributes as mandatory –– Mandatory attributes provide simple means to limit package visibMandatory attributes provide simple means to limit package visibilityility –– Importers influence package selection using arbitraryImporters influence package selection using arbitrary attribute matchingattribute matching
  • 25. OSGi R4 Modularity (3)OSGi R4 Modularity (3) •• Limitation: Provider selection is always anonymousLimitation: Provider selection is always anonymous •• Arbitrary export/import attributesArbitrary export/import attributes –– Exporters may attach arbitrary attributes to their exports,Exporters may attach arbitrary attributes to their exports, importers can match against these arbitrary attributesimporters can match against these arbitrary attributes •• Exporters may declare attributes as mandatoryExporters may declare attributes as mandatory –– Mandatory attributes provide simple means to limit package visibMandatory attributes provide simple means to limit package visibilityility –– Importers influence package selection using arbitraryImporters influence package selection using arbitrary attribute matchingattribute matching Export-Package: foo; version=“1.0.0”; myattr=“myvalue” Export-Package: foo; version=“1.0.0” A foo (myattr=“myvalue”) Bfoo
  • 26. OSGi R4 Modularity (3)OSGi R4 Modularity (3) •• Limitation: Provider selection is always anonymousLimitation: Provider selection is always anonymous •• Arbitrary export/import attributesArbitrary export/import attributes –– Exporters may attach arbitrary attributes to their exports,Exporters may attach arbitrary attributes to their exports, importers can match against these arbitrary attributesimporters can match against these arbitrary attributes •• Exporters may declare attributes as mandatoryExporters may declare attributes as mandatory –– Mandatory attributes provide simple means to limit package visibMandatory attributes provide simple means to limit package visibilityility –– Importers influence package selection using arbitraryImporters influence package selection using arbitrary attribute matchingattribute matching A foo (myattr=myvalue) BfooCfoo Import-Package: foo; version=“1.0.0”; myattr=“myvalue”
  • 27. OSGi R4 Modularity (3)OSGi R4 Modularity (3) •• Limitation: Provider selection is always anonymousLimitation: Provider selection is always anonymous •• Arbitrary export/import attributesArbitrary export/import attributes –– Exporters may attach arbitrary attributes to their exports,Exporters may attach arbitrary attributes to their exports, importers can match against these arbitrary attributesimporters can match against these arbitrary attributes •• Exporters may declare attributes as mandatoryExporters may declare attributes as mandatory –– Mandatory attributes provide simple means to limit package visibMandatory attributes provide simple means to limit package visibilityility –– Importers influence package selection using arbitraryImporters influence package selection using arbitrary attribute matchingattribute matching A foo (myattr=myvalue) Import-Package: foo; version=“1.0.0”; myattr=“myvalue” Cfoo Bfoo
  • 28. OSGi R4 Modularity (4)OSGi R4 Modularity (4) •• Limitation: Simplistic consistency modelLimitation: Simplistic consistency model
  • 29. OSGi R4 Modularity (4)OSGi R4 Modularity (4) •• Limitation: Simplistic consistency modelLimitation: Simplistic consistency model •• Sophisticated package consistency modelSophisticated package consistency model –– Exporters may declare packageExporters may declare package ““usesuses”” dependenciesdependencies •• Exported packages express dependencies on imported orExported packages express dependencies on imported or other exported packages, which constrain the resolve processother exported packages, which constrain the resolve process –– The framework must ensure that importers do not violateThe framework must ensure that importers do not violate constraints implied byconstraints implied by ““usesuses”” dependenciesdependencies
  • 30. OSGi R4 Modularity (4)OSGi R4 Modularity (4) •• Limitation: Simplistic consistency modelLimitation: Simplistic consistency model •• Sophisticated package consistency modelSophisticated package consistency model –– Exporters may declare packageExporters may declare package ““usesuses”” dependenciesdependencies •• Exported packages express dependencies on imported orExported packages express dependencies on imported or other exported packages, which constrain the resolve processother exported packages, which constrain the resolve process –– The framework must ensure that importers do not violateThe framework must ensure that importers do not violate constraints implied byconstraints implied by ““usesuses”” dependenciesdependencies DfooA foo Export-Package: foo Export-Package: foo
  • 31. OSGi R4 Modularity (4)OSGi R4 Modularity (4) •• Limitation: Simplistic consistency modelLimitation: Simplistic consistency model •• Sophisticated package consistency modelSophisticated package consistency model –– Exporters may declare packageExporters may declare package ““usesuses”” dependenciesdependencies •• Exported packages express dependencies on imported orExported packages express dependencies on imported or other exported packages, which constrain the resolve processother exported packages, which constrain the resolve process –– The framework must ensure that importers do not violateThe framework must ensure that importers do not violate constraints implied byconstraints implied by ““usesuses”” dependenciesdependencies DfooA foo C foobar Import-Package: foo, bar
  • 32. OSGi R4 Modularity (4)OSGi R4 Modularity (4) •• Limitation: Simplistic consistency modelLimitation: Simplistic consistency model •• Sophisticated package consistency modelSophisticated package consistency model –– Exporters may declare packageExporters may declare package ““usesuses”” dependenciesdependencies •• Exported packages express dependencies on imported orExported packages express dependencies on imported or other exported packages, which constrain the resolve processother exported packages, which constrain the resolve process –– The framework must ensure that importers do not violateThe framework must ensure that importers do not violate constraints implied byconstraints implied by ““usesuses”” dependenciesdependencies DfooA foo B barfoo Import-Package: foo Export-Package: bar; uses:=“foo” C foobar
  • 33. OSGi R4 Modularity (4)OSGi R4 Modularity (4) •• Limitation: Simplistic consistency modelLimitation: Simplistic consistency model •• Sophisticated package consistency modelSophisticated package consistency model –– Exporters may declare packageExporters may declare package ““usesuses”” dependenciesdependencies •• Exported packages express dependencies on imported orExported packages express dependencies on imported or other exported packages, which constrain the resolve processother exported packages, which constrain the resolve process –– The framework must ensure that importers do not violateThe framework must ensure that importers do not violate constraints implied byconstraints implied by ““usesuses”” dependenciesdependencies DfooA foo C foobarB barfoo Import-Package: foo Export-Package: bar; uses:=“foo”
  • 34. OSGi R4 Modularity (4)OSGi R4 Modularity (4) •• Limitation: Simplistic consistency modelLimitation: Simplistic consistency model •• Sophisticated package consistency modelSophisticated package consistency model –– Exporters may declare packageExporters may declare package ““usesuses”” dependenciesdependencies •• Exported packages express dependencies on imported orExported packages express dependencies on imported or other exported packages, which constrain the resolve processother exported packages, which constrain the resolve process –– The framework must ensure that importers do not violateThe framework must ensure that importers do not violate constraints implied byconstraints implied by ““usesuses”” dependenciesdependencies DfooA foo C foobarB barfoo Import-Package: foo Export-Package: bar; uses:=“foo”
  • 35. OSGi R4 Modularity (4)OSGi R4 Modularity (4) •• Limitation: Simplistic consistency modelLimitation: Simplistic consistency model •• Sophisticated package consistency modelSophisticated package consistency model –– Exporters may declare packageExporters may declare package ““usesuses”” dependenciesdependencies •• Exported packages express dependencies on imported orExported packages express dependencies on imported or other exported packages, which constrain the resolve processother exported packages, which constrain the resolve process –– The framework must ensure that importers do not violateThe framework must ensure that importers do not violate constraints implied byconstraints implied by ““usesuses”” dependenciesdependencies DfooA foo C foobarB barfoo Import-Package: foo Export-Package: bar; uses:=“foo”
  • 36. OSGi R4 Modularity (4)OSGi R4 Modularity (4) •• Limitation: Simplistic consistency modelLimitation: Simplistic consistency model •• Sophisticated package consistency modelSophisticated package consistency model –– Exporters may declare packageExporters may declare package ““usesuses”” dependenciesdependencies •• Exported packages express dependencies on imported orExported packages express dependencies on imported or other exported packages, which constrain the resolve processother exported packages, which constrain the resolve process –– The framework must ensure that importers do not violateThe framework must ensure that importers do not violate constraints implied byconstraints implied by ““usesuses”” dependenciesdependencies DfooA foo C foobarB barfoo Import-Package: foo Export-Package: bar; uses:=“foo”
  • 37. OSGi R4 Modularity (5)OSGi R4 Modularity (5) •• Limitation: CoarseLimitation: Coarse--grained package visibility rulesgrained package visibility rules
  • 38. OSGi R4 Modularity (5)OSGi R4 Modularity (5) •• Limitation: CoarseLimitation: Coarse--grained package visibility rulesgrained package visibility rules •• Package filteringPackage filtering –– Exporters may declare that certain classes areExporters may declare that certain classes are included/excluded from the exported packageincluded/excluded from the exported package
  • 39. OSGi R4 Modularity (5)OSGi R4 Modularity (5) •• Limitation: CoarseLimitation: Coarse--grained package visibility rulesgrained package visibility rules •• Package filteringPackage filtering –– Exporters may declare that certain classes areExporters may declare that certain classes are included/excluded from the exported packageincluded/excluded from the exported package foo friend=“yes” (include:=”*”) foo (exclude:=”*Impl”) A Export-Package: foo; exclude:=“*Impl”, foo; friend=“yes”; mandatory:=“friend”
  • 40. OSGi R4 Modularity (5)OSGi R4 Modularity (5) •• Limitation: CoarseLimitation: Coarse--grained package visibility rulesgrained package visibility rules •• Package filteringPackage filtering –– Exporters may declare that certain classes areExporters may declare that certain classes are included/excluded from the exported packageincluded/excluded from the exported package foo (exclude:=“*Impl”) A CfooB foo Import-Package: foo; friend=“yes” Import-Package: foo foo friend=“yes” (include:=”*”)
  • 41. OSGi R4 Modularity (5)OSGi R4 Modularity (5) •• Limitation: CoarseLimitation: Coarse--grained package visibility rulesgrained package visibility rules •• Package filteringPackage filtering –– Exporters may declare that certain classes areExporters may declare that certain classes are included/excluded from the exported packageincluded/excluded from the exported package A Import-Package: foo CfooB foo foo friend=“yes” (include:=”*”) foo (exclude:=”*Impl”) Import-Package: foo; friend=“yes”
  • 42. OSGi R4 Modularity (5)OSGi R4 Modularity (5) •• Limitation: CoarseLimitation: Coarse--grained package visibility rulesgrained package visibility rules •• Package filteringPackage filtering –– Exporters may declare that certain classes areExporters may declare that certain classes are included/excluded from the exported packageincluded/excluded from the exported package A Import-Package: foo CfooB foo foo friend=“yes” (include:=”*”) foo (exclude:=”*Impl”) Import-Package: foo; friend=“yes”
  • 43. OSGi R4 Modularity (6)OSGi R4 Modularity (6) •• Limitation: Module content is not extensibleLimitation: Module content is not extensible
  • 44. OSGi R4 Modularity (6)OSGi R4 Modularity (6) •• Limitation: Module content is not extensibleLimitation: Module content is not extensible •• Bundle fragmentsBundle fragments –– A special bundle that attaches to a host bundle and usesA special bundle that attaches to a host bundle and uses the same class loaderthe same class loader •• Conceptually becomes part of the host bundleConceptually becomes part of the host bundle
  • 45. OSGi R4 Modularity (6)OSGi R4 Modularity (6) •• Limitation: Module content is not extensibleLimitation: Module content is not extensible •• Bundle fragmentsBundle fragments –– A special bundle that attaches to a host bundle and usesA special bundle that attaches to a host bundle and uses the same class loaderthe same class loader •• Conceptually becomes part of the host bundleConceptually becomes part of the host bundle fooAbaz barBwoz Fragment-Host: B Export-Package: foo Import-Package: baz Bundle-SymbolicName: B Export-Package: bar Import-Package: woz
  • 46. fooAbaz OSGi R4 Modularity (6)OSGi R4 Modularity (6) •• Limitation: Module content is not extensibleLimitation: Module content is not extensible •• Bundle fragmentsBundle fragments –– A special bundle that attaches to a host bundle and usesA special bundle that attaches to a host bundle and uses the same class loaderthe same class loader •• Conceptually becomes part of the host bundleConceptually becomes part of the host bundle barBwoz
  • 47. OSGi R4 Modularity (6)OSGi R4 Modularity (6) •• Limitation: Module content is not extensibleLimitation: Module content is not extensible •• Bundle fragmentsBundle fragments –– A special bundle that attaches to a host bundle and usesA special bundle that attaches to a host bundle and uses the same class loaderthe same class loader •• Conceptually becomes part of the host bundleConceptually becomes part of the host bundle barBwoz fooAbaz
  • 48. OSGi R4 Modularity (6)OSGi R4 Modularity (6) •• Limitation: Module content is not extensibleLimitation: Module content is not extensible •• Bundle fragmentsBundle fragments –– A special bundle that attaches to a host bundle and usesA special bundle that attaches to a host bundle and uses the same class loaderthe same class loader •• Conceptually becomes part of the host bundleConceptually becomes part of the host bundle barBwoz fooAbaz
  • 49. OSGi R4 Modularity (6)OSGi R4 Modularity (6) •• Limitation: Module content is not extensibleLimitation: Module content is not extensible •• Bundle fragmentsBundle fragments –– A special bundle that attaches to a host bundle and usesA special bundle that attaches to a host bundle and uses the same class loaderthe same class loader •• Conceptually becomes part of the host bundleConceptually becomes part of the host bundle bar foo B fooAbaz woz baz
  • 50. OSGi R4 Modularity (7)OSGi R4 Modularity (7) •• Limitation: Package dependencies are not alwaysLimitation: Package dependencies are not always appropriateappropriate
  • 51. OSGi R4 Modularity (7)OSGi R4 Modularity (7) •• Limitation: Package dependencies are not alwaysLimitation: Package dependencies are not always appropriateappropriate •• Bundle dependenciesBundle dependencies –– Import everything that another, specific bundle exportsImport everything that another, specific bundle exports –– Allows reAllows re--exportingexporting
  • 52. OSGi R4 Modularity (7)OSGi R4 Modularity (7) •• Limitation: Package dependencies are not alwaysLimitation: Package dependencies are not always appropriateappropriate •• Bundle dependenciesBundle dependencies –– Import everything that another, specific bundle exportsImport everything that another, specific bundle exports –– Allows reAllows re--exportingexporting B barfoo bar A Require-Bundle: A Export-Package: bar Bundle-SymbolicName: A Export-Package: bar, foo
  • 53. OSGi R4 Modularity (7)OSGi R4 Modularity (7) •• Limitation: Package dependencies are not alwaysLimitation: Package dependencies are not always appropriateappropriate •• Bundle dependenciesBundle dependencies –– Import everything that another, specific bundle exportsImport everything that another, specific bundle exports –– Allows reAllows re--exportingexporting foo bar A Require-Bundle: A Export-Package: bar Bundle-SymbolicName: A Export-Package: bar, foo B bar
  • 54. Example OSGi R4 Bundle ManifestExample OSGi R4 Bundle Manifest Bundle-ManifestVersion: 2 Bundle-SymbolicName: org.foo.simplebundle Bundle-Activator: org.foo.Activator Bundle-ClassPath: .,org/foo/embedded.jar Bundle-NativeCode: libfoo.so; osname=Linux; processor=x86, foo.dll; osname=Windows 98; processor=x86 Import-Package: javax.servlet; version=“[2.0.0,2.4.0)”; resolution:=“optional” Export-Package: org.foo.service; version=1.1; vendor=“org.foo”; exclude:=“*Impl”, org.foo.service.bar; version=1.1; uses:=“org.foo.service”
  • 55. ChallengesChallenges •• Manage the complexityManage the complexity –– Maintain conceptual integrityMaintain conceptual integrity –– Keep the simple cases simpleKeep the simple cases simple –– Complexity should only be visible when it is requiredComplexity should only be visible when it is required –– Avoid bloat to support small devicesAvoid bloat to support small devices
  • 56. ChallengesChallenges •• Manage the complexityManage the complexity –– Maintain conceptual integrityMaintain conceptual integrity –– Keep the simple cases simpleKeep the simple cases simple –– Complexity should only be visible when it is requiredComplexity should only be visible when it is required –– Avoid bloat to support small devicesAvoid bloat to support small devices TheThe ““good newsgood news”” is that these changes generallyis that these changes generally only affect the dependency resolving algorithmonly affect the dependency resolving algorithm
  • 57. ConclusionsConclusions •• Java needs improved modularity supportJava needs improved modularity support –– We need to stop reWe need to stop re--inventing the wheelinventing the wheel –– Improve application structureImprove application structure –– Simplify deployment and management especially inSimplify deployment and management especially in technological areas where deployment is inherenttechnological areas where deployment is inherent •• e.g., component orientation, extensible systems, and servicee.g., component orientation, extensible systems, and service orientation (to some degree)orientation (to some degree) •• OSGi R1/R2/R3 were all steps in the right directionOSGi R1/R2/R3 were all steps in the right direction •• OSGi R4 goes even further in providingOSGi R4 goes even further in providing sophisticated Java modularitysophisticated Java modularity –– OSGi technology is cited in JSR 277, an initiative by SunOSGi technology is cited in JSR 277, an initiative by Sun to define a module system for Java, whose expert groupto define a module system for Java, whose expert group includes OSGi membersincludes OSGi members