SlideShare une entreprise Scribd logo
1  sur  26
Télécharger pour lire hors ligne
Ta l e s f r o m t h e


 OSGi
  t r e n c h e s
  Adobe CQ5: a real-life OSGi case study

Bertrand Delacrétaz
Senior Developer, R&D, Adobe Digital Marketing Systems
Apache Software Foundation Member and (current) Director
http://grep.codeconsult.ch - @bdelacretaz - bdelacretaz@apache.org
OSGi Alliance Community Event, Ludwigsburg, October 2012
slides revision: 2012-10-22

             OSGitrenches
Tales from the
                                              OSGi Alliance Community Event 2012
                                                              Bertrand Delacrétaz
What?
     Share our experience using OSGi
     (Apache Felix) as the foundation
     of Adobe CQ5.

     More than five years working with OSGi, very
     high impact on developers, customers, service
     people, mostly in a positive way.

     OSGi is no silver bullet either.
                                                  silve
                                                        r


             OSGitrenches
Tales from the
                              OSGi Alliance Community Event 2012
                                              Bertrand Delacrétaz
What?
                                                           the



                                           GOOD            the



                                            BAD                                         Just my own,
                                                           the
                                                                                            personal
                                           UGLY                                          opinion as a
                                                                                             software
                                                                                          developer...
symbols by ppdigital , o0o0xmods0o0oon and clarita, on morguefile.com

Tales from the   OSGitrenches                                OSGi Alliance Community Event 2012
                                                                             Bertrand Delacrétaz
job BTW
                                                    s-b ...w
   Trenches?                                            ase e a
                                                            l@a re h
                                                                do irin
                                    Web Content Management        be g!
                                    and Digital Marketing system.    .co
                                    Includes its own JCR content store. m
                                    About 200 OSGi bundles.
                                    Install instructions fit in a tweet.




  www.adobe.com/products/cq.html     Built on Apache Sling, Apache
  http://jackrabbit.apache.org       Felix and Apache Jackrabbit
  http://felix.apache.org
  http://sling.apache.org

             OSGitrenches
Tales from the
                                   OSGi Alliance Community Event 2012
                                                   Bertrand Delacrétaz
What we use from OSGi
     Bundles (using Maven plugins)
     Lifecycle, Service Tracker
     Configurations and Felix Web Console
     Declarative Services (using Maven plugins)
     Sling’s installer module (like fileinstall, using JCR)
     Log, HTTP, Event services, JMX



             OSGitrenches
Tales from the
                                 OSGi Alliance Community Event 2012
                                                 Bertrand Delacrétaz
Famous quotes
    the short version




             OSGitrenches
Tales from the
                            OSGi Alliance Community Event 2012
                                            Bertrand Delacrétaz
Famous Quotes, #2
     “Each (OSGi) bundle can serve as a micro
     application, having it's own lifecycle,
     having it's own citizens and each bundle
     can carefully decide which objects to
     expose to the outside world”
     Peter Rietzler
     http://peterrietzler.blogspot.com/2008/12/is-osgi-going-
     to-become-next-ejb-bubble.html


             OSGitrenches
Tales from the
                                 OSGi Alliance Community Event 2012
                                                 Bertrand Delacrétaz
Famous Quotes, #4
     “The lifecycle model of OSGi makes life
     complicated. Actually, tracking services
     and managing all the aspects of what to
     do when services come and go is nasty”



     Peter Rietzler
     http://peterrietzler.blogspot.com/2008/12/is-osgi-going-
     to-become-next-ejb-bubble.html
             OSGitrenches
Tales from the
                                 OSGi Alliance Community Event 2012
                                                 Bertrand Delacrétaz
Famous Quotes, #6
     “OSGi makes "impossible" things easy:
     hot deploy/upgrade, service discovery, ...
     and trivial things hard: hibernate, tag
     libraries, even deploying a simple war!”
     But, for the first time in my
     career, I see software reusability
     that works: service reusability.
    Filippo Diotalevi
             OSGitrenches
Tales from the
                            OSGi Alliance Community Event 2012
                                            Bertrand Delacrétaz
The Good

             OSGitrenches
Tales from the
                            OSGi Alliance Community Event 2012
                                            Bertrand Delacrétaz
Modularity
                                                                      OSGi bundle
     Classloading
     distinct from            Public packages

     class visibility.           Metadata




                                                        Private packages



     OSGi bundles as reusable components.
     Dynamic setup and updates that work.
     At last!           Matchless picture: Alvimann on morguefile.com

             OSGitrenches
