SlideShare une entreprise Scribd logo
1  sur  22
FuseSource Technology:
OSGi Made Simple: Introducing Fabric Application Bundles




Rob Davies
CTO
April 2012

1   © 2012 FuseSource Corp. All rights reserved.   FuseSource Confidential
FuseSource : the Gorilla Among Open Source Vendors

     Forrester ESB Wave Report
      Q2 2011: FuseSource is the
      only open source “Leader”
     Largest market presence –
      over 200 customers
     Marquee customers and
      good tooling allow us to
      compete in the low end
     Weaker solutions cannot
      match FuseSource stats:
       •    100s of millions transactions a day
       •    No down time
       •    200,000+ downloads a month
       •    25+ leaders & committers at Apache

2      © 2012 FuseSource Corp. All rights reserved.   FuseSource Confidential
FuseSource : All About Customer Success


     Performance
        • Expertise in architecting for performance
        • Distribution designed for high-performance computing
        • Sabre’s travel gateway is processing over 1.5 billion txn/day
          (32,000+ txn/sec) on 13 servers with zero downtime


     Global scalability
        • No license fees: can deploy at 1,000s of locations
        • Distributed nature of distribution supports scaling out
        • SpecSavers deploys in 1,400 global retail stores


     Proven Enterprise Quality of Service
        • Proven in mission-critical applications
        • CERN is using to run operational grid in Large Hadron Collider
        • FAA is using in next-generation air traffic control (SWIM)

3       © 2012 FuseSource Corp. All rights reserved.                FuseSource Confidential
Agenda


       Why Fuse Fabric ?
       What does Fuse Fabric do ?
       High level architecture
       Deep dive
       Q&A




4       © 2012 FuseSource Corp. All rights reserved.   FuseSource Confidential
What’s good with using WARs ?

     really simple for application developers to create and use
       • simple flat classpath which is easy to grok
     single file to deploy
     if it works once in Tomcat/Jetty it usually always does




5      © 2012 FuseSource Corp. All rights reserved.    FuseSource Confidential
What is wrong with WARs ?

     not easy to share code across WARs
       • usually end up hacking a Tomcat/Jetty distro and hand-copying
         jars in shared classloader
     they tend to be pretty huge
     not possible to just update one small service; need to
      redeploy entire applications
     each small change to one service often requires a full test
      of the entire application




6      © 2012 FuseSource Corp. All rights reserved.   FuseSource Confidential
OSGi background

       OSGi originally stood for “Open Services Gateway initiative”
         -   An initiative focused on deploying Java solutions into “residential
             gateways” for smart homes and building controls

       OSGi tackles the problem of deploying and administering Java
        modules (aka “bundles”)
         -   Lifecycle – How to load, start, and stop Java bundles without shutting
             down the JVM
         -   Remote management and administration
         -   Class-loading
         -   Versioning
         -   Dependency management

       The OSGi alliance was founded in 1999 to promote wide scale
        adoption of OSGi technology
    -   You can find them on the web at http://www.osgi.org

7        © 2012 FuseSource Corp. All rights reserved.       FuseSource Confidential
Bundles

    •   A bundle is a Java archive (JAR) with some meta-data
        • The meta-data is provided in plain-text in the META-
            INF/MANIFEST.MF file

    •   Bundle meta-data includes the following:
        • BundleName – A descriptive, human readable name for the bundle
        • Bundle-Symbolic-Name – A unique name for the bundle
        • Bundle-Version – The version of the bundle, in the format X.X.X
        • Export-Package – A list of Java packages “visible” from the
            bundle
             • In OSGi, all packages are hidden unless explicitly exported
        •   Import-Package – A list of the Java packages that this bundles
            requires
             • Only those packages matching java.* are imported by default
             • All other packages must be imported explicitly


8       © 2012 FuseSource Corp. All rights reserved.      FuseSource Confidential
Bundle versioning in OSGi

    •   Bundles are tagged with a Bundle-Version in the MANIFEST.MF
        file, for example:
            Bundle-Version: 1.2.3
    •   When a bundle imports packages from another bundle, it can
        specify the version number:
            Import-Package: com.mycompany.stuff;version="1.2.3"
    •   Note that exported package should have a version too!
    •   Alternatively, specify a range of compatible versions with brackets:
         -    Use „[„ or „]‟ to specify a lower or upper limit, and to include the limit
         -    Use „(„ or „)‟ to specify a lower or upper limit and to exclude the limit
    •   For example:
         Import−Package: com.mycompany.stuff;version=“[1.2.3,1.2.5)”
         - Imports version 1.2.3 or 1.2.4, but not 1.2.5
         - Note that “1.2.3” for a version means version >= 1.2.3. If you want only 1.2.3
           then use “[1.2.3,1.2.3]” or “[1.2.3,1.2.4)”




