SlideShare a Scribd company logo
1 of 47
Download to read offline
Modular Java EE
 in the cloud
                          ng java EE a nd OSGi
  rac tical guid e to mixi
Ap
Bert Ertman
Fellow at Luminis in the Netherlands
JUG Leader for NLJUG and a Java Champion
    @bertertman


Paul Bakker
Architect at Luminis Technologies
     @pbakker
                                       A presentation for
Trend

Applications tend to grow bigger and
more complex

Agile development and refactoring
have become more common
Th is leads to a number of challenges :



           D ependency               Versioning
           Man  agement




            Maintenance              Deployment
            (long term)
Apps are moving to the cloud
Cloud challenges require non-
trivial non-functional
requirements

   Zero-downtime deployments
   Modular deployments
   Customer specific extensions
   (SaaS)
Modularity
    is the answer
But... what exactly is
    modularity?
What we learned about OO design in university :




                 Promote
                 cohesion
     Prevent
     (tight)                          cohesion



    coupling
                               coupling
How to prevent
coupling in a code
      base?
How to prevent
coupling in a code
      base?

          interfaces
But how to make
   sure nobody
accidentally uses
 implementation
     classes?
But how to make
imp lemen tation
    sure nobody
 accidentally uses
   hi
  implemdi tation
          en ng
      classes?
Modules
Ok, but how to create an
 instance of a hidden
         class?

               MyInterface myI = new
                MyImplementation();
Service Lookups
Design time
      modularity

Divide and conquer
Forces separation of concerns
Prevents spaghetti
The jar file is the unit of
runtime modularity
   on the Java platform
                     What about
                      classpath
                         hell?
How to deal with




   Runtime dynamics
   Module versioning
   Updating single modules
     Intra-module dependency
     management
Runtime
                                     Architectural
                      design                          dynamic
What do we need?


                                       focus on
                        equences                       module
                   cons              modularity
                                                     framework


                                         let’s not
                     High-level                      Right now,
                                     reinvent the
                   enterprise APIs                   OSGi is the
                                        wheel
                                                     only option
OSGi != modularity

OSGi is the de-facto
 standard module
  system for Java


   What about Jigsaw?
OSGi != modularity

OSGi is the de-facto         remember!
                            Modularity is
 standard module           an architectural
                              principle
  system for Java


   What about Jigsaw?
OSGi != modularity

OSGi is the de-facto         remember!
                            Modularity is
 standard module           an architectural
                              principle
  system for Java
                             Modularity
                            does not come
                            for free with a
   What about Jigsaw?
                             framework
Demo
OSGi vs. Java EE
OSGi vs. Java EE : opposite ends?



 Java EE:
high level
   APIs

                                           OSGi:
                                       low-level, mix
                                         and match
                                          yourself
OSGi vs. Java EE : opposite ends?



 Java EE:
high level
   APIs
                     They don’t
                      have to be
                     either / or           OSGi:
                                       low-level, mix
                                         and match
                                          yourself
How? - 3 options



                     #2
#1                                    #3
  O SG   i as core   Hybrid solution
arc hit ecture with     using an
       Is publishe d injection bridge OSGi a la carte
EE AP
    as services
Option 1 - OSGi in Java EE App Servers

                                             use app server
                                           capabilities like
OSGi  bundles as                           clustering, data
                                              sources, etc.
   your core
 prog ramming           Java EE APIs
     model             available from
                       within bundles             the
                                                (near)
                                                future!
Web Application Bundle (WAB)



Enterprise
  OSGi                                 Easy
standard                           registration
                                    of Servlets
                                   and JAX-RS
         WAR with a                components
          manifest
Web Application Bundle (WAB)

                               manifest.mf
 mywab.jar

META-INF/manifest.mf           Bundle-Name: agenda.web.ui
index.html                     Web-ContextPath: /myweb
WEB-INF/classes/               Import-Package: javax.servlet
MyResource.class
WEB-INF/faces-config.xml
WEB-INF/web.xml


/myweb/index.html
/myweb/agenda
EJB Bundles
                          Not a standard yet!


Use transactions
and JPA like you
                   Publish EJBs
normally would
                     as OSGi
                     services
EJB Bundles




              manifest.mf
              Bundle-Name:
              agenda.storage.ejb
              Export-EJB: ALL
OSGi CDI integration