Tales from the
                                    OSGi Alliance Community Event 2012
                                                    Bertrand Delacrétaz
Declarative Services




             OSGitrenches
Tales from the
                            OSGi Alliance Community Event 2012
                                            Bertrand Delacrétaz
Clean OSGi APIs




   Just a few
   basic examples...

             OSGitrenches
Tales from the
                            OSGi Alliance Community Event 2012
                                            Bertrand Delacrétaz
Dynamic load/unload
      Just copy bundle jar
      to Sling’s JCR
      repository (WebDAV)




                                         Bundle activated
                                         and started.
                                         (using Sling’s installer module)


             OSGitrenches
Tales from the
                             OSGi Alliance Community Event 2012
                                             Bertrand Delacrétaz
Plugins for everything
                            Content editors based on
       Servlets               JCR node properties

                            Mime-type based handlers
      Debugging/monitoring tools
                   Content renderers and decorators
                                Legacy integration gateways
     Mail and messaging services
                            etc, etc...
             OSGitrenches
Tales from the
                                   OSGi Alliance Community Event 2012
                                                   Bertrand Delacrétaz
The Bad

             OSGitrenches
Tales from the
                            OSGi Alliance Community Event 2012
                                            Bertrand Delacrétaz
Granularity?
     How many bundles? Services?
     CQ5: about 200 bundles, 1000 services

     How to handle “implementation
     details” libraries.
     Extra bundles or private packages?

     Strict version management required.
     Are we there yet?
             OSGitrenches
Tales from the
                            OSGi Alliance Community Event 2012
                                            Bertrand Delacrétaz
Integration testing...
                        V4.22
      V1.03                             V3.21
                                                       V3.22

                                                                            V4.2
            V5.11                V5.3                                                     V2.13
                                            V6.54
                                                                 V1.05
    In-system                   V1.03
                                                       V1.11                               V6.4

    testing?                               V3.4
                                                          V3.2
                                                                            V6.4

                                 V3.2                                                   V5.43

                 V2.4


    V5.6
                                                but                        when done!

Tales from theOSGitrenches                        OSGi Alliance Community Event 2012
                                                                  Bertrand Delacrétaz
Testing options
      Unit testing          In-framework                           Integration
                                testing                              testing
             JUnit,              Pax Exam,
            TestNG,          Sling testing tools,                   Start application
            Mocks,                   etc.                           and test it “from
              etc..                                                   the outside”.
                                                                   See Apache Sling’s
                                                                   launchpad/testing
                                                                         module

          Necessary            Relatively new
          but usually            tools, can                            Much slower
         not sufficient.           be slow                            but ok for actual
          Mocks can                                                 integration testing
          be painful

             OSGitrenches
Tales from the
                                        OSGi Alliance Community Event 2012
                                                        Bertrand Delacrétaz
I want my...


Spring Guice
   App Server
J2EE do you really need it?
             OSGitrenches
Tales from the
                            OSGi Alliance Community Event 2012
                                            Bertrand Delacrétaz
The Ugly

             OSGitrenches
Tales from the
                            OSGi Alliance Community Event 2012
                                            Bertrand Delacrétaz
Asynchronicity...
                              7                                                     14
                                          V3.2111                                                  17
                         V4.22                                                 V4.5           V7.4
     1V1.03                                                   15
                                                          V3.22

                                      11                                       V4.2 3
            V5.11
           19                     V5.3                2                                      V2.13 10
                                               V6.54

                                      5            Threading 16
                                                          V1.05
 “unpredictable”                                        6
                                                    V1.11                                     V6.4 18
                              V1.03
                                                 13 issues?
 startup order                                V3.4                              8
                                                                               V6.4
                                      12                     V3.2
                                                                    4
                        19        V3.2                                                         9
                                                                                           V5.43

                 V2.4
                             Is the system ready now?
           20
    V5.6
                                           Mostly from Declarative Services, not OSGi itself.

Tales from the  OSGitrenches                         OSGi Alliance Community Event 2012
                                                                     Bertrand Delacrétaz