9        © 2012 FuseSource Corp. All rights reserved.                   FuseSource Confidential
What’s good about OSGi ?

  ideal micro container for the JVM
     • small and modular
     • simple and powerful model
       – bundle context, listener, registry
  easy to extend to support
     • deployment units like WARs, EARs, JBI
     • frameworks like spring-dm, OSGi Blueprints, CDI, guice etc
  hot (re) deployment at a fine or course grained level of
   services at runtime
     • awesome for developers of JEE servers and ESBs
     • Apache Karaf &
       ServiceMix, JBoss, GlassFish, WebSphere, WebLogic etc



10   © 2012 FuseSource Corp. All rights reserved.    FuseSource Confidential
What’s wrong with OSGi ?

  bundles are very fine grained and use package level metadata
  import and exports with version ranges required on every
   package
     • usually quite a few packages per jar
     • typical applications have 10s or 100s of jars
     • lots and lots of packages and metadata to get wrong!
  package level metadata often a bit too low level for developers
  folks who just wanna get stuff done fast!
  writing bundles is easy
     • installing and actually starting bundles together so they actually work is
       much harder




11   © 2012 FuseSource Corp. All rights reserved.           FuseSource Confidential
Its not just a tooling problem

  developers have to spend a lot of time messing about
   either
     • making new osgi bundles for existing jars
     • messing around with whatever tool they use to generate the OSGi
       metadata to tweak it all
     • keeping the metadata/imports up to date as dependencies
       change
  requires all developers learn all the OSGi metadata and
   the OSGi metadata geneartion tools
     • then using some other mechanism to figure out which bundles to
       actually install
     • Karaf Features, scripting, tarballs etc
  using 50-100 bundles; life soon becomes very difficult


12   © 2012 FuseSource Corp. All rights reserved.   FuseSource Confidential
Fabric Bundles

  Easy to deploy and control which classes are shared across
   deployment units
  A common model of class loaders across build tools, IDE
   and OSGi container
  how many times does code work in isolation, only to fail
   to deploy to the container using OSGi ?
  developers can concentrate on solving business
   problems, instead resolving OSGi bundle hell




13   © 2012 FuseSource Corp. All rights reserved.   FuseSource Confidential
What is a Fabric Bundle ?

  Any jar containing a pom.xml - which defines the transitive
   dependencies for that jar
  This is the default for the more popular build tools
  maven
  SBT
  Others (Ant, Ivy, Gradle etc) - just need to make a jar with
   a pom.xml inside




14   © 2012 FuseSource Corp. All rights reserved.   FuseSource Confidential
What you find in a Maven built jar




15   © 2012 FuseSource Corp. All rights reserved.   FuseSource Confidential
How do you use Fab ?

  Use Fuse ESB - a flexible, standards-based enterprise
   service bus - it fully supports fabric bundles!

  You simply install any FAB as if it were a WAR or Karaf
   feature:

     install fab:mvn:<groupId>/<artifactId>/<version>


  OR - deploy your FAB archive (a jar postfixed with .fab) to
   the Fuse ESB deploy directory



16   © 2012 FuseSource Corp. All rights reserved.   FuseSource Confidential
How do Fabric Bundles work ?

  When a FAB is installed, Fuse ESB converts it into a
   regular OSGi bundle
  By default, Fuse ESB will automatically install all the
   transitive dependencies, if they are not already loaded
   into the container
  A FAB can depend on regular jars or real OSGi bundles!




17   © 2012 FuseSource Corp. All rights reserved.   FuseSource Confidential
Configuring Fabric Application Bundles

  By default, FAB uses a regular flat class loader:
  This means what you build and test outside the Fuse
   ESB OSGi container will typically work inside Fuse ESB.
  Because a FAB is converted into a regular OSGi
   bundle, you still benefit from been able to install and
   deploy multiple versions of the same FAB or use different
   versions of dependencies
  However, this does negate some of the benefits of
   OSGi, the ability to share code across multiple bundles
  So you can start simple, and iteratively get more complex
   code sharing deployments through configuring your FAB.


18   © 2012 FuseSource Corp. All rights reserved.   FuseSource Confidential
Provided dependencies

To share an existing dependency (and its transitive
dependencies) you declare a dependency as provided in the
pm.xml - e.g:


     <dependency>
      <groupId>org.apache.camel</groupId>
      <artifactId>camel-core</artifactId>
      <version>${camel-version}</version>
      <scope>provided</scope>
     </dependency>



19   © 2012 FuseSource Corp. All rights reserved.   FuseSource Confidential
Provided dependencies (continued)

  You can alternatively, use the Fabric-Provided-Dependency
  in the jar manifest header, to specify zero to many shared
  dependencies:

Fabric-Provided-Dependency: <grpId1>:<artifactId1> ....


  You can also use wild cards - e.g. if you want to share all spring
  and camel dependencies:

