SlideShare une entreprise Scribd logo
1  sur  31
Télécharger pour lire hors ligne
Graham Charters - Senior Technical Staff Member, WebSphere Application Server
October 2012

Hints and Tips for Modularizing Existing Enterprise
Applications
Graham Charters

© IBM Corporation 2012
Agenda

 Motivation for a Modular Enterprise

 Approaches to OSGi Adoption
 A Staged Approach in Detail
 Summary

2

© IBM Corporation 2012
Modularity Issues in Java EE
Java EE modularity is inadequate
Across apps - each archive typically contains
all required libraries
– Common libraries/frameworks get installed
with each application
– Multiple copies of libraries in memory

webB.war
WEB-INF/classes/servletB.class
WEB-INF/lib/json4j.jar
webC.war
WEB-INF/lib/commons-logging.jar
WEB-INF/classes/servletC.class
WEB-INF/lib/junit.jar…
WEB-INF/lib/json4j.jar
WEB-INF/lib/commons-logging.jar
WEB-INF/lib/junit.jar…

plankton.v1

Within apps - 3rd party libraries
consume other 3rd party libraries
leading to conflicting versions on
the application classpath.

3

plankton.v2

© IBM Corporation 2012
Enterprise OSGi
Specifications are growing coverage
 First specification released 2010 added:
– Web Applications (WAR -> WAB)
– JNDI (including OSGi Service scheme)
– Transactions
– Blueprint (inspired by Spring)
– Remote Services
 Second specification released 2012, added:
– Subsystems (standard application model)
– Repository
– Resolver
 Work in the pipeline
– EJB
– CDI
– Blueprint transactions
– Blueprint enhancements
 Platforms are plugging the gaps: Apache Aries, Eclipse Virgo, Apache Geronimo,
WebSphere Application Server, JBoss AS, Glassfish, ... your mileage may vary...
4

© IBM Corporation 2012
A Staged Approach
 Lots of good reasons to improve modularity but don‟t have to achieve all in one go
– “Big bang” =often=> “damp squib”
 Incremental successes are successes that help build and sustain momentum

 A bad practice may still be a better practice (a means to an end)

A

How?
B

C

D
5

© IBM Corporation 2012
Useful Tools

 Many tools help with OSGi development, including bundle generation from simple
configuration
– Rational Application Developer
– IBM WebSphere Application Server V8.5 Developer Tools V8.5
– BND
– BNDTools
– Maven-bundle-plugin
– BND Ant Task
– ...
 Example taken from modularizing the Apache Geronimo DayTrader application.
 DayTrader is built using maven and so maven-bundle-plugin snippets are used throughout.

6

© IBM Corporation 2012
Strategies

 A number of possible approaches:
– Hargrave & Kriens: “Single Bundle”
– Feng & Charters: “One to One”
– Nottingham & Charters: “Fragments” (a “work in progress”)

7

© IBM Corporation 2012
Hargrave & Kriens
 JavaOne 2008: http://www.osgi.org/wiki/uploads/Links/TS-5122.pdf
 Approach Summary:
1. Single bundle project with all dependent jars on Bundle-Classpath
2. Over time, pull out dependent jars as bundles
 Focuses on Java SE:
– Does not consider Java EE classloaders
– Does not consider Java EE component models
 Surfaces OSGi slower, but delivers incremental benefits
bundle
entities

application

bundle

entities

log

entities

log

core

ejb3

core

core

ejb3

ejb3
log

8

© IBM Corporation 2012
Feng & Charters
 ApacheCon 2009:
http://people.apache.org/~lresende/presentations/felix%20goes%20to%20tuscany.pdf
 Approach Summary:
1. Convert each build module directly to an OSGi Bundle
2. Analyze and refactor
 Focused on Java SE
– No consideration for Java EE classloaders
– No consideration for Java EE component models
 Motivated by need to deliver assembly subsets
 Surfaces OSGi early, but longer lead-time to first success
soap

soap

wsappclient
entities

entities

soap

wsappclient

entities
beans

log

beans

log

wsappclient

core
web

web

core

core

streamer
json-proxy

json-proxy

ejb3

9

web
streamer

streamer
json-proxy
ejb3

ejb3

© IBM Corporation 2012
Nottingham & Charters
 EclipseCon 2012: this deck
 Approach Summary:
1. Replicate existing classloading in OSGi using bundle fragments
2. Incrementally separate out individual bundles
3. Adopt OSGi best practices
 Considers Java EE classloading and component models
 Surfaces OSGi early, and incrementally - a staged approach

soap

wsappclient

entities

wab

web

app-host

wab

beans

log

web

core

ejb3

core

log

web

app-host

ejb3

core

log

streamer
json-proxy
ejb3

10

© IBM Corporation 2012
Stage 1: Understanding the starting point

Bootstrap

 Java EE prescribes a hierarchical classloading
model
 Assuming “parent first” and “multiple”:
– Each Application has own classloader
– Each WAR has own class loader
– WAR has visibility to Application classes
– WAR prefers Application classs,
Application prefers System classes, etc...
 OSGi modularity enforced through class
visibility using classloaders
 Migration strategies need to consider the
impact of this change
– e.g. replicate visibility relationships of
existing application in OSGi

11

Extensions
System

Application

WAR

Application

WAR

WAR

© IBM Corporation 2012
Replicating Java EE classloading: Classloaders

 Preserve Application and WAR roles

 Application -> Application Host Bundle
– Add application modules to fragments
of host bundle
 Web App Archive -> Web Application
Bundle
– Add WEB-INF/classes to BundleClasspath
– Extract WEB-INF/lib jars and add as
fragments of Web Application Bundle
 We now have two classloaders just as we
did in Java EE 

System

app-host

Application
ejb3

core

log

wab

WAR

 We also have full visibility of the modules

web

12

© IBM Corporation 2012
Maven-bundle-plugin - Application Host Bundle Example
...
<parent>
...
</parent>
<packaging>bundle</packaging>

bundle artefact type to be built
<groupId>org.apache.geronimo.daytrader.modules</groupId>
<artifactId>app-host</artifactId>
<version>0.1</version>
<name>DayTrader :: Modules – Application</name>
<description>DayTrader Application Module</description>

plugin uses this as default bundle
metadata

<dependencies>
...
</dependencies>

the dependencies to build against

<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<configuration>
<instructions>
...
</instructions>
</configuration>
</plugin>
</plugins>
</build>
</project>
13

extra bundle configuration
(e.g. exports, imports, etc)

© IBM Corporation 2012
Maven-bundle-plugin - Fragment Bundle Example

