SlideShare a Scribd company logo
1 of 31
Download to read offline
Taming Beastly Web
 Applications with
 Server-Side OSGi
    Don Brown, Atlassian
It starts so simple. . .
Then this happens. . .

         SOAP interface     REST interface

IRC interface               Slooow deployment
     Microsoft Excel export and
               import          Report builder
            50+ third-party libraries and frameworks
 PKI card authentication
                           Thousands of classes
Solution: Plugins
                       Application



                    Plugin Framework


Excel             REST            IRC                SOAP
Plugin            Plugin         Plugin              Plugin


         Report                           PKI Auth
         Plugin                            Plugin
Anatomy of a Plugin
            Plugin JAR


      Java
                  Utility JARs
     Classes


    Resources
                     XML
     (images,
                   Descriptor
     css, etc)
ls myplugin.jar

./com/myplugin/HelloWorld.class
./resources/logo.png
./META-INF/lib/util.jar
./plugin.xml
plugin.xml
<plugin key=”my.plugin”>
  <plugin-info>
     <version>1.0</version>
  </plugin-info>
  <servlet key=”helloWorld”
      class=“com.myplugin.HelloWorld”>
     <url-pattern>/helloWorld</url-pattern>
  </servlet>
</plugin>
Not just any plugin
 framework . . .




        . . . Now Open Source (BSD)
Right, but what does this have
       to do with OSGi?
What if your plugins
  need plugins?
                       Application



                    Plugin Framework


Excel             REST            IRC                SOAP
Plugin            Plugin         Plugin              Plugin


         Report                           PKI Auth
         Plugin                            Plugin
Want: inter-plugin
communication
              Report Plugin


   Report       Report        Built-in
   Services       UI          Reports



  Users          Sales            Usage
 Reports        Reports          Reports
  Plugin         Plugin           Plugin
Want: dynamic
 deployment



       plugins

    WEB-INF/lib
Want: application and
  plugin isolation
                       Application

          Internal         External        Internal
          Services         Services       Resources



Excel             REST                 IRC                SOAP
Plugin            Plugin              Plugin              Plugin


         Report                                PKI Auth
         Plugin                                 Plugin
Want: application and
  plugin isolation
                       Application

          Internal         External        Internal
          Services         Services       Resources



Excel             REST                 IRC                SOAP
Plugin            Plugin              Plugin              Plugin


         Report                                PKI Auth
         Plugin                                 Plugin
OSGi Basics
            Dynamic module system for Java


Features:

  • Service registry
  • Lifecycle model
  • Bundle dependency system
  • Optional security layer
OSGi Terms
Bundle - Jar file with special OSGi entries in its
 manifest and containing classes, resources, and
 other jars


Lifecycle - States a bundle goes through:
  uninstalled, installed, resolved, starting, stopping,
  active


Service - An object instance exposed under the
  one or more interfaces it implements and a map
  of properties
Bundle Manifest
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.foo.Example
Bundle-Version: 1.0
Import-Package: org.bar;version=quot;1.3.0”
Export-Package: org.foo.api
Bundle-ClassPath: .,META-INF/lib/foo.jar
Bundle Lifecycle
OSGi Services



Key: “com.foo.MyInterface”
Instance: com.foo.MyService
Properties:
   name => foo
   someProperty => someValue
What does that mean?

• Upgrade bundles (think super jars) at runtime
• Bundles can depend on other bundles at a
  service, package, or jar level

• Bundles can hide packages from other bundles
  and version exposed packages
So how does OSGi
     help us?
1. Ability for plugins to
   depend on each other
Plugins can generate their own OSGi headers or:
   <plugin-info>
    <bundle-instructions>
     <Require-Bundle> org.otherPlugin;bundle-
     version=quot;[3.2.0,4.0.0)</Require-Bundle>
      <Import-Package>
     *,org.otherPlugin.api;version=”[3.2.0,4.0.0)” </
     Import-Package>
    </bundle-instructions>
   </plugin-info>
2. Ability for plugins to
   define extension points