Unpredictable assemblies
                        V4.22                                               V4.5
      V1.03                             V3.21
                                                       V3.22

                                                                            V4.2
            V5.11                V5.3                                                     V2.13
                                            V6.54
                                                                 V1.05
                                                       V1.11                               V6.4
                                V1.03
                                           V3.4                             V6.4
                                                          V3.2
                                 V3.2                                                   V5.43

                 V2.4   Spot the monsters!
                        Discipline (and semantic versioning) help.
    V5.6
                        Integration (and in-system) testing required.
Tales from theOSGitrenches                        OSGi Alliance Community Event 2012
                                                                  Bertrand Delacrétaz
The Summary

             OSGitrenches
Tales from the
                            OSGi Alliance Community Event 2012
                                            Bertrand Delacrétaz
My vision back in 2009...
 √Developers got used to it (and
     read the book).
 √Frameworks and tools improved.
     Distributed OSGi? Maybe.

 √Customers understand OSGi and like it..
 √Apache Sling paved the way.
             OSGitrenches
Tales from the
                            OSGi Alliance Community Event 2012
                                            Bertrand Delacrétaz
job BTW
                                             s-b ...w
   Conclusions                                  ase e a
                                                    l@a re h
                                                       do irin
                                                          be g!
                                                             .co
                 Modularity. modularity. modularity.            m

                 OSGi fosters better structured code

                 Dynamic services and plugins FTW!

                 Tooling ... getting better all the time

                 OSGi is often unfamiliar / unusual

                 Asynchronous behavior can be
                 problematic (declarative services)

             OSGitrenches
Tales from the
                                    OSGi Alliance Community Event 2012
                                                    Bertrand Delacrétaz

Contenu connexe

En vedette

CQ5 QueryBuilder - .adaptTo(Berlin) 2011
CQ5 QueryBuilder - .adaptTo(Berlin) 2011CQ5 QueryBuilder - .adaptTo(Berlin) 2011
CQ5 QueryBuilder - .adaptTo(Berlin) 2011
Alexander Klimetschek
 
Build Your Own CMS with Apache Sling
Build Your Own CMS with Apache SlingBuild Your Own CMS with Apache Sling
Build Your Own CMS with Apache Sling
Bob Paulin
 
Oklahoma University (OU) Presentation
Oklahoma University (OU) PresentationOklahoma University (OU) Presentation
Oklahoma University (OU) Presentation
Day Software
 

En vedette (13)

Introducing CQ 5.1
Introducing CQ 5.1Introducing CQ 5.1
Introducing CQ 5.1
 
CQ5 overview for developers, 2013 edition
CQ5 overview for developers, 2013 editionCQ5 overview for developers, 2013 edition
CQ5 overview for developers, 2013 edition
 
EVOLVE'15 | Enhance | Norberto Leite | Effectively Scale and Operate AEM with...
EVOLVE'15 | Enhance | Norberto Leite | Effectively Scale and Operate AEM with...EVOLVE'15 | Enhance | Norberto Leite | Effectively Scale and Operate AEM with...
EVOLVE'15 | Enhance | Norberto Leite | Effectively Scale and Operate AEM with...
 
EVOLVE'14 | Maximize | Gary Gamitian & Sean Browne | Zero to AEM in 12 Months
EVOLVE'14 | Maximize | Gary Gamitian & Sean Browne | Zero to AEM in 12 MonthsEVOLVE'14 | Maximize | Gary Gamitian & Sean Browne | Zero to AEM in 12 Months
EVOLVE'14 | Maximize | Gary Gamitian & Sean Browne | Zero to AEM in 12 Months
 
CQ5 QueryBuilder - .adaptTo(Berlin) 2011
CQ5 QueryBuilder - .adaptTo(Berlin) 2011CQ5 QueryBuilder - .adaptTo(Berlin) 2011
CQ5 QueryBuilder - .adaptTo(Berlin) 2011
 
IlSole24Ore: Business Information and CQ5, the missing link
IlSole24Ore: Business Information and CQ5, the missing linkIlSole24Ore: Business Information and CQ5, the missing link
IlSole24Ore: Business Information and CQ5, the missing link
 
Build Your Own CMS with Apache Sling
Build Your Own CMS with Apache SlingBuild Your Own CMS with Apache Sling
Build Your Own CMS with Apache Sling
 
Building Modular Enterprise Applications - C Ziegeler
Building Modular Enterprise Applications - C ZiegelerBuilding Modular Enterprise Applications - C Ziegeler
Building Modular Enterprise Applications - C Ziegeler
 
Oklahoma University (OU) Presentation
Oklahoma University (OU) PresentationOklahoma University (OU) Presentation
Oklahoma University (OU) Presentation
 