RFP 146

                 Prototyped in
                    WELD
      Use CDI
       within                     Use CDI to
      bundles                     produce /
                                  consume
                                   services
How are the app servers doing?
             Deploy                  EJB/JPA
App server             WAB support
             bundles                 support
 Glassfish
WebSphere
WebLogic
 JBoss AS
Option 2 : Hybrid solution



             Best of both worlds?

      Your app is effectively split into two parts:
        ‘Adminstrative’ enterprise part -> Java EE
        ‘Dynamic’ part where services can be replaced
        without downtime -> OSGi
      Glue the two together using an ‘injection bridge’
Example
Option 3 - OSGi a la carte




                  Demo
What about
deployment?
What about
deployment?

       Apache
          Ace
       - demo -
Apache ACE
Wrap up
What have we learned?

You’ve seen the future of enterpris
                                    e development ;-)
Why modularity is important (in
                                     the cloud)
Practical solution for doing modu
                                    larity now
Want to try this yourself?

Tomorrow 9.30 am
Hands-on Lab:
  Building Modular Enterprise Applications
Room: BOF 2
Recommended reading
Clou d provisioning         Cloud OSGi services    Bert Ertman
http://ace .apache.org/   http://www.amdatu.org/   bert.ertman@luminis.eu


                                                        @BertErtman
                             Amdatu



Eclipse OSGi plugin         That’s us
                                                   Paul Bakker
http://bndtools.org/        http://luminis.eu/     paul.bakker@luminis.eu

                                                        @pbakker
Q&A

More Related Content

What's hot

JavaOne 2012 CON 3961 Innovative Testing Techniques Using Bytecode Instrument...
JavaOne 2012 CON 3961 Innovative Testing Techniques Using Bytecode Instrument...JavaOne 2012 CON 3961 Innovative Testing Techniques Using Bytecode Instrument...
JavaOne 2012 CON 3961 Innovative Testing Techniques Using Bytecode Instrument...PaulThwaite
 
EclipseCON2012 - Enterprise OSGi for Earthlings: Meet Eclipse Libra
EclipseCON2012 - Enterprise OSGi for Earthlings: Meet Eclipse LibraEclipseCON2012 - Enterprise OSGi for Earthlings: Meet Eclipse Libra
EclipseCON2012 - Enterprise OSGi for Earthlings: Meet Eclipse LibraNaci Dai
 
Concierge: Bringing OSGi (Back) to Embedded Devices
Concierge: Bringing OSGi (Back) to Embedded DevicesConcierge: Bringing OSGi (Back) to Embedded Devices
Concierge: Bringing OSGi (Back) to Embedded DevicesJan S. Rellermeyer
 
Java EE 7 for Real Enterprise Systems
Java EE 7 for Real Enterprise SystemsJava EE 7 for Real Enterprise Systems
Java EE 7 for Real Enterprise SystemsHirofumi Iwasaki
 
Paremus Cloud and OSGi Beyond the VM - OSGi Cloud Workshop March 2012
Paremus Cloud and OSGi Beyond the VM - OSGi Cloud Workshop March 2012Paremus Cloud and OSGi Beyond the VM - OSGi Cloud Workshop March 2012
Paremus Cloud and OSGi Beyond the VM - OSGi Cloud Workshop March 2012mfrancis
 
MVVM for Modern Applications
MVVM for Modern ApplicationsMVVM for Modern Applications
MVVM for Modern ApplicationsJeremy Likness
 
Using OSGi as a Cloud Platform - Jan Rellermeyer
Using OSGi as a Cloud Platform - Jan RellermeyerUsing OSGi as a Cloud Platform - Jan Rellermeyer
Using OSGi as a Cloud Platform - Jan Rellermeyermfrancis
 
Advanced java syllabus from shpine
Advanced java syllabus from shpineAdvanced java syllabus from shpine
Advanced java syllabus from shpineSHPINE TECHNOLOGIES
 
JEE Course - EJB
JEE Course - EJBJEE Course - EJB
JEE Course - EJBodedns
 
Java Tutorial For Beginners - Step By Step | Java Basics | Java Certification...
Java Tutorial For Beginners - Step By Step | Java Basics | Java Certification...Java Tutorial For Beginners - Step By Step | Java Basics | Java Certification...
Java Tutorial For Beginners - Step By Step | Java Basics | Java Certification...Edureka!
 