1. Plugin A exposes its implementation:
   <component key=“foo” public=“true”
   class=“org.bar.FooImpl” interface=“org.foo.Foo” />

2. Plugin B imports the service:

   <component-import key=“foo” interface=“foo.Foo” />
3. Better insulate plugins
 from product changes
• Host applications can decide which versioned
  packages to expose to plugins
  scanner.addPackageIncludes(Arrays.asList(
    “com.atlassian.*”,
    “org.apache.commons.*”));

• Host applications expose specific host
  components:
  <bean name=quot;fooquot; class=quot;com.atlassian.
    FooableBeanquot; plugin:available=quot;truequot; />

  Or
  @AvailableToPlugins
  public class MyManager implements Manager
    {...}
Plugins 2
Why should you care?
Built for integration

Shipped today with Atlassian applications
with different:
• Dependency injection libraries
• Web frameworks
• Persistence frameworks
On to the code . . .
Takeaway: Use plugins
and OSGi to tame your
     beastly apps
Questions?

http://studio.atlassian.com/wiki/display/PLUG
             http://felix.apache.org

More Related Content

What's hot

Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring FrameworkHùng Nguyễn Huy
 
Spring core module
Spring core moduleSpring core module
Spring core moduleRaj Tomar
 
Spring framework-tutorial
Spring framework-tutorialSpring framework-tutorial
Spring framework-tutorialvinayiqbusiness
 
Portlet Framework: the Liferay way
Portlet Framework: the Liferay wayPortlet Framework: the Liferay way
Portlet Framework: the Liferay wayriround
 
The liferay case: lessons learned evolving from RPC to Hypermedia REST APIs
The liferay case: lessons learned evolving from RPC to Hypermedia REST APIsThe liferay case: lessons learned evolving from RPC to Hypermedia REST APIs
The liferay case: lessons learned evolving from RPC to Hypermedia REST APIsJorge Ferrer
 
Hibernate Interview Questions
Hibernate Interview QuestionsHibernate Interview Questions
Hibernate Interview QuestionsSyed Shahul
 
Mobile Application Security Testing (Static Code Analysis) of Android App
Mobile Application Security Testing (Static Code Analysis) of Android AppMobile Application Security Testing (Static Code Analysis) of Android App
Mobile Application Security Testing (Static Code Analysis) of Android AppAbhilash Venkata
 
apidays LIVE LONDON - Discovering API Version differences with ease by Jaap B...
apidays LIVE LONDON - Discovering API Version differences with ease by Jaap B...apidays LIVE LONDON - Discovering API Version differences with ease by Jaap B...
apidays LIVE LONDON - Discovering API Version differences with ease by Jaap B...apidays
 
Java Spring framework, Dependency Injection, DI, IoC, Inversion of Control
Java Spring framework, Dependency Injection, DI, IoC, Inversion of ControlJava Spring framework, Dependency Injection, DI, IoC, Inversion of Control
Java Spring framework, Dependency Injection, DI, IoC, Inversion of ControlArjun Thakur
 
Microsoft identity platform community call-May 2020
Microsoft identity platform community call-May 2020Microsoft identity platform community call-May 2020
Microsoft identity platform community call-May 2020Microsoft 365 Developer
 
Introduction to Spring Framework and Spring IoC
Introduction to Spring Framework and Spring IoCIntroduction to Spring Framework and Spring IoC
Introduction to Spring Framework and Spring IoCFunnelll
 
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
 
Pentesting With Web Services in 2012
Pentesting With Web Services in 2012Pentesting With Web Services in 2012
Pentesting With Web Services in 2012Ishan Girdhar
 
Nullcon Goa 2016 - Automated Mobile Application Security Testing with Mobile ...
Nullcon Goa 2016 - Automated Mobile Application Security Testing with Mobile ...Nullcon Goa 2016 - Automated Mobile Application Security Testing with Mobile ...
Nullcon Goa 2016 - Automated Mobile Application Security Testing with Mobile ...Ajin Abraham
 