Fabric-Provided-Dependency: org.apache.camel:* org.springframework:*




  20   © 2012 FuseSource Corp. All rights reserved.   FuseSource Confidential
Conclusion

  Using OSGi as a component framework has a great many
   benefits
  modularity and sharing of code
  dynamic updates
  versioning
  reuse
  However, deployments in OSGi containers can be hard
  FuseSource has created Fabric bundles to make deploying in
   OSGi extremely simple, but also flexible, so you can still gain all
   the benefits of OSGi when you want to
  Fuse ESB ships with Fabric bundles by default, another reason
   Fuse ESB is the most popular enterprise open source solution
   today.



21   © 2012 FuseSource Corp. All rights reserved.   FuseSource Confidential
Any Questions?


No vendor lock-in
    Free to redistribute
         Enterprise class……..
22   © 2012 FuseSource Corp. All rights reserved.   FuseSource Confidential

Contenu connexe

Tendances

SOA & WebLogic - Lift & Shift to the Cloud
SOA & WebLogic - Lift & Shift to the CloudSOA & WebLogic - Lift & Shift to the Cloud
SOA & WebLogic - Lift & Shift to the CloudSimon Haslam
 
Resilient Enterprise Messaging with JBoss A-MQ - DevNation 2014
Resilient Enterprise Messaging with JBoss A-MQ - DevNation 2014Resilient Enterprise Messaging with JBoss A-MQ - DevNation 2014
Resilient Enterprise Messaging with JBoss A-MQ - DevNation 2014Scott Cranton
 
Serverless Patterns by Jesse Butler
Serverless Patterns by Jesse ButlerServerless Patterns by Jesse Butler
Serverless Patterns by Jesse ButlerOracle Developers
 
.NET Alice in a Java Integration Wonderland - Mule Anypoint Platform Microsof...
.NET Alice in a Java Integration Wonderland - Mule Anypoint Platform Microsof....NET Alice in a Java Integration Wonderland - Mule Anypoint Platform Microsof...
.NET Alice in a Java Integration Wonderland - Mule Anypoint Platform Microsof...Nikolai Blackie
 
General Capabilities of GraalVM by Oleg Selajev @shelajev
General Capabilities of GraalVM by Oleg Selajev @shelajevGeneral Capabilities of GraalVM by Oleg Selajev @shelajev
General Capabilities of GraalVM by Oleg Selajev @shelajevOracle Developers
 
Servlet 4.0 JavaOne 2017
Servlet 4.0 JavaOne 2017Servlet 4.0 JavaOne 2017
Servlet 4.0 JavaOne 2017Ed Burns
 
Fast Kafka Apps! (Edoardo Comar and Mickael Maison, IBM) Kafka Summit London ...
Fast Kafka Apps! (Edoardo Comar and Mickael Maison, IBM) Kafka Summit London ...Fast Kafka Apps! (Edoardo Comar and Mickael Maison, IBM) Kafka Summit London ...
Fast Kafka Apps! (Edoardo Comar and Mickael Maison, IBM) Kafka Summit London ...confluent
 
JBoye Presentation: WCM Trends for 2010
JBoye Presentation: WCM Trends for 2010JBoye Presentation: WCM Trends for 2010
JBoye Presentation: WCM Trends for 2010David Nuescheler
 
Tips & Tricks for Java & SOA Cloud Service
Tips & Tricks for Java & SOA Cloud ServiceTips & Tricks for Java & SOA Cloud Service
Tips & Tricks for Java & SOA Cloud ServiceSimon Haslam
 
WebSphere Technical University: Top WebSphere Problem Determination Features
WebSphere Technical University: Top WebSphere Problem Determination FeaturesWebSphere Technical University: Top WebSphere Problem Determination Features
WebSphere Technical University: Top WebSphere Problem Determination FeaturesChris Bailey
 
Schema Registry & Stream Analytics Manager
Schema Registry  & Stream Analytics ManagerSchema Registry  & Stream Analytics Manager
Schema Registry & Stream Analytics ManagerSriharsha Chintalapani
 
Experiences of SOACS
Experiences of SOACSExperiences of SOACS
Experiences of SOACSSimon Haslam
 
Introduction to the WSO2 Carbon Platform
Introduction to the WSO2 Carbon Platform  Introduction to the WSO2 Carbon Platform
Introduction to the WSO2 Carbon Platform WSO2
 
Enterprise Integration Patterns with ActiveMQ
Enterprise Integration Patterns with ActiveMQEnterprise Integration Patterns with ActiveMQ
Enterprise Integration Patterns with ActiveMQRob Davies
 
MySQL High Availability with Replication New Features
MySQL High Availability with Replication New FeaturesMySQL High Availability with Replication New Features
MySQL High Availability with Replication New FeaturesShivji Kumar Jha
 