What's hot (14)

JavaOne 2012 CON 3961 Innovative Testing Techniques Using Bytecode Instrument...
JavaOne 2012 CON 3961 Innovative Testing Techniques Using Bytecode Instrument...JavaOne 2012 CON 3961 Innovative Testing Techniques Using Bytecode Instrument...
JavaOne 2012 CON 3961 Innovative Testing Techniques Using Bytecode Instrument...
 
Lec 2 30_jul13
Lec 2 30_jul13Lec 2 30_jul13
Lec 2 30_jul13
 
EclipseCON2012 - Enterprise OSGi for Earthlings: Meet Eclipse Libra
EclipseCON2012 - Enterprise OSGi for Earthlings: Meet Eclipse LibraEclipseCON2012 - Enterprise OSGi for Earthlings: Meet Eclipse Libra
EclipseCON2012 - Enterprise OSGi for Earthlings: Meet Eclipse Libra
 
Concierge: Bringing OSGi (Back) to Embedded Devices
Concierge: Bringing OSGi (Back) to Embedded DevicesConcierge: Bringing OSGi (Back) to Embedded Devices
Concierge: Bringing OSGi (Back) to Embedded Devices
 
Java EE 7 for Real Enterprise Systems
Java EE 7 for Real Enterprise SystemsJava EE 7 for Real Enterprise Systems
Java EE 7 for Real Enterprise Systems
 
20111007 activiti
20111007 activiti20111007 activiti
20111007 activiti
 
Paremus Cloud and OSGi Beyond the VM - OSGi Cloud Workshop March 2012
Paremus Cloud and OSGi Beyond the VM - OSGi Cloud Workshop March 2012Paremus Cloud and OSGi Beyond the VM - OSGi Cloud Workshop March 2012
Paremus Cloud and OSGi Beyond the VM - OSGi Cloud Workshop March 2012
 
MVVM for Modern Applications
MVVM for Modern ApplicationsMVVM for Modern Applications
MVVM for Modern Applications
 
Using OSGi as a Cloud Platform - Jan Rellermeyer
Using OSGi as a Cloud Platform - Jan RellermeyerUsing OSGi as a Cloud Platform - Jan Rellermeyer
Using OSGi as a Cloud Platform - Jan Rellermeyer
 
Advanced java syllabus from shpine
Advanced java syllabus from shpineAdvanced java syllabus from shpine
Advanced java syllabus from shpine
 
JEE Course - EJB
JEE Course - EJBJEE Course - EJB
JEE Course - EJB
 
OSGi tech session
OSGi tech sessionOSGi tech session
OSGi tech session
 
Java Tutorial For Beginners - Step By Step | Java Basics | Java Certification...
Java Tutorial For Beginners - Step By Step | Java Basics | Java Certification...Java Tutorial For Beginners - Step By Step | Java Basics | Java Certification...
Java Tutorial For Beginners - Step By Step | Java Basics | Java Certification...
 
Polyglot OSGi
Polyglot OSGiPolyglot OSGi
Polyglot OSGi
 

Similar to Modular Java EE in the Cloud

practical-guide-to-modularity with Java osgi
practical-guide-to-modularity with Java osgipractical-guide-to-modularity with Java osgi
practical-guide-to-modularity with Java osgiGabrielBran5
 
OSGi DevCon US 2010 Review
OSGi DevCon US 2010 ReviewOSGi DevCon US 2010 Review
OSGi DevCon US 2010 Reviewmfrancis
 
Next-Generation Enterprise Application Development with SpringSource dm Serve...
Next-Generation Enterprise Application Development with SpringSource dm Serve...Next-Generation Enterprise Application Development with SpringSource dm Serve...
Next-Generation Enterprise Application Development with SpringSource dm Serve...Aditya Jha
 
Enabling modularization through OSGi and SpringDM
Enabling modularization through OSGi and SpringDMEnabling modularization through OSGi and SpringDM
Enabling modularization through OSGi and SpringDMmukulobject
 
Java Modularity with OSGi
Java Modularity with OSGiJava Modularity with OSGi
Java Modularity with OSGiIlya Rybak
 
OSGi and Java EE in GlassFish - Tech Days 2010 India
OSGi and Java EE in GlassFish - Tech Days 2010 IndiaOSGi and Java EE in GlassFish - Tech Days 2010 India
OSGi and Java EE in GlassFish - Tech Days 2010 IndiaArun Gupta
 