What's hot (20)

Yii Framework
Yii FrameworkYii Framework
Yii Framework
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework
 
Java spring ppt
Java spring pptJava spring ppt
Java spring ppt
 
Spring core module
Spring core moduleSpring core module
Spring core module
 
Spring framework-tutorial
Spring framework-tutorialSpring framework-tutorial
Spring framework-tutorial
 
Java Spring Framework
Java Spring FrameworkJava Spring Framework
Java Spring Framework
 
Portlet Framework: the Liferay way
Portlet Framework: the Liferay wayPortlet Framework: the Liferay way
Portlet Framework: the Liferay way
 
The liferay case: lessons learned evolving from RPC to Hypermedia REST APIs
The liferay case: lessons learned evolving from RPC to Hypermedia REST APIsThe liferay case: lessons learned evolving from RPC to Hypermedia REST APIs
The liferay case: lessons learned evolving from RPC to Hypermedia REST APIs
 
Hibernate Interview Questions
Hibernate Interview QuestionsHibernate Interview Questions
Hibernate Interview Questions
 
Mobile Application Security Testing (Static Code Analysis) of Android App
Mobile Application Security Testing (Static Code Analysis) of Android AppMobile Application Security Testing (Static Code Analysis) of Android App
Mobile Application Security Testing (Static Code Analysis) of Android App
 
apidays LIVE LONDON - Discovering API Version differences with ease by Jaap B...
apidays LIVE LONDON - Discovering API Version differences with ease by Jaap B...apidays LIVE LONDON - Discovering API Version differences with ease by Jaap B...
apidays LIVE LONDON - Discovering API Version differences with ease by Jaap B...
 
Java Spring framework, Dependency Injection, DI, IoC, Inversion of Control
Java Spring framework, Dependency Injection, DI, IoC, Inversion of ControlJava Spring framework, Dependency Injection, DI, IoC, Inversion of Control
Java Spring framework, Dependency Injection, DI, IoC, Inversion of Control
 
Microsoft identity platform community call-May 2020
Microsoft identity platform community call-May 2020Microsoft identity platform community call-May 2020
Microsoft identity platform community call-May 2020
 
Introduction to Spring Framework and Spring IoC
Introduction to Spring Framework and Spring IoCIntroduction to Spring Framework and Spring IoC
Introduction to Spring Framework and Spring IoC
 
Spring notes
Spring notesSpring notes
Spring notes
 
Qark DefCon 23
Qark DefCon 23Qark DefCon 23
Qark DefCon 23
 
Spring
SpringSpring
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
 
Pentesting With Web Services in 2012
Pentesting With Web Services in 2012Pentesting With Web Services in 2012
Pentesting With Web Services in 2012
 
Nullcon Goa 2016 - Automated Mobile Application Security Testing with Mobile ...
Nullcon Goa 2016 - Automated Mobile Application Security Testing with Mobile ...Nullcon Goa 2016 - Automated Mobile Application Security Testing with Mobile ...
Nullcon Goa 2016 - Automated Mobile Application Security Testing with Mobile ...
 

Viewers also liked

Laguerradepacifico 121112180412-phpapp01
Laguerradepacifico 121112180412-phpapp01Laguerradepacifico 121112180412-phpapp01
Laguerradepacifico 121112180412-phpapp01s4league_ms
 
Desarrollo De La Guerra I Parte
Desarrollo De La Guerra I ParteDesarrollo De La Guerra I Parte
Desarrollo De La Guerra I Partejuancito15
 
La Guerra Del PacíFico
La Guerra Del PacíFicoLa Guerra Del PacíFico
La Guerra Del PacíFicoguest267c05
 
LA ECONOMÍA EN EL PERIODO DE ENTREGUERRAS.
LA ECONOMÍA EN EL PERIODO DE ENTREGUERRAS.LA ECONOMÍA EN EL PERIODO DE ENTREGUERRAS.
LA ECONOMÍA EN EL PERIODO DE ENTREGUERRAS.Mario Montal
 