The Evolution of Integration
The Evolution of IntegrationThe Evolution of Integration
The Evolution of IntegrationPaul Fremantle
 
Private IaaS Cloud Provider
Private IaaS Cloud ProviderPrivate IaaS Cloud Provider
Private IaaS Cloud ProviderDavid Pasek
 
JavaOne 2014 BOF4241 What's Next for JSF?
JavaOne 2014 BOF4241 What's Next for JSF?JavaOne 2014 BOF4241 What's Next for JSF?
JavaOne 2014 BOF4241 What's Next for JSF?Edward Burns
 

Tendances (20)

SOA & WebLogic - Lift & Shift to the Cloud
SOA & WebLogic - Lift & Shift to the CloudSOA & WebLogic - Lift & Shift to the Cloud
SOA & WebLogic - Lift & Shift to the Cloud
 
Resilient Enterprise Messaging with JBoss A-MQ - DevNation 2014
Resilient Enterprise Messaging with JBoss A-MQ - DevNation 2014Resilient Enterprise Messaging with JBoss A-MQ - DevNation 2014
Resilient Enterprise Messaging with JBoss A-MQ - DevNation 2014
 
Oracle Ravello
Oracle Ravello Oracle Ravello
Oracle Ravello
 
Serverless Patterns by Jesse Butler
Serverless Patterns by Jesse ButlerServerless Patterns by Jesse Butler
Serverless Patterns by Jesse Butler
 
.NET Alice in a Java Integration Wonderland - Mule Anypoint Platform Microsof...
.NET Alice in a Java Integration Wonderland - Mule Anypoint Platform Microsof....NET Alice in a Java Integration Wonderland - Mule Anypoint Platform Microsof...
.NET Alice in a Java Integration Wonderland - Mule Anypoint Platform Microsof...
 
General Capabilities of GraalVM by Oleg Selajev @shelajev
General Capabilities of GraalVM by Oleg Selajev @shelajevGeneral Capabilities of GraalVM by Oleg Selajev @shelajev
General Capabilities of GraalVM by Oleg Selajev @shelajev
 
Servlet 4.0 JavaOne 2017
Servlet 4.0 JavaOne 2017Servlet 4.0 JavaOne 2017
Servlet 4.0 JavaOne 2017
 
Fast Kafka Apps! (Edoardo Comar and Mickael Maison, IBM) Kafka Summit London ...
Fast Kafka Apps! (Edoardo Comar and Mickael Maison, IBM) Kafka Summit London ...Fast Kafka Apps! (Edoardo Comar and Mickael Maison, IBM) Kafka Summit London ...
Fast Kafka Apps! (Edoardo Comar and Mickael Maison, IBM) Kafka Summit London ...
 
JBoye Presentation: WCM Trends for 2010
JBoye Presentation: WCM Trends for 2010JBoye Presentation: WCM Trends for 2010
JBoye Presentation: WCM Trends for 2010
 
Tips & Tricks for Java & SOA Cloud Service
Tips & Tricks for Java & SOA Cloud ServiceTips & Tricks for Java & SOA Cloud Service
Tips & Tricks for Java & SOA Cloud Service
 
WebSphere Technical University: Top WebSphere Problem Determination Features
WebSphere Technical University: Top WebSphere Problem Determination FeaturesWebSphere Technical University: Top WebSphere Problem Determination Features
WebSphere Technical University: Top WebSphere Problem Determination Features
 
Schema Registry & Stream Analytics Manager
Schema Registry  & Stream Analytics ManagerSchema Registry  & Stream Analytics Manager
Schema Registry & Stream Analytics Manager
 
Experiences of SOACS
Experiences of SOACSExperiences of SOACS
Experiences of SOACS
 
Introduction to the WSO2 Carbon Platform
Introduction to the WSO2 Carbon Platform  Introduction to the WSO2 Carbon Platform
Introduction to the WSO2 Carbon Platform
 
Global Netflix Platform
Global Netflix PlatformGlobal Netflix Platform
Global Netflix Platform
 
Enterprise Integration Patterns with ActiveMQ
Enterprise Integration Patterns with ActiveMQEnterprise Integration Patterns with ActiveMQ
Enterprise Integration Patterns with ActiveMQ
 
MySQL High Availability with Replication New Features
MySQL High Availability with Replication New FeaturesMySQL High Availability with Replication New Features
MySQL High Availability with Replication New Features
 
The Evolution of Integration
The Evolution of IntegrationThe Evolution of Integration
The Evolution of Integration
 
Private IaaS Cloud Provider
Private IaaS Cloud ProviderPrivate IaaS Cloud Provider
Private IaaS Cloud Provider
 