<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<configuration>
<instructions>
<Fragment-Host>org.apache.geronimo.daytrader.modules.daytrader-app-host</Fragment-Host>
</instructions>
</configuration>
</plugin>

Fragment-Host: org.apache.geronimo.daytrader.modules.daytrader-app-host

14

© IBM Corporation 2012
Replicating Java EE classloading: Delegation
 App and wab can‟t see the container
apis from the System Classloader
 Wab can‟t see app classes
 Solution:
– Add package imports for container
packages to app and wab
– Add package exports to app-host
fragments required by wab
– Add require bundle from wab to app
 Note: delegation semantics are not
identical to Java EE
– WAS provides all imported packages
(close to “parent-first”)
– Bundle provides everything else
– Now have control over what wab &
app-host see from the System
classloader
15

System

X
app-host

X
X
wab

© IBM Corporation 2012
Determining the Container APIs (System Classloader)

Warning: This step will vary depending on target server

 <was_install>/dev contains the APIs in was_public.jar and JavaEE/jee.jar
 Take Export-Package entries and add as Import-Package entries on app and wab
bundles
 If using BND-based tools then can wildcard values (e.g. com.ibm.*, javax.*)
 <was_install>/dev includes a pom for WAS API for maven development (available
since v8.0)
 Applications should not rely on packages not defined in <was_install>/dev

16

© IBM Corporation 2012
Maven-bundle-plugin: Container delegation
mvn install:install-file -DgroupId=com.ibm.websphere.appserver -DartifactId=was_public -Dversion=8.5 Dpackaging=jar -Dfile=was_public-8.5.0.jar

maven dependency
on WAS API

maven-bundle-plugin
(pom.xml)

daytrader-app.jar
META-INF/MANIFEST.MF
17

<dependency>
<groupId>com.ibm.websphere.appserver</groupId>
<artifactId>was_public</artifactId>
<version>8.5</version>
</dependency>

<Import-Package>
<!-- from was_public.jar -->
com.ibm.*,
...
<!-- from jdk & jee.jar -->
javax.*
</Import-Package>

Import-Package:
com.ibm.websphere.ActivitySession;version="1.1.0",
...
javax.xml.rpc.server;version="1.1.0",
javax.xml.rpc.soap;version="1.1.0"
© IBM Corporation 2012
Maven-bundle-plugin: WAB to App Delegation
 Fragment exports (daytrader package naming allowed wildcarding)
<instructions>
<Fragment-Host>org.apache.geronimo.daytrader.modules.daytrader-app-host</Fragment-Host>
<Export-Package>org.apache.geronimo.samples.daytrader.core*</Export-Package>
</instructions>

 Wab Require-Bundle
<instructions>
<Require-Bundle>org.apache.geronimo.daytrader.modules.daytrader-app-host</Require-Bundle>
</instructions>

wab

Require-Bundle:
app-host

Export-Package: ...
app-host

core
log
entities
ejb3

ejb3

18

core

log

© IBM Corporation 2012
A Note on Require-Bundle

 Uses
– Merge split package
– When there‟ll only ever be one provider (e.g. extension points)
 Considered bad practice because:
– The required bundle can change what it provides - brittle in the face of refactoring

19

© IBM Corporation 2012
Extenders: Enabling Component Models
 Web Components, EJBs, Persistence Contexts, Blueprint Beans all handled by extenders
 Extenders look inside bundles for code/metadata to process
 Extenders typically require a bundle to „opt in‟ using a manifest header
– host must opt-in
 JPA entities not permitted to come from fragments: “...any entity classes must originate in
the bundle’s JAR, it cannot come from a fragment.”
<!-- maven-bundle-plugin configuration snippet-->
<instructions>
...
<!-- Opt in for EJB Extender -->
<Export-EJB>&lt;&lt;EMPTY&gt;&gt;</Export-EJB>
</instructions>

<!-- maven-bundle-plugin configuration snippet-->
<instructions>
<!-- Opt in for Web Extender -->
<Web-ContextPath>/daytrader</Web-ContextPath>
</instructions>

20

Tip: <<EMPTY>> allows empty header in BND (needs a recent version
of maven-bundle-plugin)

app-host
Export-EJB:

wab
Web-ContextPath:
/daytrader

© IBM Corporation 2012
OSGi Application

Warning: this step will vary depending
on target server
 Servers typically enable a deployment
artefact and build tools for an
application
 Example was targeting WebSphere,
so used a .eba (a zip file with an
application manifest)
– RAD/WDT tools make
development simple
– Ant zip task and eba-mavenplugin (Apache Aries) can also be
used in builds

<plugin>
<groupId>org.apache.aries</groupId>
<artifactId>eba-maven-plugin</artifactId>
<version>0.4-SNAPSHOT</version>
<extensions>true</extensions>
<configuration>
<generateManifest>true</generateManifest>
<instructions>
<Application-SymbolicName>
${project.artifactId}
</Application-SymbolicName>
</instructions>
</configuration>
</plugin>

Application-Name: DayTrader Application
Application-SymbolicName:
org.apache.aries.samples.daytrader
Application-ManifestVersion: 1
Application-Version: 0.1
Manifest-Version: 1.0
Application-Content:
daytrader.app;version="[0.1,1.0)",
daytrader.wab;version="[0.1,1.0)"

wab

app-host

daytrader.eba
© IBM Corporation 2012
Stage 2: Factoring out Bundles
 Now the application‟s running in OSGi we can start to split out the fragments as
independent, re-usable bundles
 Strategy:
– Do one fragment at a time
– Start with the leaf dependencies
• Wab bundle contents first, then the app bundle
• Project build dependencies help with identification
• Third-party libraries
• “shared libraries” (if runtime supports this concept)
– Detach from host and calculate the package imports & exports

wab

wab

Import-Package: daytrader.web

Fragment-Host: wab

web

22

Export-Package: daytrader.web

web

© IBM Corporation 2012
Split Package Strategies

 A split package is a package exported by more than one provider where the contents differ
– Sub-set/superset relationship - e.g. javax.transactions
– Intersecting or non-intersecting subsets
– Not different releases
 Split packages hint at poor modularity or naming
 Consumers often need access to all providers, but OSGi Import-Package will only wire to
one
 Solution:
– Combine jars with split packages into a single bundle
• Multiple jars on single Bundle-Classpath or
• Fragment Bundles attached to a single host

log
Bundle-Classpath: .,
A.jar. B.jar
Export-Package: p
A

 This approach is tactical and is addressed in Stage 3

23

B

p

p

© IBM Corporation 2012
Converting Jars to Bundles

 Using RAD/WDT?