Guerra del Pacífico. consecuencias
Guerra del Pacífico. consecuenciasGuerra del Pacífico. consecuencias
Guerra del Pacífico. consecuenciasjosebarriga1973
 
Campaña marítima de la guerra del pacífico
Campaña marítima de la guerra del pacíficoCampaña marítima de la guerra del pacífico
Campaña marítima de la guerra del pacíficoPatriciavll
 
Ppt la guerra del pacífico
Ppt la guerra del pacíficoPpt la guerra del pacífico
Ppt la guerra del pacíficojuanpoto2
 
La guerra del pacifico
La guerra del pacificoLa guerra del pacifico
La guerra del pacificoJozexd97
 

Viewers also liked (12)

Laguerradepacifico 121112180412-phpapp01
Laguerradepacifico 121112180412-phpapp01Laguerradepacifico 121112180412-phpapp01
Laguerradepacifico 121112180412-phpapp01
 
Desarrollo De La Guerra I Parte
Desarrollo De La Guerra I ParteDesarrollo De La Guerra I Parte
Desarrollo De La Guerra I Parte
 
Spss para-principiantes
Spss para-principiantesSpss para-principiantes
Spss para-principiantes
 
La Guerra Del PacíFico
La Guerra Del PacíFicoLa Guerra Del PacíFico
La Guerra Del PacíFico
 
LA ECONOMÍA EN EL PERIODO DE ENTREGUERRAS.
LA ECONOMÍA EN EL PERIODO DE ENTREGUERRAS.LA ECONOMÍA EN EL PERIODO DE ENTREGUERRAS.
LA ECONOMÍA EN EL PERIODO DE ENTREGUERRAS.
 
La segunda revolución industrial
La segunda revolución industrialLa segunda revolución industrial
La segunda revolución industrial
 
Guerra del Pacífico. consecuencias
Guerra del Pacífico. consecuenciasGuerra del Pacífico. consecuencias
Guerra del Pacífico. consecuencias
 
Campaña marítima de la guerra del pacífico
Campaña marítima de la guerra del pacíficoCampaña marítima de la guerra del pacífico
Campaña marítima de la guerra del pacífico
 
Guerra del pacifico
Guerra del pacificoGuerra del pacifico
Guerra del pacifico
 
SPSS – Tutorial para Iniciantes
SPSS – Tutorial para IniciantesSPSS – Tutorial para Iniciantes
SPSS – Tutorial para Iniciantes
 
Ppt la guerra del pacífico
Ppt la guerra del pacíficoPpt la guerra del pacífico
Ppt la guerra del pacífico
 
La guerra del pacifico
La guerra del pacificoLa guerra del pacifico
La guerra del pacifico
 

Similar to Taming Beastly Web Applications with Server-Side OSGi

Plugins 2.0: The Overview
Plugins 2.0: The OverviewPlugins 2.0: The Overview
Plugins 2.0: The Overviewmrdon
 
Seattle StrongLoop Node.js Workshop
Seattle StrongLoop Node.js WorkshopSeattle StrongLoop Node.js Workshop
Seattle StrongLoop Node.js WorkshopJimmy Guerrero
 
Cross Platform Mobile Apps with APIs from Qcon San Francisco
Cross Platform Mobile Apps with APIs from Qcon San FranciscoCross Platform Mobile Apps with APIs from Qcon San Francisco
Cross Platform Mobile Apps with APIs from Qcon San FranciscoCA API Management
 
API Virtualization: Mocking on Steroids
API Virtualization: Mocking on SteroidsAPI Virtualization: Mocking on Steroids
API Virtualization: Mocking on SteroidsSmartBear
 
Anypoint connector Roadmap
Anypoint connector RoadmapAnypoint connector Roadmap
Anypoint connector Roadmapdanishsm84
 
Rewriting a Plugin Architecture 3 Times to Harness the API Economy
Rewriting a Plugin Architecture 3 Times to Harness the API EconomyRewriting a Plugin Architecture 3 Times to Harness the API Economy
Rewriting a Plugin Architecture 3 Times to Harness the API EconomyTim Pettersen
 