Overcome-3-common-aem-delivery-challenges
Overcome-3-common-aem-delivery-challengesOvercome-3-common-aem-delivery-challenges
Overcome-3-common-aem-delivery-challenges
 
JCR and Sling Quick Dive
JCR and Sling Quick DiveJCR and Sling Quick Dive
JCR and Sling Quick Dive
 
EVOLVE'16 | Enhance | Anil Kalbag & Anshul Chhabra | Comparative Architecture...
EVOLVE'16 | Enhance | Anil Kalbag & Anshul Chhabra | Comparative Architecture...EVOLVE'16 | Enhance | Anil Kalbag & Anshul Chhabra | Comparative Architecture...
EVOLVE'16 | Enhance | Anil Kalbag & Anshul Chhabra | Comparative Architecture...
 
Master Chef class: learn how to quickly cook delightful CQ/AEM infrastructures
Master Chef class: learn how to quickly cook delightful CQ/AEM infrastructuresMaster Chef class: learn how to quickly cook delightful CQ/AEM infrastructures
Master Chef class: learn how to quickly cook delightful CQ/AEM infrastructures
 

Similaire à Tales from the OSGi trenches (2012 short form edition)

OCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open Wide
OCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open WideOCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open Wide
OCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open Wide
OCCIware
 

Similaire à Tales from the OSGi trenches (2012 short form edition) (20)

Tales from the OSGi Trenches - Bertrand Delacretaz
Tales from the OSGi Trenches - Bertrand DelacretazTales from the OSGi Trenches - Bertrand Delacretaz
Tales from the OSGi Trenches - Bertrand Delacretaz
 
Tales from the OSGi trenches
Tales from the OSGi trenchesTales from the OSGi trenches
Tales from the OSGi trenches
 
Intro to OSGi
Intro to OSGiIntro to OSGi
Intro to OSGi
 
Introduction to NodeJS
Introduction to NodeJSIntroduction to NodeJS
Introduction to NodeJS
 
To Invent the Future, we must Build Dreams
To Invent the Future, we must Build DreamsTo Invent the Future, we must Build Dreams
To Invent the Future, we must Build Dreams
 
Of metacello, git, scripting and things
Of metacello, git, scripting and thingsOf metacello, git, scripting and things
Of metacello, git, scripting and things
 
OSS Community management
OSS Community managementOSS Community management
OSS Community management
 
OSGI,
OSGI,OSGI,
OSGI,
 
The OSGi Framework Multiplication
The OSGi Framework MultiplicationThe OSGi Framework Multiplication
The OSGi Framework Multiplication
 
Deploying deep learning models with Docker and Kubernetes
Deploying deep learning models with Docker and KubernetesDeploying deep learning models with Docker and Kubernetes
Deploying deep learning models with Docker and Kubernetes
 
SOLID Principles part 1
SOLID Principles part 1SOLID Principles part 1
SOLID Principles part 1
 
Nagios Conference 2012 - Nathan Vonnahme - Monitoring the User Experience
Nagios Conference 2012 - Nathan Vonnahme - Monitoring the User ExperienceNagios Conference 2012 - Nathan Vonnahme - Monitoring the User Experience
Nagios Conference 2012 - Nathan Vonnahme - Monitoring the User Experience
 
Ow2 Ten Minute Prez
Ow2 Ten Minute PrezOw2 Ten Minute Prez
Ow2 Ten Minute Prez
 
Java Modularity with OSGi
Java Modularity with OSGiJava Modularity with OSGi
Java Modularity with OSGi
 
Building a Desktop for the Cloud
Building a Desktop for the CloudBuilding a Desktop for the Cloud
Building a Desktop for the Cloud
 
Keedio Stack: BDaaS deployment for dummies by Alessio Comisso at Big Data Spa...
Keedio Stack: BDaaS deployment for dummies by Alessio Comisso at Big Data Spa...Keedio Stack: BDaaS deployment for dummies by Alessio Comisso at Big Data Spa...
Keedio Stack: BDaaS deployment for dummies by Alessio Comisso at Big Data Spa...
 
EclipseCon 2016 - OCCIware : one Cloud API to rule them all
EclipseCon 2016 - OCCIware : one Cloud API to rule them allEclipseCon 2016 - OCCIware : one Cloud API to rule them all
EclipseCon 2016 - OCCIware : one Cloud API to rule them all
 
OCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open Wide
OCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open WideOCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open Wide
OCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open Wide
 
Jee conf 2015
Jee conf 2015Jee conf 2015
Jee conf 2015
 
EclipseRT, Equinox and OSGi
EclipseRT, Equinox and OSGiEclipseRT, Equinox and OSGi
EclipseRT, Equinox and OSGi
 

Plus de Bertrand Delacretaz

Plus de Bertrand Delacretaz (20)

VanillaJS & the Web Platform, a match made in heaven?
VanillaJS & the Web Platform, a match made in heaven?VanillaJS & the Web Platform, a match made in heaven?
VanillaJS & the Web Platform, a match made in heaven?
 
Surviving large online communities with conciseness and clarity
Surviving large online communities with conciseness and clarity Surviving large online communities with conciseness and clarity
Surviving large online communities with conciseness and clarity
 
Repoinit: a mini-language for content repository initialization
Repoinit: a mini-language for content repository initializationRepoinit: a mini-language for content repository initialization
Repoinit: a mini-language for content repository initialization
 
The Moving House Model, adhocracy and remote collaboration
The Moving House Model, adhocracy and remote collaborationThe Moving House Model, adhocracy and remote collaboration
The Moving House Model, adhocracy and remote collaboration
 
GraphQL in Apache Sling - but isn't it the opposite of REST?
GraphQL in Apache Sling - but isn't it the opposite of REST?GraphQL in Apache Sling - but isn't it the opposite of REST?
GraphQL in Apache Sling - but isn't it the opposite of REST?
 
Open Source Changes the World!
Open Source Changes the World!Open Source Changes the World!
Open Source Changes the World!
 
How to convince your left brain (or manager) to follow the Open Source path t...
How to convince your left brain (or manager) to follow the Open Source path t...How to convince your left brain (or manager) to follow the Open Source path t...
How to convince your left brain (or manager) to follow the Open Source path t...
 
L'Open Source change le Monde - BlendWebMix 2019
L'Open Source change le Monde - BlendWebMix 2019L'Open Source change le Monde - BlendWebMix 2019
L'Open Source change le Monde - BlendWebMix 2019
 
Shared Neurons - the Secret Sauce of Open Source communities?
Shared Neurons - the Secret Sauce of Open Source communities?Shared Neurons - the Secret Sauce of Open Source communities?
Shared Neurons - the Secret Sauce of Open Source communities?
 
Sling and Serverless, Best Friends Forever?
Sling and Serverless, Best Friends Forever?Sling and Serverless, Best Friends Forever?
Sling and Serverless, Best Friends Forever?
 
Serverless - introduction et perspectives concrètes
Serverless - introduction et perspectives concrètesServerless - introduction et perspectives concrètes
Serverless - introduction et perspectives concrètes
 
State of the Feather - ApacheCon North America 2018
State of the Feather - ApacheCon North America 2018State of the Feather - ApacheCon North America 2018
State of the Feather - ApacheCon North America 2018
 
Karate, the black belt of HTTP API testing?
Karate, the black belt of HTTP API testing?Karate, the black belt of HTTP API testing?
Karate, the black belt of HTTP API testing?
 
Open Source at Scale: the Apache Software Foundation (2018)
Open Source at Scale: the Apache Software Foundation (2018)Open Source at Scale: the Apache Software Foundation (2018)
Open Source at Scale: the Apache Software Foundation (2018)
 
They don't understand me! Tales from the multi-cultural trenches
They don't understand me! Tales from the multi-cultural trenchesThey don't understand me! Tales from the multi-cultural trenches
They don't understand me! Tales from the multi-cultural trenches
 
Prise de Décisions Asynchrone, Devoxx France 2018 (avec vidéo)
Prise de Décisions Asynchrone, Devoxx France 2018 (avec vidéo)Prise de Décisions Asynchrone, Devoxx France 2018 (avec vidéo)
Prise de Décisions Asynchrone, Devoxx France 2018 (avec vidéo)
 
Project and Community Services the Apache Way
Project and Community Services the Apache WayProject and Community Services the Apache Way
Project and Community Services the Apache Way
 
La Fondation Apache - keynote au Paris Open Source Summit 2017
La Fondation Apache - keynote au Paris Open Source Summit 2017La Fondation Apache - keynote au Paris Open Source Summit 2017
La Fondation Apache - keynote au Paris Open Source Summit 2017
 