– Convert Java projects to OSGi Bundle
Projects (also works for EJB and WAR)
– Or import “Java Archive into OSGi
Bundle”
• Wraps Jar in a Bundle

<packaging>bundle</packaging>

 Using maven or ant?
– Modify build to produce bundles (e.g.
maven-bundle-plugin or bnd in ant task)
– Use wild-cards to generate initial
imports/exports then refine...

24

<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<configuration>
<instructions>
...
</instructions>
</configuration>
</plugin>
© IBM Corporation 2012
Third-party Libraries

 Applications often use third-party libraries, such as open source
– DayTrader uses commons.logging
 Many now come with OSGi metadata
 Most others have been bundlized by repository projects
– Eclipse Orbit - bundlized, pedigree reviewed for Eclipse projects
– Apache Felix Commons
– SpringSource Enterprise Bundle Repository
 or by other OSGi-based projects
– Apache Tuscany
– Apache ServiceMix
– Ops4J Pax *
 Use these if available
 But what if you can‟t find a bundlized library...?

25

© IBM Corporation 2012
Bundlizing third-party libraries

 Use tools to calculate manifest
– RAD/WDT Import -> Java Archive into an OSGi Bundle
– BND
– Refine Imports/Exports

 If library required to work inside and outside
OSGi?
– inject OSGi manifest into existing jar
– Doesn‟t work for signed Jars
– Can‟t aggregate multiple Jars

 If library only required to work in OSGi
– Wrap jar in bundle (add jar to BundleClasspath)
– Works for signed jars
– Can aggregate multiple jars, if necessary
26

log
log

inject

Export-Package: org.c...
org/apache/commons/...

log

wrap

log
Bundle-Classpath: .,
log.jar
Export-Package: org.c...
log

© IBM Corporation 2012
The story so far...
 The first two stages have:
– Taken Java EE application and run
in OSGi
– Decomposed single deployment
artefact into multiple bundles

 Now have the potential to:
– Understand the application architecture;
modules used and their relationships (OSGi
Application Console)
– Remove duplicate deployment binaries (single
bundle in repository)
– Remove duplicate runtime binaries (share
bundle in server)
– Reduce operational costs and errors - deploy
shared binaries based on application needs
– Determine which binaries are in use (e.g. to
apply critical fix)
 But there‟s more...
27

© IBM Corporation 2012
Stage 3: Incrementally Adopt Best Practices

 Stage 2 documents the „as-is‟ architecture, warts-„n‟-all
 OSGi Best Practices show how to make the most of OSGi
– Hopefully you attended Emily Jiang‟s session
– http://www.ibm.com/developerworks/websphere/techjournal/1007_charters/1007_charters.html

 Adopting best practices leads to:
– High cohesion - bundles with clear and distinct roles in the architecture
– Loose coupling - flexible, but necessary, dependencies

 ...which all leads to greater agility, flexibility and re-use
– Development teams can understand and explain the architecture and are no longer
afraid to change the code
– Applications can evolve and new application can be created at a pace that enables,
rather than inhibits, the business

28

© IBM Corporation 2012
Summary

 Moving enterprise applications to OSGi helps:
– increase understanding of application architecture
– increase module cohesiveness
– reduce module coupling
 Leads to greater application agility through re-use and understanding of impact of change
 A staged approach to adoption delivers value sooner and in-line with investment

 With the wealth of tools, runtimes, and existing assets, it‟s never been easier to adopt OSGi
 What OSGi could do to better:
– Enable „fragments‟ to define everything except a classloader
– Enable JPA entities in fragments

29

© IBM Corporation 2012
Questions

30

© IBM Corporation 2012
Trademarks

 Eclipse and the Eclipse logo are trademarks of Eclipse Foundation, Inc.

 Apache, Apache Felix, Felix, the Apache Felix project logo, Apache Tuscany and the
Apache Tuscany project logo are trademarks of The Apache Software Foundation.

 Java and all Java-based trademarks and logos are trademarks or registered trademarks of
Oracle and/or its affiliates.
 IBM and the IBM logo are trademarks of International Business Machines Corporation,
registered in many jurisdictions.

 Other marks may be trademarks or registered trademarks of their respective owners.

31

© IBM Corporation 2012

Contenu connexe

Tendances

Hibernate complete notes_by_sekhar_sir_javabynatara_j
Hibernate complete notes_by_sekhar_sir_javabynatara_jHibernate complete notes_by_sekhar_sir_javabynatara_j
Hibernate complete notes_by_sekhar_sir_javabynatara_jSatya Johnny
 
Hibernate Interview Questions
Hibernate Interview QuestionsHibernate Interview Questions
Hibernate Interview QuestionsSyed Shahul
 
Java & J2EE Struts with Hibernate Framework
Java & J2EE Struts with Hibernate FrameworkJava & J2EE Struts with Hibernate Framework
Java & J2EE Struts with Hibernate FrameworkMohit Belwal
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring FrameworkHùng Nguyễn Huy
 
What Is Spring Framework In Java | Spring Framework Tutorial For Beginners Wi...
What Is Spring Framework In Java | Spring Framework Tutorial For Beginners Wi...What Is Spring Framework In Java | Spring Framework Tutorial For Beginners Wi...
What Is Spring Framework In Java | Spring Framework Tutorial For Beginners Wi...Edureka!
 
Spring framework-tutorial
Spring framework-tutorialSpring framework-tutorial
Spring framework-tutorialvinayiqbusiness
 
Flex Continuous Quality Builds Flex & (Ant || Maven)
Flex Continuous Quality Builds Flex & (Ant || Maven)Flex Continuous Quality Builds Flex & (Ant || Maven)
Flex Continuous Quality Builds Flex & (Ant || Maven)François Le Droff
 
Java Modularity with OSGi
Java Modularity with OSGiJava Modularity with OSGi
Java Modularity with OSGiIlya Rybak
 

Tendances (18)

Spring notes
Spring notesSpring notes
Spring notes
 
Java Spring
Java SpringJava Spring
Java Spring
 
Hibernate complete notes_by_sekhar_sir_javabynatara_j
Hibernate complete notes_by_sekhar_sir_javabynatara_jHibernate complete notes_by_sekhar_sir_javabynatara_j
Hibernate complete notes_by_sekhar_sir_javabynatara_j
 
Flex and Java
Flex and JavaFlex and Java
Flex and Java
 
Hibernate Interview Questions
Hibernate Interview QuestionsHibernate Interview Questions
Hibernate Interview Questions
 
Spring
SpringSpring
Spring
 
Java & J2EE Struts with Hibernate Framework
Java & J2EE Struts with Hibernate FrameworkJava & J2EE Struts with Hibernate Framework
Java & J2EE Struts with Hibernate Framework
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework
 