JavaOne 2014 BOF4241 What's Next for JSF?
JavaOne 2014 BOF4241 What's Next for JSF?JavaOne 2014 BOF4241 What's Next for JSF?
JavaOne 2014 BOF4241 What's Next for JSF?
 

Similaire à OSGi made simple - Fuse Application Bundles

Deploying FuseMQ with Fuse Fabric
Deploying FuseMQ with Fuse FabricDeploying FuseMQ with Fuse Fabric
Deploying FuseMQ with Fuse Fabricdejanb
 
Enterprise OSGi at eBay
Enterprise OSGi at eBayEnterprise OSGi at eBay
Enterprise OSGi at eBayTony Ng
 
Jax london 2011
Jax london 2011Jax london 2011
Jax london 2011njbartlett
 
Java Core | Java 8 and OSGi Modularisation | Tim Ellison & Neil Bartlett
Java Core | Java 8 and OSGi Modularisation | Tim Ellison & Neil BartlettJava Core | Java 8 and OSGi Modularisation | Tim Ellison & Neil Bartlett
Java Core | Java 8 and OSGi Modularisation | Tim Ellison & Neil BartlettJAX London
 
Java Modularity with OSGi
Java Modularity with OSGiJava Modularity with OSGi
Java Modularity with OSGiIlya Rybak
 
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
 
Use Case: Building OSGi Enterprise Applications (QCon 14)
Use Case: Building OSGi Enterprise Applications (QCon 14)Use Case: Building OSGi Enterprise Applications (QCon 14)
Use Case: Building OSGi Enterprise Applications (QCon 14)Carsten Ziegeler
 
Building Modular Enterprise Applications - C Ziegeler
Building Modular Enterprise Applications - C ZiegelerBuilding Modular Enterprise Applications - C Ziegeler
Building Modular Enterprise Applications - C Ziegelermfrancis
 
Osgi Webinar
Osgi WebinarOsgi Webinar
Osgi WebinarWSO2
 
create auto scale jboss cluster with openshift
create auto scale jboss cluster with openshiftcreate auto scale jboss cluster with openshift
create auto scale jboss cluster with openshiftYusuf Hadiwinata Sutandar
 
OSGi & Java EE: A hybrid approach to Enterprise Java Application Development,...
OSGi & Java EE: A hybrid approach to Enterprise Java Application Development,...OSGi & Java EE: A hybrid approach to Enterprise Java Application Development,...
OSGi & Java EE: A hybrid approach to Enterprise Java Application Development,...OpenBlend society
 
Part 8 - Enforcing modularity of JasForge using OSGI and Futures Evolutions
Part 8 - Enforcing modularity of JasForge using OSGI and Futures EvolutionsPart 8 - Enforcing modularity of JasForge using OSGI and Futures Evolutions
Part 8 - Enforcing modularity of JasForge using OSGI and Futures EvolutionsJasmine Conseil
 
OSGi Sticker Shock Eclipse Con 2010
OSGi Sticker Shock   Eclipse Con 2010OSGi Sticker Shock   Eclipse Con 2010
OSGi Sticker Shock Eclipse Con 2010ericjohnson
 
RESTful Services and Distributed OSGi - 04/2009
RESTful Services and Distributed OSGi - 04/2009RESTful Services and Distributed OSGi - 04/2009
RESTful Services and Distributed OSGi - 04/2009Roland Tritsch
 
Framework Modularity Layer - Glyn Normington, IBM
Framework Modularity Layer - Glyn Normington, IBMFramework Modularity Layer - Glyn Normington, IBM
Framework Modularity Layer - Glyn Normington, IBMmfrancis
 
OSGi Best Practices – Learn how to prevent common mistakes and build robust, ...
OSGi Best Practices – Learn how to prevent common mistakes and build robust, ...OSGi Best Practices – Learn how to prevent common mistakes and build robust, ...
OSGi Best Practices – Learn how to prevent common mistakes and build robust, ...mfrancis
 

Similaire à OSGi made simple - Fuse Application Bundles (20)

Deploying FuseMQ with Fuse Fabric
Deploying FuseMQ with Fuse FabricDeploying FuseMQ with Fuse Fabric
Deploying FuseMQ with Fuse Fabric
 
Enterprise OSGi at eBay
Enterprise OSGi at eBayEnterprise OSGi at eBay
Enterprise OSGi at eBay
 
Jax london 2011
Jax london 2011Jax london 2011
Jax london 2011
 
Java Core | Java 8 and OSGi Modularisation | Tim Ellison & Neil Bartlett
Java Core | Java 8 and OSGi Modularisation | Tim Ellison & Neil BartlettJava Core | Java 8 and OSGi Modularisation | Tim Ellison & Neil Bartlett
Java Core | Java 8 and OSGi Modularisation | Tim Ellison & Neil Bartlett
 