OSGi DevCon 2009 Review
OSGi DevCon 2009 ReviewOSGi DevCon 2009 Review
OSGi DevCon 2009 Reviewnjbartlett
 
Modular JavaScript in an OSGi World - S Mak
Modular JavaScript in an OSGi World - S MakModular JavaScript in an OSGi World - S Mak
Modular JavaScript in an OSGi World - S Makmfrancis
 
The Complete Spring Tutorial
The Complete Spring TutorialThe Complete Spring Tutorial
The Complete Spring Tutorialcribes
 
Spring Framework Tutorial | VirtualNuggets
Spring Framework Tutorial | VirtualNuggetsSpring Framework Tutorial | VirtualNuggets
Spring Framework Tutorial | VirtualNuggetsVirtual Nuggets
 
10 interesting things about java
10 interesting things about java10 interesting things about java
10 interesting things about javakanchanmahajan23
 
OSGi For Java Infrastructures [5th IndicThreads Conference On Java 2010, Pune...
OSGi For Java Infrastructures [5th IndicThreads Conference On Java 2010, Pune...OSGi For Java Infrastructures [5th IndicThreads Conference On Java 2010, Pune...
OSGi For Java Infrastructures [5th IndicThreads Conference On Java 2010, Pune...IndicThreads
 
Spring basics for freshers
Spring basics for freshersSpring basics for freshers
Spring basics for freshersSwati Bansal
 

Similar to Modular Java EE in the Cloud (20)

practical-guide-to-modularity with Java osgi
practical-guide-to-modularity with Java osgipractical-guide-to-modularity with Java osgi
practical-guide-to-modularity with Java osgi
 
OSGi DevCon US 2010 Review
OSGi DevCon US 2010 ReviewOSGi DevCon US 2010 Review
OSGi DevCon US 2010 Review
 
Next-Generation Enterprise Application Development with SpringSource dm Serve...
Next-Generation Enterprise Application Development with SpringSource dm Serve...Next-Generation Enterprise Application Development with SpringSource dm Serve...
Next-Generation Enterprise Application Development with SpringSource dm Serve...
 
Spring ppt
Spring pptSpring ppt
Spring ppt
 
Enabling modularization through OSGi and SpringDM
Enabling modularization through OSGi and SpringDMEnabling modularization through OSGi and SpringDM
Enabling modularization through OSGi and SpringDM
 
Java Modularity with OSGi
Java Modularity with OSGiJava Modularity with OSGi
Java Modularity with OSGi
 
OSGi
OSGiOSGi
OSGi
 
OSGi and Java EE in GlassFish - Tech Days 2010 India
OSGi and Java EE in GlassFish - Tech Days 2010 IndiaOSGi and Java EE in GlassFish - Tech Days 2010 India
OSGi and Java EE in GlassFish - Tech Days 2010 India
 
OSGi DevCon 2009 Review
OSGi DevCon 2009 ReviewOSGi DevCon 2009 Review
OSGi DevCon 2009 Review
 
OSGI,
OSGI,OSGI,
OSGI,
 
Intro to OSGi
Intro to OSGiIntro to OSGi
Intro to OSGi
 
Modular JavaScript in an OSGi World - S Mak
Modular JavaScript in an OSGi World - S MakModular JavaScript in an OSGi World - S Mak
Modular JavaScript in an OSGi World - S Mak
 
The Complete Spring Tutorial
The Complete Spring TutorialThe Complete Spring Tutorial
The Complete Spring Tutorial
 
Spring Framework Tutorial | VirtualNuggets
Spring Framework Tutorial | VirtualNuggetsSpring Framework Tutorial | VirtualNuggets
Spring Framework Tutorial | VirtualNuggets
 
10 interesting things about java
10 interesting things about java10 interesting things about java
10 interesting things about java
 
OSGi For Java Infrastructures [5th IndicThreads Conference On Java 2010, Pune...
OSGi For Java Infrastructures [5th IndicThreads Conference On Java 2010, Pune...OSGi For Java Infrastructures [5th IndicThreads Conference On Java 2010, Pune...
OSGi For Java Infrastructures [5th IndicThreads Conference On Java 2010, Pune...
 
Spring basics for freshers
Spring basics for freshersSpring basics for freshers
Spring basics for freshers
 
Java seminar
Java seminarJava seminar
Java seminar
 
GlassFish v3 - Architecture
GlassFish v3 - ArchitectureGlassFish v3 - Architecture
GlassFish v3 - Architecture
 
Karaf ee-apachecon eu-2012
Karaf ee-apachecon eu-2012Karaf ee-apachecon eu-2012
Karaf ee-apachecon eu-2012
 

More from Bert Ertman

Microservices Gone Wrong!
Microservices Gone Wrong!Microservices Gone Wrong!
Microservices Gone Wrong!Bert Ertman
 
Serverless - The Future of the Cloud?!
Serverless - The Future of the Cloud?!Serverless - The Future of the Cloud?!
Serverless - The Future of the Cloud?!Bert Ertman
 
Microservices for Mortals
Microservices for MortalsMicroservices for Mortals
Microservices for MortalsBert Ertman
 
VJUG - Building Modular Java Applications in the Cloud Age
VJUG - Building Modular Java Applications in the Cloud AgeVJUG - Building Modular Java Applications in the Cloud Age
VJUG - Building Modular Java Applications in the Cloud AgeBert Ertman
 
Migrating from Spring Applications to Java EE 6 [CHINESE VERSION]
Migrating from Spring Applications to Java EE 6 [CHINESE VERSION]Migrating from Spring Applications to Java EE 6 [CHINESE VERSION]
Migrating from Spring Applications to Java EE 6 [CHINESE VERSION]Bert Ertman
 
Building Modular Cloud Applications in Java - Lessons Learned
Building Modular Cloud Applications in Java - Lessons LearnedBuilding Modular Cloud Applications in Java - Lessons Learned
Building Modular Cloud Applications in Java - Lessons LearnedBert Ertman
 
JavaOne 2011: Migrating Spring Applications to Java EE 6
JavaOne 2011: Migrating Spring Applications to Java EE 6JavaOne 2011: Migrating Spring Applications to Java EE 6
JavaOne 2011: Migrating Spring Applications to Java EE 6Bert Ertman
 

More from Bert Ertman (7)

Microservices Gone Wrong!
Microservices Gone Wrong!Microservices Gone Wrong!
Microservices Gone Wrong!
 
Serverless - The Future of the Cloud?!
Serverless - The Future of the Cloud?!Serverless - The Future of the Cloud?!
Serverless - The Future of the Cloud?!
 
Microservices for Mortals
Microservices for MortalsMicroservices for Mortals
Microservices for Mortals
 
VJUG - Building Modular Java Applications in the Cloud Age
VJUG - Building Modular Java Applications in the Cloud AgeVJUG - Building Modular Java Applications in the Cloud Age
VJUG - Building Modular Java Applications in the Cloud Age
 
Migrating from Spring Applications to Java EE 6 [CHINESE VERSION]
Migrating from Spring Applications to Java EE 6 [CHINESE VERSION]Migrating from Spring Applications to Java EE 6 [CHINESE VERSION]
Migrating from Spring Applications to Java EE 6 [CHINESE VERSION]
 
Building Modular Cloud Applications in Java - Lessons Learned
Building Modular Cloud Applications in Java - Lessons LearnedBuilding Modular Cloud Applications in Java - Lessons Learned
Building Modular Cloud Applications in Java - Lessons Learned
 
JavaOne 2011: Migrating Spring Applications to Java EE 6
JavaOne 2011: Migrating Spring Applications to Java EE 6JavaOne 2011: Migrating Spring Applications to Java EE 6
JavaOne 2011: Migrating Spring Applications to Java EE 6
 

Recently uploaded

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 

Recently uploaded (20)

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 

Modular Java EE in the Cloud

  • 1. Modular Java EE in the cloud ng java EE a nd OSGi rac tical guid e to mixi Ap
  • 2. Bert Ertman Fellow at Luminis in the Netherlands JUG Leader for NLJUG and a Java Champion @bertertman Paul Bakker Architect at Luminis Technologies @pbakker A presentation for
  • 3. Trend Applications tend to grow bigger and more complex Agile development and refactoring have become more common
  • 4. Th is leads to a number of challenges : D ependency Versioning Man agement Maintenance Deployment (long term)
  • 5. Apps are moving to the cloud Cloud challenges require non- trivial non-functional requirements Zero-downtime deployments Modular deployments Customer specific extensions (SaaS)
  • 6. Modularity is the answer
  • 7. But... what exactly is modularity?
  • 8. What we learned about OO design in university : Promote cohesion Prevent (tight) cohesion coupling coupling
  • 9. How to prevent coupling in a code base?
  • 10. How to prevent coupling in a code base? interfaces
  • 11. But how to make sure nobody accidentally uses implementation classes?
  • 12. But how to make imp lemen tation sure nobody accidentally uses hi implemdi tation en ng classes?
  • 14. Ok, but how to create an instance of a hidden class? MyInterface myI = new MyImplementation();
  • 16. Design time modularity Divide and conquer Forces separation of concerns Prevents spaghetti
  • 17. The jar file is the unit of runtime modularity on the Java platform What about classpath hell?
  • 18. How to deal with Runtime dynamics Module versioning Updating single modules Intra-module dependency management
  • 19. Runtime Architectural design dynamic What do we need? focus on equences module cons modularity framework let’s not High-level Right now, reinvent the enterprise APIs OSGi is the wheel only option
  • 20. OSGi != modularity OSGi is the de-facto standard module system for Java What about Jigsaw?
  • 21. OSGi != modularity OSGi is the de-facto remember! Modularity is standard module an architectural principle system for Java What about Jigsaw?
  • 22. OSGi != modularity OSGi is the de-facto remember! Modularity is standard module an architectural principle system for Java Modularity does not come for free with a What about Jigsaw? framework
  • 23. Demo
  • 25. OSGi vs. Java EE : opposite ends? Java EE: high level APIs OSGi: low-level, mix and match yourself
  • 26. OSGi vs. Java EE : opposite ends? Java EE: high level APIs They don’t have to be either / or OSGi: low-level, mix and match yourself
  • 27. How? - 3 options #2 #1 #3 O SG i as core Hybrid solution arc hit ecture with using an Is publishe d injection bridge OSGi a la carte EE AP as services
  • 28. Option 1 - OSGi in Java EE App Servers use app server capabilities like OSGi bundles as clustering, data sources, etc. your core prog ramming Java EE APIs model available from within bundles the (near) future!
  • 29. Web Application Bundle (WAB) Enterprise OSGi Easy standard registration of Servlets and JAX-RS WAR with a components manifest
  • 30. Web Application Bundle (WAB) manifest.mf mywab.jar META-INF/manifest.mf Bundle-Name: agenda.web.ui index.html Web-ContextPath: /myweb WEB-INF/classes/ Import-Package: javax.servlet MyResource.class WEB-INF/faces-config.xml WEB-INF/web.xml /myweb/index.html /myweb/agenda
  • 31. EJB Bundles Not a standard yet! Use transactions and JPA like you Publish EJBs normally would as OSGi services
  • 32. EJB Bundles manifest.mf Bundle-Name: agenda.storage.ejb Export-EJB: ALL
  • 33. OSGi CDI integration RFP 146 Prototyped in WELD Use CDI within Use CDI to bundles produce / consume services
  • 34. How are the app servers doing? Deploy EJB/JPA App server WAB support bundles support Glassfish WebSphere WebLogic JBoss AS
  • 35. Option 2 : Hybrid solution Best of both worlds? Your app is effectively split into two parts: ‘Adminstrative’ enterprise part -> Java EE ‘Dynamic’ part where services can be replaced without downtime -> OSGi Glue the two together using an ‘injection bridge’
  • 37. Option 3 - OSGi a la carte Demo
  • 39. What about deployment? Apache Ace - demo -
  • 41.
  • 43. What have we learned? You’ve seen the future of enterpris e development ;-) Why modularity is important (in the cloud) Practical solution for doing modu larity now
  • 44. Want to try this yourself? Tomorrow 9.30 am Hands-on Lab: Building Modular Enterprise Applications Room: BOF 2
  • 46. Clou d provisioning Cloud OSGi services Bert Ertman http://ace .apache.org/ http://www.amdatu.org/ bert.ertman@luminis.eu @BertErtman Amdatu Eclipse OSGi plugin That’s us Paul Bakker http://bndtools.org/ http://luminis.eu/ paul.bakker@luminis.eu @pbakker
  • 47. Q&A