What Is Spring Framework In Java | Spring Framework Tutorial For Beginners Wi...
What Is Spring Framework In Java | Spring Framework Tutorial For Beginners Wi...What Is Spring Framework In Java | Spring Framework Tutorial For Beginners Wi...
What Is Spring Framework In Java | Spring Framework Tutorial For Beginners Wi...
 
Spring framework-tutorial
Spring framework-tutorialSpring framework-tutorial
Spring framework-tutorial
 
Flex Continuous Quality Builds Flex & (Ant || Maven)
Flex Continuous Quality Builds Flex & (Ant || Maven)Flex Continuous Quality Builds Flex & (Ant || Maven)
Flex Continuous Quality Builds Flex & (Ant || Maven)
 
Java Modularity with OSGi
Java Modularity with OSGiJava Modularity with OSGi
Java Modularity with OSGi
 
Code One 2018 maven
Code One 2018   mavenCode One 2018   maven
Code One 2018 maven
 
Introduction to maven
Introduction to mavenIntroduction to maven
Introduction to maven
 
Java vs .Net
Java vs .NetJava vs .Net
Java vs .Net
 
Java Spring Framework
Java Spring FrameworkJava Spring Framework
Java Spring Framework
 
Corejava ratan
Corejava ratanCorejava ratan
Corejava ratan
 
Maven
MavenMaven
Maven
 

En vedette

Towards a Modularity Maturity Model
Towards a Modularity Maturity ModelTowards a Modularity Maturity Model
Towards a Modularity Maturity ModelGraham Charters
 
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
 
What's new in the OSGi Enterprise Release 5.0 - David Bosschaert and Tim Diek...
What's new in the OSGi Enterprise Release 5.0 - David Bosschaert and Tim Diek...What's new in the OSGi Enterprise Release 5.0 - David Bosschaert and Tim Diek...
What's new in the OSGi Enterprise Release 5.0 - David Bosschaert and Tim Diek...mfrancis
 
Liberate your components with OSGi services - Alasdair Nottingham
Liberate your components with OSGi services - Alasdair NottinghamLiberate your components with OSGi services - Alasdair Nottingham
Liberate your components with OSGi services - Alasdair Nottinghammfrancis
 
Service oriented component model
Service oriented component modelService oriented component model
Service oriented component modelravindrareddy
 
Benefits of OSGi in Practise
Benefits of OSGi in PractiseBenefits of OSGi in Practise
Benefits of OSGi in PractiseDavid Bosschaert
 
Creating Large Scale Software Platforms with OSGi and an Extension Point Mode...
Creating Large Scale Software Platforms with OSGi and an Extension Point Mode...Creating Large Scale Software Platforms with OSGi and an Extension Point Mode...
Creating Large Scale Software Platforms with OSGi and an Extension Point Mode...Nuxeo
 
Building LinkedIn's Next Generation Architecture with OSGi
Building LinkedIn's Next Generation  Architecture with OSGiBuilding LinkedIn's Next Generation  Architecture with OSGi
Building LinkedIn's Next Generation Architecture with OSGiLinkedIn
 

En vedette (10)

Towards a Modularity Maturity Model
Towards a Modularity Maturity ModelTowards a Modularity Maturity Model
Towards a Modularity Maturity Model
 
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...
 
What's new in the OSGi Enterprise Release 5.0 - David Bosschaert and Tim Diek...
What's new in the OSGi Enterprise Release 5.0 - David Bosschaert and Tim Diek...What's new in the OSGi Enterprise Release 5.0 - David Bosschaert and Tim Diek...
What's new in the OSGi Enterprise Release 5.0 - David Bosschaert and Tim Diek...
 
Liberate your components with OSGi services - Alasdair Nottingham
Liberate your components with OSGi services - Alasdair NottinghamLiberate your components with OSGi services - Alasdair Nottingham
Liberate your components with OSGi services - Alasdair Nottingham
 
Service oriented component model
Service oriented component modelService oriented component model
Service oriented component model
 
Why OSGi?
Why OSGi?Why OSGi?
Why OSGi?
 
Benefits of OSGi in Practise
Benefits of OSGi in PractiseBenefits of OSGi in Practise
Benefits of OSGi in Practise
 
Creating Large Scale Software Platforms with OSGi and an Extension Point Mode...
Creating Large Scale Software Platforms with OSGi and an Extension Point Mode...Creating Large Scale Software Platforms with OSGi and an Extension Point Mode...
Creating Large Scale Software Platforms with OSGi and an Extension Point Mode...
 
OSGi Presentation
OSGi PresentationOSGi Presentation
OSGi Presentation
 
Building LinkedIn's Next Generation Architecture with OSGi
Building LinkedIn's Next Generation  Architecture with OSGiBuilding LinkedIn's Next Generation  Architecture with OSGi
Building LinkedIn's Next Generation Architecture with OSGi
 

Similaire à Modularizing Enterprise Apps with OSGi

Hints and Tips for Modularizing Existing Enterprise Applications with OSGi - ...
Hints and Tips for Modularizing Existing Enterprise Applications with OSGi - ...Hints and Tips for Modularizing Existing Enterprise Applications with OSGi - ...
Hints and Tips for Modularizing Existing Enterprise Applications with OSGi - ...mfrancis
 
Designing JEE Application Structure
Designing JEE Application StructureDesigning JEE Application Structure
Designing JEE Application Structureodedns
 
Custom Buildpacks and Data Services
Custom Buildpacks and Data ServicesCustom Buildpacks and Data Services
Custom Buildpacks and Data ServicesTom Kranz
 
Best Practices for Enterprise OSGi Applications - Emily Jiang
Best Practices for Enterprise OSGi Applications - Emily JiangBest Practices for Enterprise OSGi Applications - Emily Jiang
Best Practices for Enterprise OSGi Applications - Emily Jiangmfrancis
 
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai..."Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...Fwdays
 
Part 4: Custom Buildpacks and Data Services (Pivotal Cloud Platform Roadshow)
Part 4: Custom Buildpacks and Data Services (Pivotal Cloud Platform Roadshow)Part 4: Custom Buildpacks and Data Services (Pivotal Cloud Platform Roadshow)
Part 4: Custom Buildpacks and Data Services (Pivotal Cloud Platform Roadshow)VMware Tanzu
 
Monoliths are so 2001 – What you need is Modularity
Monoliths are so 2001 – What you need is ModularityMonoliths are so 2001 – What you need is Modularity
Monoliths are so 2001 – What you need is ModularityGraham Charters
 