Java Modularity with OSGi
Java Modularity with OSGiJava Modularity with OSGi
Java Modularity with OSGi
 
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
 
Use Case: Building OSGi Enterprise Applications (QCon 14)
Use Case: Building OSGi Enterprise Applications (QCon 14)Use Case: Building OSGi Enterprise Applications (QCon 14)
Use Case: Building OSGi Enterprise Applications (QCon 14)
 
Building Modular Enterprise Applications - C Ziegeler
Building Modular Enterprise Applications - C ZiegelerBuilding Modular Enterprise Applications - C Ziegeler
Building Modular Enterprise Applications - C Ziegeler
 
Osgi Webinar
Osgi WebinarOsgi Webinar
Osgi Webinar
 
create auto scale jboss cluster with openshift
create auto scale jboss cluster with openshiftcreate auto scale jboss cluster with openshift
create auto scale jboss cluster with openshift
 
OSGi & Java EE: A hybrid approach to Enterprise Java Application Development,...
OSGi & Java EE: A hybrid approach to Enterprise Java Application Development,...OSGi & Java EE: A hybrid approach to Enterprise Java Application Development,...
OSGi & Java EE: A hybrid approach to Enterprise Java Application Development,...
 
Part 8 - Enforcing modularity of JasForge using OSGI and Futures Evolutions
Part 8 - Enforcing modularity of JasForge using OSGI and Futures EvolutionsPart 8 - Enforcing modularity of JasForge using OSGI and Futures Evolutions
Part 8 - Enforcing modularity of JasForge using OSGI and Futures Evolutions
 
OSGi Sticker Shock Eclipse Con 2010
OSGi Sticker Shock   Eclipse Con 2010OSGi Sticker Shock   Eclipse Con 2010
OSGi Sticker Shock Eclipse Con 2010
 
GlassFish OSGi - Java2days 2010
GlassFish OSGi - Java2days 2010GlassFish OSGi - Java2days 2010
GlassFish OSGi - Java2days 2010
 
RESTful Services and Distributed OSGi - 04/2009
RESTful Services and Distributed OSGi - 04/2009RESTful Services and Distributed OSGi - 04/2009
RESTful Services and Distributed OSGi - 04/2009
 
Java8 - Under the hood
Java8 - Under the hoodJava8 - Under the hood
Java8 - Under the hood
 
Framework Modularity Layer - Glyn Normington, IBM
Framework Modularity Layer - Glyn Normington, IBMFramework Modularity Layer - Glyn Normington, IBM
Framework Modularity Layer - Glyn Normington, IBM
 
OSGi & Blueprint
OSGi & BlueprintOSGi & Blueprint
OSGi & Blueprint
 
OSGi introduction
OSGi introductionOSGi introduction
OSGi introduction
 
OSGi Best Practices – Learn how to prevent common mistakes and build robust, ...
OSGi Best Practices – Learn how to prevent common mistakes and build robust, ...OSGi Best Practices – Learn how to prevent common mistakes and build robust, ...
OSGi Best Practices – Learn how to prevent common mistakes and build robust, ...
 

Plus de Rob Davies

Integration in the Cloud
Integration in the CloudIntegration in the Cloud
Integration in the CloudRob Davies
 
Messaging For the Cloud and Microservices
Messaging For the Cloud and MicroservicesMessaging For the Cloud and Microservices
Messaging For the Cloud and MicroservicesRob Davies
 
Connecting Applications Everywhere with ActiveMQ
Connecting Applications Everywhere with ActiveMQConnecting Applications Everywhere with ActiveMQ
Connecting Applications Everywhere with ActiveMQRob Davies
 
How opensourceworks
How opensourceworksHow opensourceworks
How opensourceworksRob Davies
 

Plus de Rob Davies (6)

Integration in the Cloud
Integration in the CloudIntegration in the Cloud
Integration in the Cloud
 
Messaging For the Cloud and Microservices
Messaging For the Cloud and MicroservicesMessaging For the Cloud and Microservices
Messaging For the Cloud and Microservices
 
Fabric8 mq
Fabric8 mqFabric8 mq
Fabric8 mq
 
Fuse overview
Fuse overviewFuse overview
Fuse overview
 
Connecting Applications Everywhere with ActiveMQ
Connecting Applications Everywhere with ActiveMQConnecting Applications Everywhere with ActiveMQ
Connecting Applications Everywhere with ActiveMQ
 
How opensourceworks
How opensourceworksHow opensourceworks
How opensourceworks
 

Dernier

A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
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
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
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
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 

Dernier (20)

A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
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
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
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
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 