Extend Your Use of JIRA by Solving Your Unique Concerns: An Exposé of the New...
Extend Your Use of JIRA by Solving Your Unique Concerns: An Exposé of the New...Extend Your Use of JIRA by Solving Your Unique Concerns: An Exposé of the New...
Extend Your Use of JIRA by Solving Your Unique Concerns: An Exposé of the New...Atlassian
 
FIWARE Wednesday Webinars - How to Debug IoT Agents
FIWARE Wednesday Webinars - How to Debug IoT AgentsFIWARE Wednesday Webinars - How to Debug IoT Agents
FIWARE Wednesday Webinars - How to Debug IoT AgentsFIWARE
 
Spring Boot & Spring Cloud Apps on Pivotal Application Service - Daniel Lavoie
Spring Boot & Spring Cloud Apps on Pivotal Application Service - Daniel LavoieSpring Boot & Spring Cloud Apps on Pivotal Application Service - Daniel Lavoie
Spring Boot & Spring Cloud Apps on Pivotal Application Service - Daniel LavoieVMware Tanzu
 
The Web on OSGi: Here's How
The Web on OSGi: Here's HowThe Web on OSGi: Here's How
The Web on OSGi: Here's Howmrdon
 
Server-side OSGi with Apache Sling (OSGiDevCon 2011)
Server-side OSGi with Apache Sling (OSGiDevCon 2011)Server-side OSGi with Apache Sling (OSGiDevCon 2011)
Server-side OSGi with Apache Sling (OSGiDevCon 2011)Felix Meschberger
 
Server-side OSGi with Apache Sling
Server-side OSGi with Apache SlingServer-side OSGi with Apache Sling
Server-side OSGi with Apache SlingFelix Meschberger
 
OAuth - Don’t Throw the Baby Out with the Bathwater
OAuth - Don’t Throw the Baby Out with the Bathwater OAuth - Don’t Throw the Baby Out with the Bathwater
OAuth - Don’t Throw the Baby Out with the Bathwater Apigee | Google Cloud
 
Social ent. with java on heroku
Social ent. with java on herokuSocial ent. with java on heroku
Social ent. with java on herokuAnand B Narasimhan
 
"Wie passen Serverless & Autonomous zusammen?"
"Wie passen Serverless & Autonomous zusammen?""Wie passen Serverless & Autonomous zusammen?"
"Wie passen Serverless & Autonomous zusammen?"Volker Linz
 
Oracle API Platform Cloud Service Best Practices & Lessons Learnt
Oracle API Platform Cloud Service Best Practices & Lessons LearntOracle API Platform Cloud Service Best Practices & Lessons Learnt
Oracle API Platform Cloud Service Best Practices & Lessons Learntluisw19
 
Dependency Injection, Zend Framework and Symfony Container
Dependency Injection, Zend Framework and Symfony ContainerDependency Injection, Zend Framework and Symfony Container
Dependency Injection, Zend Framework and Symfony ContainerDiego Lewin
 

Similar to Taming Beastly Web Applications with Server-Side OSGi (20)

Plugins 2.0: The Overview
Plugins 2.0: The OverviewPlugins 2.0: The Overview
Plugins 2.0: The Overview
 
Seattle StrongLoop Node.js Workshop
Seattle StrongLoop Node.js WorkshopSeattle StrongLoop Node.js Workshop
Seattle StrongLoop Node.js Workshop
 
Codeigniter
CodeigniterCodeigniter
Codeigniter
 
Cross Platform Mobile Apps with APIs from Qcon San Francisco
Cross Platform Mobile Apps with APIs from Qcon San FranciscoCross Platform Mobile Apps with APIs from Qcon San Francisco
Cross Platform Mobile Apps with APIs from Qcon San Francisco
 
API Virtualization: Mocking on Steroids
API Virtualization: Mocking on SteroidsAPI Virtualization: Mocking on Steroids
API Virtualization: Mocking on Steroids
 