DevNexus 2017 - Building and Deploying 12 Factor Apps in Scala, Java, Ruby, a...
DevNexus 2017 - Building and Deploying 12 Factor Apps in Scala, Java, Ruby, a...DevNexus 2017 - Building and Deploying 12 Factor Apps in Scala, Java, Ruby, a...
DevNexus 2017 - Building and Deploying 12 Factor Apps in Scala, Java, Ruby, a...Neil Shannon
 
Maven 2.0 - Project management and comprehension tool
Maven 2.0 - Project management and comprehension toolMaven 2.0 - Project management and comprehension tool
Maven 2.0 - Project management and comprehension toolelliando dias
 
An Introduction to Maven and Flex
An Introduction to Maven and FlexAn Introduction to Maven and Flex
An Introduction to Maven and FlexJustin J. Moses
 
Modules all the way down: OSGi and the Java Platform Module System
Modules all the way down: OSGi and the Java Platform Module SystemModules all the way down: OSGi and the Java Platform Module System
Modules all the way down: OSGi and the Java Platform Module SystemTim Ellison
 
GR8Conf 2011: Adopting Grails
GR8Conf 2011: Adopting GrailsGR8Conf 2011: Adopting Grails
GR8Conf 2011: Adopting GrailsGR8Conf
 
Adopting Grails - GR8Conf Europe
Adopting Grails - GR8Conf EuropeAdopting Grails - GR8Conf Europe
Adopting Grails - GR8Conf EuropeKlausBaumecker
 
DevNexus 2019: Migrating to Java 11
DevNexus 2019: Migrating to Java 11DevNexus 2019: Migrating to Java 11
DevNexus 2019: Migrating to Java 11DaliaAboSheasha
 
eXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework IntroductioneXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework Introductionvstorm83
 
Chris OBrien - Pitfalls when developing with the SharePoint Framework (SPFx)
Chris OBrien - Pitfalls when developing with the SharePoint Framework (SPFx)Chris OBrien - Pitfalls when developing with the SharePoint Framework (SPFx)
Chris OBrien - Pitfalls when developing with the SharePoint Framework (SPFx)Chris O'Brien
 
Application Model for Cloud Deployment
Application Model for Cloud DeploymentApplication Model for Cloud Deployment
Application Model for Cloud DeploymentJim Kaskade
 

Similaire à Modularizing Enterprise Apps with OSGi (20)

Hints and Tips for Modularizing Existing Enterprise Applications with OSGi - ...
Hints and Tips for Modularizing Existing Enterprise Applications with OSGi - ...Hints and Tips for Modularizing Existing Enterprise Applications with OSGi - ...
Hints and Tips for Modularizing Existing Enterprise Applications with OSGi - ...
 
Designing JEE Application Structure
Designing JEE Application StructureDesigning JEE Application Structure
Designing JEE Application Structure
 
Custom Buildpacks and Data Services
Custom Buildpacks and Data ServicesCustom Buildpacks and Data Services
Custom Buildpacks and Data Services
 
Best Practices for Enterprise OSGi Applications - Emily Jiang
Best Practices for Enterprise OSGi Applications - Emily JiangBest Practices for Enterprise OSGi Applications - Emily Jiang
Best Practices for Enterprise OSGi Applications - Emily Jiang
 
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai..."Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
 
Part 4: Custom Buildpacks and Data Services (Pivotal Cloud Platform Roadshow)
Part 4: Custom Buildpacks and Data Services (Pivotal Cloud Platform Roadshow)Part 4: Custom Buildpacks and Data Services (Pivotal Cloud Platform Roadshow)
Part 4: Custom Buildpacks and Data Services (Pivotal Cloud Platform Roadshow)
 
Monoliths are so 2001 – What you need is Modularity
Monoliths are so 2001 – What you need is ModularityMonoliths are so 2001 – What you need is Modularity
Monoliths are so 2001 – What you need is Modularity
 
DevNexus 2017 - Building and Deploying 12 Factor Apps in Scala, Java, Ruby, a...
DevNexus 2017 - Building and Deploying 12 Factor Apps in Scala, Java, Ruby, a...DevNexus 2017 - Building and Deploying 12 Factor Apps in Scala, Java, Ruby, a...
DevNexus 2017 - Building and Deploying 12 Factor Apps in Scala, Java, Ruby, a...
 
Webpack: from 0 to 2
Webpack: from 0 to 2Webpack: from 0 to 2
Webpack: from 0 to 2
 
Maven 2.0 - Project management and comprehension tool
Maven 2.0 - Project management and comprehension toolMaven 2.0 - Project management and comprehension tool
Maven 2.0 - Project management and comprehension tool
 
An Introduction to Maven and Flex
An Introduction to Maven and FlexAn Introduction to Maven and Flex
An Introduction to Maven and Flex
 
Modules all the way down: OSGi and the Java Platform Module System
Modules all the way down: OSGi and the Java Platform Module SystemModules all the way down: OSGi and the Java Platform Module System
Modules all the way down: OSGi and the Java Platform Module System
 
GR8Conf 2011: Adopting Grails
GR8Conf 2011: Adopting GrailsGR8Conf 2011: Adopting Grails
GR8Conf 2011: Adopting Grails
 
Adopting Grails - GR8Conf Europe
Adopting Grails - GR8Conf EuropeAdopting Grails - GR8Conf Europe
Adopting Grails - GR8Conf Europe
 
DevNexus 2019: Migrating to Java 11
DevNexus 2019: Migrating to Java 11DevNexus 2019: Migrating to Java 11
DevNexus 2019: Migrating to Java 11
 
eXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework IntroductioneXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework Introduction
 
Chris OBrien - Pitfalls when developing with the SharePoint Framework (SPFx)
Chris OBrien - Pitfalls when developing with the SharePoint Framework (SPFx)Chris OBrien - Pitfalls when developing with the SharePoint Framework (SPFx)
Chris OBrien - Pitfalls when developing with the SharePoint Framework (SPFx)
 
Mavenized RCP
Mavenized RCPMavenized RCP
Mavenized RCP
 
Exploring Maven SVN GIT
Exploring Maven SVN GITExploring Maven SVN GIT
Exploring Maven SVN GIT
 
Application Model for Cloud Deployment
Application Model for Cloud DeploymentApplication Model for Cloud Deployment
Application Model for Cloud Deployment
 

Plus de Graham Charters

Explore Jakarta EE and MicroProfile on Azure with Open Liberty & OpenShift
Explore Jakarta EE and MicroProfile on Azure with Open Liberty & OpenShiftExplore Jakarta EE and MicroProfile on Azure with Open Liberty & OpenShift
Explore Jakarta EE and MicroProfile on Azure with Open Liberty & OpenShiftGraham Charters
 