OSGi made simple - Fuse Application Bundles

  • 1. FuseSource Technology: OSGi Made Simple: Introducing Fabric Application Bundles Rob Davies CTO April 2012 1 © 2012 FuseSource Corp. All rights reserved. FuseSource Confidential
  • 2. FuseSource : the Gorilla Among Open Source Vendors  Forrester ESB Wave Report Q2 2011: FuseSource is the only open source “Leader”  Largest market presence – over 200 customers  Marquee customers and good tooling allow us to compete in the low end  Weaker solutions cannot match FuseSource stats: • 100s of millions transactions a day • No down time • 200,000+ downloads a month • 25+ leaders & committers at Apache 2 © 2012 FuseSource Corp. All rights reserved. FuseSource Confidential
  • 3. FuseSource : All About Customer Success  Performance • Expertise in architecting for performance • Distribution designed for high-performance computing • Sabre’s travel gateway is processing over 1.5 billion txn/day (32,000+ txn/sec) on 13 servers with zero downtime  Global scalability • No license fees: can deploy at 1,000s of locations • Distributed nature of distribution supports scaling out • SpecSavers deploys in 1,400 global retail stores  Proven Enterprise Quality of Service • Proven in mission-critical applications • CERN is using to run operational grid in Large Hadron Collider • FAA is using in next-generation air traffic control (SWIM) 3 © 2012 FuseSource Corp. All rights reserved. FuseSource Confidential
  • 4. Agenda  Why Fuse Fabric ?  What does Fuse Fabric do ?  High level architecture  Deep dive  Q&A 4 © 2012 FuseSource Corp. All rights reserved. FuseSource Confidential
  • 5. What’s good with using WARs ?  really simple for application developers to create and use • simple flat classpath which is easy to grok  single file to deploy  if it works once in Tomcat/Jetty it usually always does 5 © 2012 FuseSource Corp. All rights reserved. FuseSource Confidential
  • 6. What is wrong with WARs ?  not easy to share code across WARs • usually end up hacking a Tomcat/Jetty distro and hand-copying jars in shared classloader  they tend to be pretty huge  not possible to just update one small service; need to redeploy entire applications  each small change to one service often requires a full test of the entire application 6 © 2012 FuseSource Corp. All rights reserved. FuseSource Confidential
  • 7. OSGi background  OSGi originally stood for “Open Services Gateway initiative” - An initiative focused on deploying Java solutions into “residential gateways” for smart homes and building controls  OSGi tackles the problem of deploying and administering Java modules (aka “bundles”) - Lifecycle – How to load, start, and stop Java bundles without shutting down the JVM - Remote management and administration - Class-loading - Versioning - Dependency management  The OSGi alliance was founded in 1999 to promote wide scale adoption of OSGi technology - You can find them on the web at http://www.osgi.org 7 © 2012 FuseSource Corp. All rights reserved. FuseSource Confidential
  • 8. Bundles • A bundle is a Java archive (JAR) with some meta-data • The meta-data is provided in plain-text in the META- INF/MANIFEST.MF file • Bundle meta-data includes the following: • BundleName – A descriptive, human readable name for the bundle • Bundle-Symbolic-Name – A unique name for the bundle • Bundle-Version – The version of the bundle, in the format X.X.X • Export-Package – A list of Java packages “visible” from the bundle • In OSGi, all packages are hidden unless explicitly exported • Import-Package – A list of the Java packages that this bundles requires • Only those packages matching java.* are imported by default • All other packages must be imported explicitly 8 © 2012 FuseSource Corp. All rights reserved. FuseSource Confidential
  • 9. Bundle versioning in OSGi • Bundles are tagged with a Bundle-Version in the MANIFEST.MF file, for example:  Bundle-Version: 1.2.3 • When a bundle imports packages from another bundle, it can specify the version number:  Import-Package: com.mycompany.stuff;version="1.2.3" • Note that exported package should have a version too! • Alternatively, specify a range of compatible versions with brackets: - Use „[„ or „]‟ to specify a lower or upper limit, and to include the limit - Use „(„ or „)‟ to specify a lower or upper limit and to exclude the limit • For example: Import−Package: com.mycompany.stuff;version=“[1.2.3,1.2.5)” - Imports version 1.2.3 or 1.2.4, but not 1.2.5 - Note that “1.2.3” for a version means version >= 1.2.3. If you want only 1.2.3 then use “[1.2.3,1.2.3]” or “[1.2.3,1.2.4)” 9 © 2012 FuseSource Corp. All rights reserved. FuseSource Confidential
  • 10. What’s good about OSGi ?  ideal micro container for the JVM • small and modular • simple and powerful model – bundle context, listener, registry  easy to extend to support • deployment units like WARs, EARs, JBI • frameworks like spring-dm, OSGi Blueprints, CDI, guice etc  hot (re) deployment at a fine or course grained level of services at runtime • awesome for developers of JEE servers and ESBs • Apache Karaf & ServiceMix, JBoss, GlassFish, WebSphere, WebLogic etc 10 © 2012 FuseSource Corp. All rights reserved. FuseSource Confidential
  • 11. What’s wrong with OSGi ?  bundles are very fine grained and use package level metadata  import and exports with version ranges required on every package • usually quite a few packages per jar • typical applications have 10s or 100s of jars • lots and lots of packages and metadata to get wrong!  package level metadata often a bit too low level for developers  folks who just wanna get stuff done fast!  writing bundles is easy • installing and actually starting bundles together so they actually work is much harder 11 © 2012 FuseSource Corp. All rights reserved. FuseSource Confidential
  • 12. Its not just a tooling problem  developers have to spend a lot of time messing about either • making new osgi bundles for existing jars • messing around with whatever tool they use to generate the OSGi metadata to tweak it all • keeping the metadata/imports up to date as dependencies change  requires all developers learn all the OSGi metadata and the OSGi metadata geneartion tools • then using some other mechanism to figure out which bundles to actually install • Karaf Features, scripting, tarballs etc  using 50-100 bundles; life soon becomes very difficult 12 © 2012 FuseSource Corp. All rights reserved. FuseSource Confidential
  • 13. Fabric Bundles  Easy to deploy and control which classes are shared across deployment units  A common model of class loaders across build tools, IDE and OSGi container  how many times does code work in isolation, only to fail to deploy to the container using OSGi ?  developers can concentrate on solving business problems, instead resolving OSGi bundle hell 13 © 2012 FuseSource Corp. All rights reserved. FuseSource Confidential
  • 14. What is a Fabric Bundle ?  Any jar containing a pom.xml - which defines the transitive dependencies for that jar  This is the default for the more popular build tools  maven  SBT  Others (Ant, Ivy, Gradle etc) - just need to make a jar with a pom.xml inside 14 © 2012 FuseSource Corp. All rights reserved. FuseSource Confidential
  • 15. What you find in a Maven built jar 15 © 2012 FuseSource Corp. All rights reserved. FuseSource Confidential
  • 16. How do you use Fab ?  Use Fuse ESB - a flexible, standards-based enterprise service bus - it fully supports fabric bundles!  You simply install any FAB as if it were a WAR or Karaf feature: install fab:mvn:<groupId>/<artifactId>/<version>  OR - deploy your FAB archive (a jar postfixed with .fab) to the Fuse ESB deploy directory 16 © 2012 FuseSource Corp. All rights reserved. FuseSource Confidential
  • 17. How do Fabric Bundles work ?  When a FAB is installed, Fuse ESB converts it into a regular OSGi bundle  By default, Fuse ESB will automatically install all the transitive dependencies, if they are not already loaded into the container  A FAB can depend on regular jars or real OSGi bundles! 17 © 2012 FuseSource Corp. All rights reserved. FuseSource Confidential
  • 18. Configuring Fabric Application Bundles  By default, FAB uses a regular flat class loader:  This means what you build and test outside the Fuse ESB OSGi container will typically work inside Fuse ESB.  Because a FAB is converted into a regular OSGi bundle, you still benefit from been able to install and deploy multiple versions of the same FAB or use different versions of dependencies  However, this does negate some of the benefits of OSGi, the ability to share code across multiple bundles  So you can start simple, and iteratively get more complex code sharing deployments through configuring your FAB. 18 © 2012 FuseSource Corp. All rights reserved. FuseSource Confidential
  • 19. Provided dependencies To share an existing dependency (and its transitive dependencies) you declare a dependency as provided in the pm.xml - e.g: <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-core</artifactId> <version>${camel-version}</version> <scope>provided</scope> </dependency> 19 © 2012 FuseSource Corp. All rights reserved. FuseSource Confidential
  • 20. Provided dependencies (continued) You can alternatively, use the Fabric-Provided-Dependency in the jar manifest header, to specify zero to many shared dependencies: Fabric-Provided-Dependency: <grpId1>:<artifactId1> .... You can also use wild cards - e.g. if you want to share all spring and camel dependencies: Fabric-Provided-Dependency: org.apache.camel:* org.springframework:* 20 © 2012 FuseSource Corp. All rights reserved. FuseSource Confidential
  • 21. Conclusion  Using OSGi as a component framework has a great many benefits  modularity and sharing of code  dynamic updates  versioning  reuse  However, deployments in OSGi containers can be hard  FuseSource has created Fabric bundles to make deploying in OSGi extremely simple, but also flexible, so you can still gain all the benefits of OSGi when you want to  Fuse ESB ships with Fabric bundles by default, another reason Fuse ESB is the most popular enterprise open source solution today. 21 © 2012 FuseSource Corp. All rights reserved. FuseSource Confidential
  • 22. Any Questions? No vendor lock-in Free to redistribute Enterprise class…….. 22 © 2012 FuseSource Corp. All rights reserved. FuseSource Confidential