Anypoint connector Roadmap
Anypoint connector RoadmapAnypoint connector Roadmap
Anypoint connector Roadmap
 
Gohan
GohanGohan
Gohan
 
Rewriting a Plugin Architecture 3 Times to Harness the API Economy
Rewriting a Plugin Architecture 3 Times to Harness the API EconomyRewriting a Plugin Architecture 3 Times to Harness the API Economy
Rewriting a Plugin Architecture 3 Times to Harness the API Economy
 
Extend Your Use of JIRA by Solving Your Unique Concerns: An Exposé of the New...
Extend Your Use of JIRA by Solving Your Unique Concerns: An Exposé of the New...Extend Your Use of JIRA by Solving Your Unique Concerns: An Exposé of the New...
Extend Your Use of JIRA by Solving Your Unique Concerns: An Exposé of the New...
 
FIWARE Wednesday Webinars - How to Debug IoT Agents
FIWARE Wednesday Webinars - How to Debug IoT AgentsFIWARE Wednesday Webinars - How to Debug IoT Agents
FIWARE Wednesday Webinars - How to Debug IoT Agents
 
Spring Boot & Spring Cloud Apps on Pivotal Application Service - Daniel Lavoie
Spring Boot & Spring Cloud Apps on Pivotal Application Service - Daniel LavoieSpring Boot & Spring Cloud Apps on Pivotal Application Service - Daniel Lavoie
Spring Boot & Spring Cloud Apps on Pivotal Application Service - Daniel Lavoie
 
The Web on OSGi: Here's How
The Web on OSGi: Here's HowThe Web on OSGi: Here's How
The Web on OSGi: Here's How
 
Server-side OSGi with Apache Sling (OSGiDevCon 2011)
Server-side OSGi with Apache Sling (OSGiDevCon 2011)Server-side OSGi with Apache Sling (OSGiDevCon 2011)
Server-side OSGi with Apache Sling (OSGiDevCon 2011)
 
Server-side OSGi with Apache Sling
Server-side OSGi with Apache SlingServer-side OSGi with Apache Sling
Server-side OSGi with Apache Sling
 
OAuth - Don’t Throw the Baby Out with the Bathwater
OAuth - Don’t Throw the Baby Out with the Bathwater OAuth - Don’t Throw the Baby Out with the Bathwater
OAuth - Don’t Throw the Baby Out with the Bathwater
 
Social ent. with java on heroku
Social ent. with java on herokuSocial ent. with java on heroku
Social ent. with java on heroku
 
"Wie passen Serverless & Autonomous zusammen?"
"Wie passen Serverless & Autonomous zusammen?""Wie passen Serverless & Autonomous zusammen?"
"Wie passen Serverless & Autonomous zusammen?"
 
Oracle API Platform Cloud Service Best Practices & Lessons Learnt
Oracle API Platform Cloud Service Best Practices & Lessons LearntOracle API Platform Cloud Service Best Practices & Lessons Learnt
Oracle API Platform Cloud Service Best Practices & Lessons Learnt
 
La monetizzazione delle API
La monetizzazione delle APILa monetizzazione delle API
La monetizzazione delle API
 
Dependency Injection, Zend Framework and Symfony Container
Dependency Injection, Zend Framework and Symfony ContainerDependency Injection, Zend Framework and Symfony Container
Dependency Injection, Zend Framework and Symfony Container
 

Recently uploaded

Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
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 FresherRemote DBA Services
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024SynarionITSolutions
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
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
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
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 businesspanagenda
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 

Recently uploaded (20)

Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
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
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
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
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
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
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 