How to get along with HATEOAS without letting the bad guys steal your lunch?
How to get along with HATEOAS without letting the bad guys steal your lunch?How to get along with HATEOAS without letting the bad guys steal your lunch?
How to get along with HATEOAS without letting the bad guys steal your lunch?Graham Charters
 
Cutting through the fog of microservices: lightsabers optional
Cutting through the fog of microservices: lightsabers optionalCutting through the fog of microservices: lightsabers optional
Cutting through the fog of microservices: lightsabers optionalGraham Charters
 
Are you ready for cloud-native Java?
Are you ready for cloud-native Java?Are you ready for cloud-native Java?
Are you ready for cloud-native Java?Graham Charters
 
Optimizing Spring Boot apps for Docker
Optimizing Spring Boot apps for DockerOptimizing Spring Boot apps for Docker
Optimizing Spring Boot apps for DockerGraham Charters
 
A first look at Open Liberty
A first look at Open LibertyA first look at Open Liberty
A first look at Open LibertyGraham Charters
 
Microservices and OSGi: Better together?
Microservices and OSGi: Better together?Microservices and OSGi: Better together?
Microservices and OSGi: Better together?Graham Charters
 
Get Rapid Right-sized and Recent with the Liberty Repository
Get Rapid Right-sized and Recent with the Liberty RepositoryGet Rapid Right-sized and Recent with the Liberty Repository
Get Rapid Right-sized and Recent with the Liberty RepositoryGraham Charters
 

Plus de Graham Charters (8)

Explore Jakarta EE and MicroProfile on Azure with Open Liberty & OpenShift
Explore Jakarta EE and MicroProfile on Azure with Open Liberty & OpenShiftExplore Jakarta EE and MicroProfile on Azure with Open Liberty & OpenShift
Explore Jakarta EE and MicroProfile on Azure with Open Liberty & OpenShift
 
How to get along with HATEOAS without letting the bad guys steal your lunch?
How to get along with HATEOAS without letting the bad guys steal your lunch?How to get along with HATEOAS without letting the bad guys steal your lunch?
How to get along with HATEOAS without letting the bad guys steal your lunch?
 
Cutting through the fog of microservices: lightsabers optional
Cutting through the fog of microservices: lightsabers optionalCutting through the fog of microservices: lightsabers optional
Cutting through the fog of microservices: lightsabers optional
 
Are you ready for cloud-native Java?
Are you ready for cloud-native Java?Are you ready for cloud-native Java?
Are you ready for cloud-native Java?
 
Optimizing Spring Boot apps for Docker
Optimizing Spring Boot apps for DockerOptimizing Spring Boot apps for Docker
Optimizing Spring Boot apps for Docker
 
A first look at Open Liberty
A first look at Open LibertyA first look at Open Liberty
A first look at Open Liberty
 
Microservices and OSGi: Better together?
Microservices and OSGi: Better together?Microservices and OSGi: Better together?
Microservices and OSGi: Better together?
 
Get Rapid Right-sized and Recent with the Liberty Repository
Get Rapid Right-sized and Recent with the Liberty RepositoryGet Rapid Right-sized and Recent with the Liberty Repository
Get Rapid Right-sized and Recent with the Liberty Repository
 

Dernier

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
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
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
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
 
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
 
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
 
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
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
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
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 

Dernier (20)

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
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...
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
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
 
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
 
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
 
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
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
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...
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 