Asynchronous Decision Making - FOSS Backstage 2017
Asynchronous Decision Making - FOSS Backstage 2017Asynchronous Decision Making - FOSS Backstage 2017
Asynchronous Decision Making - FOSS Backstage 2017
 
Building an Apache Sling Rendering Farm
Building an Apache Sling Rendering FarmBuilding an Apache Sling Rendering Farm
Building an Apache Sling Rendering Farm
 

Dernier

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Dernier (20)

EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 

Tales from the OSGi trenches (2012 short form edition)

  • 1. Ta l e s f r o m t h e OSGi t r e n c h e s Adobe CQ5: a real-life OSGi case study Bertrand Delacrétaz Senior Developer, R&D, Adobe Digital Marketing Systems Apache Software Foundation Member and (current) Director http://grep.codeconsult.ch - @bdelacretaz - bdelacretaz@apache.org OSGi Alliance Community Event, Ludwigsburg, October 2012 slides revision: 2012-10-22 OSGitrenches Tales from the OSGi Alliance Community Event 2012 Bertrand Delacrétaz
  • 2. What? Share our experience using OSGi (Apache Felix) as the foundation of Adobe CQ5. More than five years working with OSGi, very high impact on developers, customers, service people, mostly in a positive way. OSGi is no silver bullet either. silve r OSGitrenches Tales from the OSGi Alliance Community Event 2012 Bertrand Delacrétaz
  • 3. What? the GOOD the BAD Just my own, the personal UGLY opinion as a software developer... symbols by ppdigital , o0o0xmods0o0oon and clarita, on morguefile.com Tales from the OSGitrenches OSGi Alliance Community Event 2012 Bertrand Delacrétaz
  • 4. job BTW s-b ...w Trenches? ase e a l@a re h do irin Web Content Management be g! and Digital Marketing system. .co Includes its own JCR content store. m About 200 OSGi bundles. Install instructions fit in a tweet. www.adobe.com/products/cq.html Built on Apache Sling, Apache http://jackrabbit.apache.org Felix and Apache Jackrabbit http://felix.apache.org http://sling.apache.org OSGitrenches Tales from the OSGi Alliance Community Event 2012 Bertrand Delacrétaz
  • 5. What we use from OSGi Bundles (using Maven plugins) Lifecycle, Service Tracker Configurations and Felix Web Console Declarative Services (using Maven plugins) Sling’s installer module (like fileinstall, using JCR) Log, HTTP, Event services, JMX OSGitrenches Tales from the OSGi Alliance Community Event 2012 Bertrand Delacrétaz
  • 6. Famous quotes the short version OSGitrenches Tales from the OSGi Alliance Community Event 2012 Bertrand Delacrétaz
  • 7. Famous Quotes, #2 “Each (OSGi) bundle can serve as a micro application, having it's own lifecycle, having it's own citizens and each bundle can carefully decide which objects to expose to the outside world” Peter Rietzler http://peterrietzler.blogspot.com/2008/12/is-osgi-going- to-become-next-ejb-bubble.html OSGitrenches Tales from the OSGi Alliance Community Event 2012 Bertrand Delacrétaz
  • 8. Famous Quotes, #4 “The lifecycle model of OSGi makes life complicated. Actually, tracking services and managing all the aspects of what to do when services come and go is nasty” Peter Rietzler http://peterrietzler.blogspot.com/2008/12/is-osgi-going- to-become-next-ejb-bubble.html OSGitrenches Tales from the OSGi Alliance Community Event 2012 Bertrand Delacrétaz
  • 9. Famous Quotes, #6 “OSGi makes "impossible" things easy: hot deploy/upgrade, service discovery, ... and trivial things hard: hibernate, tag libraries, even deploying a simple war!” But, for the first time in my career, I see software reusability that works: service reusability. Filippo Diotalevi OSGitrenches Tales from the OSGi Alliance Community Event 2012 Bertrand Delacrétaz
  • 10. The Good OSGitrenches Tales from the OSGi Alliance Community Event 2012 Bertrand Delacrétaz
  • 11. Modularity OSGi bundle Classloading distinct from Public packages class visibility. Metadata Private packages OSGi bundles as reusable components. Dynamic setup and updates that work. At last! Matchless picture: Alvimann on morguefile.com OSGitrenches Tales from the OSGi Alliance Community Event 2012 Bertrand Delacrétaz
  • 12. Declarative Services OSGitrenches Tales from the OSGi Alliance Community Event 2012 Bertrand Delacrétaz
  • 13. Clean OSGi APIs Just a few basic examples... OSGitrenches Tales from the OSGi Alliance Community Event 2012 Bertrand Delacrétaz
  • 14. Dynamic load/unload Just copy bundle jar to Sling’s JCR repository (WebDAV) Bundle activated and started. (using Sling’s installer module) OSGitrenches Tales from the OSGi Alliance Community Event 2012 Bertrand Delacrétaz
  • 15. Plugins for everything Content editors based on Servlets JCR node properties Mime-type based handlers Debugging/monitoring tools Content renderers and decorators Legacy integration gateways Mail and messaging services etc, etc... OSGitrenches Tales from the OSGi Alliance Community Event 2012 Bertrand Delacrétaz
  • 16. The Bad OSGitrenches Tales from the OSGi Alliance Community Event 2012 Bertrand Delacrétaz
  • 17. Granularity? How many bundles? Services? CQ5: about 200 bundles, 1000 services How to handle “implementation details” libraries. Extra bundles or private packages? Strict version management required. Are we there yet? OSGitrenches Tales from the OSGi Alliance Community Event 2012 Bertrand Delacrétaz
  • 18. Integration testing... V4.22 V1.03 V3.21 V3.22 V4.2 V5.11 V5.3 V2.13 V6.54 V1.05 In-system V1.03 V1.11 V6.4 testing? V3.4 V3.2 V6.4 V3.2 V5.43 V2.4 V5.6 but when done! Tales from theOSGitrenches OSGi Alliance Community Event 2012 Bertrand Delacrétaz
  • 19. Testing options Unit testing In-framework Integration testing testing JUnit, Pax Exam, TestNG, Sling testing tools, Start application Mocks, etc. and test it “from etc.. the outside”. See Apache Sling’s launchpad/testing module Necessary Relatively new but usually tools, can Much slower not sufficient. be slow but ok for actual Mocks can integration testing be painful OSGitrenches Tales from the OSGi Alliance Community Event 2012 Bertrand Delacrétaz
  • 20. I want my... Spring Guice App Server J2EE do you really need it? OSGitrenches Tales from the OSGi Alliance Community Event 2012 Bertrand Delacrétaz
  • 21. The Ugly OSGitrenches Tales from the OSGi Alliance Community Event 2012 Bertrand Delacrétaz
  • 22. Asynchronicity... 7 14 V3.2111 17 V4.22 V4.5 V7.4 1V1.03 15 V3.22 11 V4.2 3 V5.11 19 V5.3 2 V2.13 10 V6.54 5 Threading 16 V1.05 “unpredictable” 6 V1.11 V6.4 18 V1.03 13 issues? startup order V3.4 8 V6.4 12 V3.2 4 19 V3.2 9 V5.43 V2.4 Is the system ready now? 20 V5.6 Mostly from Declarative Services, not OSGi itself. Tales from the OSGitrenches OSGi Alliance Community Event 2012 Bertrand Delacrétaz
  • 23. Unpredictable assemblies V4.22 V4.5 V1.03 V3.21 V3.22 V4.2 V5.11 V5.3 V2.13 V6.54 V1.05 V1.11 V6.4 V1.03 V3.4 V6.4 V3.2 V3.2 V5.43 V2.4 Spot the monsters! Discipline (and semantic versioning) help. V5.6 Integration (and in-system) testing required. Tales from theOSGitrenches OSGi Alliance Community Event 2012 Bertrand Delacrétaz
  • 24. The Summary OSGitrenches Tales from the OSGi Alliance Community Event 2012 Bertrand Delacrétaz
  • 25. My vision back in 2009... √Developers got used to it (and read the book). √Frameworks and tools improved. Distributed OSGi? Maybe. √Customers understand OSGi and like it.. √Apache Sling paved the way. OSGitrenches Tales from the OSGi Alliance Community Event 2012 Bertrand Delacrétaz
  • 26. job BTW s-b ...w Conclusions ase e a l@a re h do irin be g! .co Modularity. modularity. modularity. m OSGi fosters better structured code Dynamic services and plugins FTW! Tooling ... getting better all the time OSGi is often unfamiliar / unusual Asynchronous behavior can be problematic (declarative services) OSGitrenches Tales from the OSGi Alliance Community Event 2012 Bertrand Delacrétaz