Taming Beastly Web Applications with Server-Side OSGi

  • 1. Taming Beastly Web Applications with Server-Side OSGi Don Brown, Atlassian
  • 2. It starts so simple. . .
  • 3. Then this happens. . . SOAP interface REST interface IRC interface Slooow deployment Microsoft Excel export and import Report builder 50+ third-party libraries and frameworks PKI card authentication Thousands of classes
  • 4. Solution: Plugins Application Plugin Framework Excel REST IRC SOAP Plugin Plugin Plugin Plugin Report PKI Auth Plugin Plugin
  • 5. Anatomy of a Plugin Plugin JAR Java Utility JARs Classes Resources XML (images, Descriptor css, etc)
  • 7. plugin.xml <plugin key=”my.plugin”> <plugin-info> <version>1.0</version> </plugin-info> <servlet key=”helloWorld” class=“com.myplugin.HelloWorld”> <url-pattern>/helloWorld</url-pattern> </servlet> </plugin>
  • 8. Not just any plugin framework . . . . . . Now Open Source (BSD)
  • 9. Right, but what does this have to do with OSGi?
  • 10. What if your plugins need plugins? Application Plugin Framework Excel REST IRC SOAP Plugin Plugin Plugin Plugin Report PKI Auth Plugin Plugin
  • 11. Want: inter-plugin communication Report Plugin Report Report Built-in Services UI Reports Users Sales Usage Reports Reports Reports Plugin Plugin Plugin
  • 12. Want: dynamic deployment plugins WEB-INF/lib
  • 13. Want: application and plugin isolation Application Internal External Internal Services Services Resources Excel REST IRC SOAP Plugin Plugin Plugin Plugin Report PKI Auth Plugin Plugin
  • 14. Want: application and plugin isolation Application Internal External Internal Services Services Resources Excel REST IRC SOAP Plugin Plugin Plugin Plugin Report PKI Auth Plugin Plugin
  • 15. OSGi Basics Dynamic module system for Java Features: • Service registry • Lifecycle model • Bundle dependency system • Optional security layer
  • 16. OSGi Terms Bundle - Jar file with special OSGi entries in its manifest and containing classes, resources, and other jars Lifecycle - States a bundle goes through: uninstalled, installed, resolved, starting, stopping, active Service - An object instance exposed under the one or more interfaces it implements and a map of properties
  • 17. Bundle Manifest Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-SymbolicName: org.foo.Example Bundle-Version: 1.0 Import-Package: org.bar;version=quot;1.3.0” Export-Package: org.foo.api Bundle-ClassPath: .,META-INF/lib/foo.jar
  • 19. OSGi Services Key: “com.foo.MyInterface” Instance: com.foo.MyService Properties: name => foo someProperty => someValue
  • 20. What does that mean? • Upgrade bundles (think super jars) at runtime • Bundles can depend on other bundles at a service, package, or jar level • Bundles can hide packages from other bundles and version exposed packages
  • 21. So how does OSGi help us?
  • 22.
  • 23. 1. Ability for plugins to depend on each other Plugins can generate their own OSGi headers or: <plugin-info> <bundle-instructions> <Require-Bundle> org.otherPlugin;bundle- version=quot;[3.2.0,4.0.0)</Require-Bundle> <Import-Package> *,org.otherPlugin.api;version=”[3.2.0,4.0.0)” </ Import-Package> </bundle-instructions> </plugin-info>
  • 24. 2. Ability for plugins to define extension points 1. Plugin A exposes its implementation: <component key=“foo” public=“true” class=“org.bar.FooImpl” interface=“org.foo.Foo” /> 2. Plugin B imports the service: <component-import key=“foo” interface=“foo.Foo” />
  • 25. 3. Better insulate plugins from product changes • Host applications can decide which versioned packages to expose to plugins scanner.addPackageIncludes(Arrays.asList( “com.atlassian.*”, “org.apache.commons.*”)); • Host applications expose specific host components: <bean name=quot;fooquot; class=quot;com.atlassian. FooableBeanquot; plugin:available=quot;truequot; /> Or @AvailableToPlugins public class MyManager implements Manager {...}
  • 27. Why should you care?
  • 28. Built for integration Shipped today with Atlassian applications with different: • Dependency injection libraries • Web frameworks • Persistence frameworks
  • 29. On to the code . . .
  • 30. Takeaway: Use plugins and OSGi to tame your beastly apps