Modularizing Enterprise Apps with OSGi

  • 1. Graham Charters - Senior Technical Staff Member, WebSphere Application Server October 2012 Hints and Tips for Modularizing Existing Enterprise Applications Graham Charters © IBM Corporation 2012
  • 2. Agenda  Motivation for a Modular Enterprise  Approaches to OSGi Adoption  A Staged Approach in Detail  Summary 2 © IBM Corporation 2012
  • 3. Modularity Issues in Java EE Java EE modularity is inadequate Across apps - each archive typically contains all required libraries – Common libraries/frameworks get installed with each application – Multiple copies of libraries in memory webB.war WEB-INF/classes/servletB.class WEB-INF/lib/json4j.jar webC.war WEB-INF/lib/commons-logging.jar WEB-INF/classes/servletC.class WEB-INF/lib/junit.jar… WEB-INF/lib/json4j.jar WEB-INF/lib/commons-logging.jar WEB-INF/lib/junit.jar… plankton.v1 Within apps - 3rd party libraries consume other 3rd party libraries leading to conflicting versions on the application classpath. 3 plankton.v2 © IBM Corporation 2012
  • 4. Enterprise OSGi Specifications are growing coverage  First specification released 2010 added: – Web Applications (WAR -> WAB) – JNDI (including OSGi Service scheme) – Transactions – Blueprint (inspired by Spring) – Remote Services  Second specification released 2012, added: – Subsystems (standard application model) – Repository – Resolver  Work in the pipeline – EJB – CDI – Blueprint transactions – Blueprint enhancements  Platforms are plugging the gaps: Apache Aries, Eclipse Virgo, Apache Geronimo, WebSphere Application Server, JBoss AS, Glassfish, ... your mileage may vary... 4 © IBM Corporation 2012
  • 5. A Staged Approach  Lots of good reasons to improve modularity but don‟t have to achieve all in one go – “Big bang” =often=> “damp squib”  Incremental successes are successes that help build and sustain momentum  A bad practice may still be a better practice (a means to an end) A How? B C D 5 © IBM Corporation 2012
  • 6. Useful Tools  Many tools help with OSGi development, including bundle generation from simple configuration – Rational Application Developer – IBM WebSphere Application Server V8.5 Developer Tools V8.5 – BND – BNDTools – Maven-bundle-plugin – BND Ant Task – ...  Example taken from modularizing the Apache Geronimo DayTrader application.  DayTrader is built using maven and so maven-bundle-plugin snippets are used throughout. 6 © IBM Corporation 2012
  • 7. Strategies  A number of possible approaches: – Hargrave & Kriens: “Single Bundle” – Feng & Charters: “One to One” – Nottingham & Charters: “Fragments” (a “work in progress”) 7 © IBM Corporation 2012
  • 8. Hargrave & Kriens  JavaOne 2008: http://www.osgi.org/wiki/uploads/Links/TS-5122.pdf  Approach Summary: 1. Single bundle project with all dependent jars on Bundle-Classpath 2. Over time, pull out dependent jars as bundles  Focuses on Java SE: – Does not consider Java EE classloaders – Does not consider Java EE component models  Surfaces OSGi slower, but delivers incremental benefits bundle entities application bundle entities log entities log core ejb3 core core ejb3 ejb3 log 8 © IBM Corporation 2012
  • 9. Feng & Charters  ApacheCon 2009: http://people.apache.org/~lresende/presentations/felix%20goes%20to%20tuscany.pdf  Approach Summary: 1. Convert each build module directly to an OSGi Bundle 2. Analyze and refactor  Focused on Java SE – No consideration for Java EE classloaders – No consideration for Java EE component models  Motivated by need to deliver assembly subsets  Surfaces OSGi early, but longer lead-time to first success soap soap wsappclient entities entities soap wsappclient entities beans log beans log wsappclient core web web core core streamer json-proxy json-proxy ejb3 9 web streamer streamer json-proxy ejb3 ejb3 © IBM Corporation 2012
  • 10. Nottingham & Charters  EclipseCon 2012: this deck  Approach Summary: 1. Replicate existing classloading in OSGi using bundle fragments 2. Incrementally separate out individual bundles 3. Adopt OSGi best practices  Considers Java EE classloading and component models  Surfaces OSGi early, and incrementally - a staged approach soap wsappclient entities wab web app-host wab beans log web core ejb3 core log web app-host ejb3 core log streamer json-proxy ejb3 10 © IBM Corporation 2012
  • 11. Stage 1: Understanding the starting point Bootstrap  Java EE prescribes a hierarchical classloading model  Assuming “parent first” and “multiple”: – Each Application has own classloader – Each WAR has own class loader – WAR has visibility to Application classes – WAR prefers Application classs, Application prefers System classes, etc...  OSGi modularity enforced through class visibility using classloaders  Migration strategies need to consider the impact of this change – e.g. replicate visibility relationships of existing application in OSGi 11 Extensions System Application WAR Application WAR WAR © IBM Corporation 2012
  • 12. Replicating Java EE classloading: Classloaders  Preserve Application and WAR roles  Application -> Application Host Bundle – Add application modules to fragments of host bundle  Web App Archive -> Web Application Bundle – Add WEB-INF/classes to BundleClasspath – Extract WEB-INF/lib jars and add as fragments of Web Application Bundle  We now have two classloaders just as we did in Java EE  System app-host Application ejb3 core log wab WAR  We also have full visibility of the modules web 12 © IBM Corporation 2012
  • 13. Maven-bundle-plugin - Application Host Bundle Example ... <parent> ... </parent> <packaging>bundle</packaging> bundle artefact type to be built <groupId>org.apache.geronimo.daytrader.modules</groupId> <artifactId>app-host</artifactId> <version>0.1</version> <name>DayTrader :: Modules – Application</name> <description>DayTrader Application Module</description> plugin uses this as default bundle metadata <dependencies> ... </dependencies> the dependencies to build against <build> <plugins> <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <configuration> <instructions> ... </instructions> </configuration> </plugin> </plugins> </build> </project> 13 extra bundle configuration (e.g. exports, imports, etc) © IBM Corporation 2012
  • 14. Maven-bundle-plugin - Fragment Bundle Example <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <configuration> <instructions> <Fragment-Host>org.apache.geronimo.daytrader.modules.daytrader-app-host</Fragment-Host> </instructions> </configuration> </plugin> Fragment-Host: org.apache.geronimo.daytrader.modules.daytrader-app-host 14 © IBM Corporation 2012
  • 15. Replicating Java EE classloading: Delegation  App and wab can‟t see the container apis from the System Classloader  Wab can‟t see app classes  Solution: – Add package imports for container packages to app and wab – Add package exports to app-host fragments required by wab – Add require bundle from wab to app  Note: delegation semantics are not identical to Java EE – WAS provides all imported packages (close to “parent-first”) – Bundle provides everything else – Now have control over what wab & app-host see from the System classloader 15 System X app-host X X wab © IBM Corporation 2012
  • 16. Determining the Container APIs (System Classloader) Warning: This step will vary depending on target server  <was_install>/dev contains the APIs in was_public.jar and JavaEE/jee.jar  Take Export-Package entries and add as Import-Package entries on app and wab bundles  If using BND-based tools then can wildcard values (e.g. com.ibm.*, javax.*)  <was_install>/dev includes a pom for WAS API for maven development (available since v8.0)  Applications should not rely on packages not defined in <was_install>/dev 16 © IBM Corporation 2012
  • 17. Maven-bundle-plugin: Container delegation mvn install:install-file -DgroupId=com.ibm.websphere.appserver -DartifactId=was_public -Dversion=8.5 Dpackaging=jar -Dfile=was_public-8.5.0.jar maven dependency on WAS API maven-bundle-plugin (pom.xml) daytrader-app.jar META-INF/MANIFEST.MF 17 <dependency> <groupId>com.ibm.websphere.appserver</groupId> <artifactId>was_public</artifactId> <version>8.5</version> </dependency> <Import-Package> <!-- from was_public.jar --> com.ibm.*, ... <!-- from jdk & jee.jar --> javax.* </Import-Package> Import-Package: com.ibm.websphere.ActivitySession;version="1.1.0", ... javax.xml.rpc.server;version="1.1.0", javax.xml.rpc.soap;version="1.1.0" © IBM Corporation 2012
  • 18. Maven-bundle-plugin: WAB to App Delegation  Fragment exports (daytrader package naming allowed wildcarding) <instructions> <Fragment-Host>org.apache.geronimo.daytrader.modules.daytrader-app-host</Fragment-Host> <Export-Package>org.apache.geronimo.samples.daytrader.core*</Export-Package> </instructions>  Wab Require-Bundle <instructions> <Require-Bundle>org.apache.geronimo.daytrader.modules.daytrader-app-host</Require-Bundle> </instructions> wab Require-Bundle: app-host Export-Package: ... app-host core log entities ejb3 ejb3 18 core log © IBM Corporation 2012
  • 19. A Note on Require-Bundle  Uses – Merge split package – When there‟ll only ever be one provider (e.g. extension points)  Considered bad practice because: – The required bundle can change what it provides - brittle in the face of refactoring 19 © IBM Corporation 2012
  • 20. Extenders: Enabling Component Models  Web Components, EJBs, Persistence Contexts, Blueprint Beans all handled by extenders  Extenders look inside bundles for code/metadata to process  Extenders typically require a bundle to „opt in‟ using a manifest header – host must opt-in  JPA entities not permitted to come from fragments: “...any entity classes must originate in the bundle’s JAR, it cannot come from a fragment.” <!-- maven-bundle-plugin configuration snippet--> <instructions> ... <!-- Opt in for EJB Extender --> <Export-EJB>&lt;&lt;EMPTY&gt;&gt;</Export-EJB> </instructions> <!-- maven-bundle-plugin configuration snippet--> <instructions> <!-- Opt in for Web Extender --> <Web-ContextPath>/daytrader</Web-ContextPath> </instructions> 20 Tip: <<EMPTY>> allows empty header in BND (needs a recent version of maven-bundle-plugin) app-host Export-EJB: wab Web-ContextPath: /daytrader © IBM Corporation 2012
  • 21. OSGi Application Warning: this step will vary depending on target server  Servers typically enable a deployment artefact and build tools for an application  Example was targeting WebSphere, so used a .eba (a zip file with an application manifest) – RAD/WDT tools make development simple – Ant zip task and eba-mavenplugin (Apache Aries) can also be used in builds <plugin> <groupId>org.apache.aries</groupId> <artifactId>eba-maven-plugin</artifactId> <version>0.4-SNAPSHOT</version> <extensions>true</extensions> <configuration> <generateManifest>true</generateManifest> <instructions> <Application-SymbolicName> ${project.artifactId} </Application-SymbolicName> </instructions> </configuration> </plugin> Application-Name: DayTrader Application Application-SymbolicName: org.apache.aries.samples.daytrader Application-ManifestVersion: 1 Application-Version: 0.1 Manifest-Version: 1.0 Application-Content: daytrader.app;version="[0.1,1.0)", daytrader.wab;version="[0.1,1.0)" wab app-host daytrader.eba © IBM Corporation 2012
  • 22. Stage 2: Factoring out Bundles  Now the application‟s running in OSGi we can start to split out the fragments as independent, re-usable bundles  Strategy: – Do one fragment at a time – Start with the leaf dependencies • Wab bundle contents first, then the app bundle • Project build dependencies help with identification • Third-party libraries • “shared libraries” (if runtime supports this concept) – Detach from host and calculate the package imports & exports wab wab Import-Package: daytrader.web Fragment-Host: wab web 22 Export-Package: daytrader.web web © IBM Corporation 2012
  • 23. Split Package Strategies  A split package is a package exported by more than one provider where the contents differ – Sub-set/superset relationship - e.g. javax.transactions – Intersecting or non-intersecting subsets – Not different releases  Split packages hint at poor modularity or naming  Consumers often need access to all providers, but OSGi Import-Package will only wire to one  Solution: – Combine jars with split packages into a single bundle • Multiple jars on single Bundle-Classpath or • Fragment Bundles attached to a single host log Bundle-Classpath: ., A.jar. B.jar Export-Package: p A  This approach is tactical and is addressed in Stage 3 23 B p p © IBM Corporation 2012
  • 24. Converting Jars to Bundles  Using RAD/WDT? – Convert Java projects to OSGi Bundle Projects (also works for EJB and WAR) – Or import “Java Archive into OSGi Bundle” • Wraps Jar in a Bundle <packaging>bundle</packaging>  Using maven or ant? – Modify build to produce bundles (e.g. maven-bundle-plugin or bnd in ant task) – Use wild-cards to generate initial imports/exports then refine... 24 <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <configuration> <instructions> ... </instructions> </configuration> </plugin> © IBM Corporation 2012
  • 25. Third-party Libraries  Applications often use third-party libraries, such as open source – DayTrader uses commons.logging  Many now come with OSGi metadata  Most others have been bundlized by repository projects – Eclipse Orbit - bundlized, pedigree reviewed for Eclipse projects – Apache Felix Commons – SpringSource Enterprise Bundle Repository  or by other OSGi-based projects – Apache Tuscany – Apache ServiceMix – Ops4J Pax *  Use these if available  But what if you can‟t find a bundlized library...? 25 © IBM Corporation 2012
  • 26. Bundlizing third-party libraries  Use tools to calculate manifest – RAD/WDT Import -> Java Archive into an OSGi Bundle – BND – Refine Imports/Exports  If library required to work inside and outside OSGi? – inject OSGi manifest into existing jar – Doesn‟t work for signed Jars – Can‟t aggregate multiple Jars  If library only required to work in OSGi – Wrap jar in bundle (add jar to BundleClasspath) – Works for signed jars – Can aggregate multiple jars, if necessary 26 log log inject Export-Package: org.c... org/apache/commons/... log wrap log Bundle-Classpath: ., log.jar Export-Package: org.c... log © IBM Corporation 2012
  • 27. The story so far...  The first two stages have: – Taken Java EE application and run in OSGi – Decomposed single deployment artefact into multiple bundles  Now have the potential to: – Understand the application architecture; modules used and their relationships (OSGi Application Console) – Remove duplicate deployment binaries (single bundle in repository) – Remove duplicate runtime binaries (share bundle in server) – Reduce operational costs and errors - deploy shared binaries based on application needs – Determine which binaries are in use (e.g. to apply critical fix)  But there‟s more... 27 © IBM Corporation 2012
  • 28. Stage 3: Incrementally Adopt Best Practices  Stage 2 documents the „as-is‟ architecture, warts-„n‟-all  OSGi Best Practices show how to make the most of OSGi – Hopefully you attended Emily Jiang‟s session – http://www.ibm.com/developerworks/websphere/techjournal/1007_charters/1007_charters.html  Adopting best practices leads to: – High cohesion - bundles with clear and distinct roles in the architecture – Loose coupling - flexible, but necessary, dependencies  ...which all leads to greater agility, flexibility and re-use – Development teams can understand and explain the architecture and are no longer afraid to change the code – Applications can evolve and new application can be created at a pace that enables, rather than inhibits, the business 28 © IBM Corporation 2012
  • 29. Summary  Moving enterprise applications to OSGi helps: – increase understanding of application architecture – increase module cohesiveness – reduce module coupling  Leads to greater application agility through re-use and understanding of impact of change  A staged approach to adoption delivers value sooner and in-line with investment  With the wealth of tools, runtimes, and existing assets, it‟s never been easier to adopt OSGi  What OSGi could do to better: – Enable „fragments‟ to define everything except a classloader – Enable JPA entities in fragments 29 © IBM Corporation 2012
  • 31. Trademarks  Eclipse and the Eclipse logo are trademarks of Eclipse Foundation, Inc.  Apache, Apache Felix, Felix, the Apache Felix project logo, Apache Tuscany and the Apache Tuscany project logo are trademarks of The Apache Software Foundation.  Java and all Java-based trademarks and logos are trademarks or registered trademarks of Oracle and/or its affiliates.  IBM and the IBM logo are trademarks of International Business Machines Corporation, registered in many jurisdictions.  Other marks may be trademarks or registered trademarks of their respective owners. 31 © IBM Corporation 2012